public void harvestBlock(World world, EntityPlayer entityplayer, int i, int j, int k, int l) { if (!world.singleplayerWorld && entityplayer.getCurrentEquippedItem() != null && entityplayer.getCurrentEquippedItem().itemID == Item.field_31022_bc.shiftedIndex) { entityplayer.addStat(StatList.mineBlockStatArray[blockID], 1); dropBlockAsItem_do(world, i, j, k, new ItemStack(Block.leaves.blockID, 1, l & 3)); } else { super.harvestBlock(world, entityplayer, i, j, k, l); } }
/** * Called when the player destroys a block with an item that can harvest it. (i, j, k) are the * coordinates of the block and l is the block's subtype/damage. */ public void harvestBlock( World par1World, EntityPlayer par2EntityPlayer, int par3, int par4, int par5, int par6) { if (!par1World.isRemote && par2EntityPlayer.getCurrentEquippedItem() != null && par2EntityPlayer.getCurrentEquippedItem().itemID == Item.shears.shiftedIndex) { par2EntityPlayer.addStat(StatList.mineBlockStatArray[this.blockID], 1); this.dropBlockAsItem_do( par1World, par3, par4, par5, new ItemStack(Block.leaves.blockID, 1, par6 & 3)); } else { super.harvestBlock(par1World, par2EntityPlayer, par3, par4, par5, par6); } }
public void onEntityWalking(World world, int i, int j, int k, Entity entity) { super.onEntityWalking(world, i, j, k, entity); }