removed localBlock and localMeta in HarvestTool.java because block and localBlock is always the same.

moved the block harvesting in own method
fixes some blocks not droping or not breaking at all.
fixes exp drop with silktouch
This commit is contained in:
jodamm committed 2014-07-30 21:33:42 +02:00
1 parent e3aeca1a91
commit 2f5910c08e
2 files changed
+34 -27

No files matched your search

@@ -52,12 +52,7 @@ public abstract class DualHarvestTool extends HarvestTool
{
if (!player.capabilities.isCreativeMode)
{
// Workaround for dropping experience
int fortune = EnchantmentHelper.getFortuneModifier(player);
int exp = block.getExpDrop(world, meta, fortune);
block.dropXpOnBlockBreak(world, x, y, z, exp);
onBlockDestroyed(stack, world, block, x, y, z, player);
mineBlock(world, x, y, z, meta, player, block);
}
WorldHelper.setBlockToAir(world, x, y, z);
if (!world.isRemote)