Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package net.minecraft.src;
- public class ItemC4 extends Item
- {
- public static int grenadeID;
- public ItemC4(int par1)
- {
- super(par1);
- maxStackSize = 16;
- }
- /**
- * Called whenever this item is equipped and the right mouse button is pressed.
- */
- public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
- {
- if (!par3EntityPlayer.capabilities.isCreativeMode)
- {
- par1ItemStack.stackSize--;
- }
- par2World.playSoundAtEntity(par3EntityPlayer, "random.bow", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F));
- par2World.entityJoinedWorld(new EntityC4(par2World, par3EntityPlayer));
- return par1ItemStack;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment