Advertisement
Guest User

Untitled

a guest
Aug 7th, 2014
272
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 KB | None | 0 0
  1. package com.BlueR.Test.block;
  2.  
  3. import com.BlueR.Test.creativetab.CreativeTabTest;
  4. import com.BlueR.Test.init.ModItems;
  5.  
  6. import com.BlueR.Test.reference.Names;
  7. import net.minecraft.block.material.Material;
  8. import net.minecraft.init.Items;
  9. import net.minecraft.item.Item;
  10.  
  11. import java.util.Random;
  12.  
  13. public class BlockGeode extends BlockBaseBlock
  14. {
  15. public BlockGeode()
  16. {
  17. super(Material.rock);
  18. this.setBlockName("Geode");
  19. this.setBlockTextureName("Geode");
  20. this.setStepSound(soundTypeStone);
  21. this.setHardness(2.0F);
  22. this.setHarvestLevel("Pickaxe", 3);
  23. }
  24. public Item getItemDropped(int par1, Random random, int par2)
  25. {
  26. int chance = random.nextInt(1000);
  27. if(chance < 250)
  28. return ModItems.gem; //This is the metadata item.
  29. else if(chance < 990)
  30. return ModItems.ipgem; //another metadata item.
  31. else if(chance < 999)
  32. return Items.diamond;
  33. else
  34. return Items.emerald;
  35. }
  36.  
  37. public int quantityDropped(Random par1Random)
  38. {
  39. return 110; //I set this to a large number so that I could test if the items all drop.
  40. }
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement