Mojira Archive
MC-67949

Unnecessary code in BlockLeaves.java

the code says:
public void harvestBlock(World world, EntityPlayer player, int p_149636_3_, int p_149636_4_, int p_149636_5_, int p_149636_6_)
{
if (!world.isClient && player.getCurrentEquippedItem() != null && player.getCurrentEquippedItem().getItem() == Items.shears) // The unnecesarry code

{ player.addStat(StatList.mineBlockStatArray[Block.getIdFromBlock(this)], 1); this.dropBlockAsItem_do(world, p_149636_3_, p_149636_4_, p_149636_5_, new ItemStack(Item.getItemFromBlock(this), 1, p_149636_6_ & 3)); }

else

{ super.harvestBlock(world, player, p_149636_3_, p_149636_4_, p_149636_5_, p_149636_6_); }

}

Wouldn't it be enough to test if the player holds a shear since he can't have nothing in his hand AND shears?

Invalid

Marcel Schauer

2014-08-18, 01:40 PM

2014-08-18, 01:57 PM

2014-08-18, 01:57 PM

0

2

Unconfirmed

Minecraft 1.7.10

-