Fixes harvest crash

This commit is contained in:
Muramasa- 2016-09-28 05:45:30 +01:00 committed by Blood-Asp
parent 5fbfa73be9
commit 0570c23ea6

View file

@ -80,7 +80,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.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) {