From 7293985b161184e363c2ec0a1f8f5135200387fc Mon Sep 17 00:00:00 2001 From: direwolf20 <39863894+Direwolf20-MC@users.noreply.github.com> Date: Fri, 6 Dec 2024 09:29:03 -0500 Subject: [PATCH] Add a check to prevent Eternal Stella from breaking my tools - resolves #289 --- .../justdirethings/common/items/interfaces/Helpers.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/com/direwolf20/justdirethings/common/items/interfaces/Helpers.java b/src/main/java/com/direwolf20/justdirethings/common/items/interfaces/Helpers.java index 1b1690ca..785ae777 100644 --- a/src/main/java/com/direwolf20/justdirethings/common/items/interfaces/Helpers.java +++ b/src/main/java/com/direwolf20/justdirethings/common/items/interfaces/Helpers.java @@ -203,6 +203,7 @@ public static int testUseTool(ItemStack stack) { if (energyStorage == null) return -1; //Shouldn't Happen! return energyStorage.getEnergyStored() - poweredTool.getBlockBreakFECost(); } else { + if (!stack.isDamageableItem()) return 1; return stack.getMaxDamage() - stack.getDamageValue() - 1; } }