Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.BlueR.Test.block;
- import com.BlueR.Test.creativetab.CreativeTabTest;
- import com.BlueR.Test.init.ModItems;
- import com.BlueR.Test.reference.Names;
- import net.minecraft.block.material.Material;
- import net.minecraft.init.Items;
- import net.minecraft.item.Item;
- import java.util.Random;
- public class BlockGeode extends BlockBaseBlock
- {
- public BlockGeode()
- {
- super(Material.rock);
- this.setBlockName("Geode");
- this.setBlockTextureName("Geode");
- this.setStepSound(soundTypeStone);
- this.setHardness(2.0F);
- this.setHarvestLevel("Pickaxe", 3);
- }
- public Item getItemDropped(int par1, Random random, int par2)
- {
- int chance = random.nextInt(1000);
- if(chance < 250)
- return ModItems.gem; //This is the metadata item.
- else if(chance < 990)
- return ModItems.ipgem; //another metadata item.
- else if(chance < 999)
- return Items.diamond;
- else
- return Items.emerald;
- }
- public int quantityDropped(Random par1Random)
- {
- return 110; //I set this to a large number so that I could test if the items all drop.
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement