From 14543da225171115ce1ba617560181e14bda79a7 Mon Sep 17 00:00:00 2001 From: Jason Mitchell Date: Mon, 29 Jan 2018 22:31:02 -0800 Subject: [PATCH] Add a null check in case there is no current equipped item --- src/main/java/tconstruct/library/tools/HarvestTool.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/tconstruct/library/tools/HarvestTool.java b/src/main/java/tconstruct/library/tools/HarvestTool.java index fd5dcf3c..3e4df3ee 100644 --- a/src/main/java/tconstruct/library/tools/HarvestTool.java +++ b/src/main/java/tconstruct/library/tools/HarvestTool.java @@ -289,7 +289,10 @@ public abstract class HarvestTool extends ToolCore } // callback to the tool the player uses. Called on both sides. This damages the tool n stuff. - player.getCurrentEquippedItem().func_150999_a(world, block, x, y, z, player); + ItemStack currentItem = player.getCurrentEquippedItem(); + if(currentItem != null) { + currentItem.func_150999_a(world, block, x, y, z, player); + } // server sided handling if (!world.isRemote) {