From 8d96a1a79f9543a8d243b662cc347c69a78f6e85 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Wed, 12 Apr 2023 04:34:18 +0200 Subject: Fixed NPE crash --- src/main/java/at/hannibal2/skyhanni/features/garden/GardenAPI.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenAPI.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenAPI.kt index 8a882226d..418b22960 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenAPI.kt @@ -54,7 +54,7 @@ class GardenAPI { private fun checkItemInHand() { val toolItem = Minecraft.getMinecraft().thePlayer.heldItem - val crop = toolItem.getCropType() + val crop = toolItem?.getCropType() val newTool = getToolInHand(toolItem, crop) if (toolInHand != newTool) { toolInHand = newTool -- cgit