Fix: GregTech Axe don't harvest blocks that have not harvest tool (harvest tool is "null") (#1382)

This commit is contained in:
shpakovivan 2018-02-10 22:53:42 +03:00 committed by Blood-Asp
parent d553daacd6
commit c0d544e555

View file

@ -81,7 +81,7 @@ public class GT_Tool_Axe
public boolean isMinableBlock(Block aBlock, byte aMetaData) { public boolean isMinableBlock(Block aBlock, byte aMetaData) {
String tTool = aBlock.getHarvestTool(aMetaData); String tTool = aBlock.getHarvestTool(aMetaData);
return ((tTool != null) && (tTool.equals("axe"))) || (aBlock.getMaterial() == Material.wood); return tTool == null || tTool.equals("axe") || (aBlock.getMaterial() == Material.wood);
} }
public int convertBlockDrops(List<ItemStack> aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) { public int convertBlockDrops(List<ItemStack> aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) {