Advertisement
ACMDoom

Code

Jul 24th, 2013
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. package net.minecraft.src;
  2.  
  3. import java.util.Random;
  4.  
  5. public class mod_MyFirstBlock extends BaseMod {
  6.  
  7. public static final Block myFirstBlock = new BlockStuff(170)
  8. .setUnlocalizedName("oreNightmare")
  9. .setCreativeTab(CreativeTabs.tabBlock)
  10. .setHardness(.5f);
  11.  
  12.  
  13.  
  14.  
  15. @Override
  16. public String getVersion() {
  17. // TODO Auto-generated method stub
  18. return "Version 1.0";
  19. }
  20.  
  21. @Override
  22. public void load() {
  23. // TODO Auto-generated method stub
  24. ModLoader.registerBlock(myFirstBlock);
  25. ModLoader.addName(myFirstBlock, "Nightmare Ore");
  26. }
  27.  
  28.  
  29.  
  30. public void GenerateSurface(World world, Random rand, int x, int z){
  31.  
  32. for(int rarity = 0; rarity < 1000; rarity++){
  33.  
  34. int xCoord = x + rand.nextInt(16);
  35. int yCoord = rand.nextInt(70);
  36. int zCoord = z + rand.nextInt(16);
  37. (new WorldGenMinable(myFirstBlock.blockID, 0, 32)).generate(world, rand, xCoord, yCoord, zCoord);
  38. }
  39.  
  40.  
  41.  
  42.  
  43. }
  44.  
  45. public int quantityDropped(int par1) { return (1);
  46. }
  47. public int idDropped(int i, Random par2random, int j) { return mod_MyFirstBlock.myFirstBlock.blockID;
  48. }
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement