Fix autosmelt smelting blocks that weren't effective (like sand with a hammer)

This commit is contained in:
Bernhard Bonigl committed 2015-02-21 21:05:41 +01:00
1 parent 410f2ae006
commit 339e6baa20
1 file changed
+10 -1
@@ -82,7 +82,16 @@ public class TActiveOmniMod extends ActiveToolMod
int blockMeta = world.getBlockMetadata(x, y, z);
if(!block.getMaterial().isToolNotRequired() && !ForgeHooks.canToolHarvestBlock(block, blockMeta, stack))
if(block.getMaterial().isToolNotRequired()) {
// only if effective tool
if(tool instanceof HarvestTool) {
if (!((HarvestTool) tool).isEffective(block, blockMeta))
return false;
}
else
return false;
}
else if(!ForgeHooks.canToolHarvestBlock(block, blockMeta, stack))
return false;
if (tags.getBoolean("Lava") && block.quantityDropped(blockMeta, 0, random) > 0)