From 877fe2b275bc76ec3b5eb14df554be0efa353dc3 Mon Sep 17 00:00:00 2001 From: Kam Date: Fri, 20 Feb 2026 03:33:58 -0500 Subject: [PATCH] Fix Conditions Build Error --- .../npcs/controllers/data/ability/ConditionField.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/kamkeel/npcs/controllers/data/ability/ConditionField.java b/src/main/java/kamkeel/npcs/controllers/data/ability/ConditionField.java index cf4d2ad8f..d96178759 100644 --- a/src/main/java/kamkeel/npcs/controllers/data/ability/ConditionField.java +++ b/src/main/java/kamkeel/npcs/controllers/data/ability/ConditionField.java @@ -127,10 +127,11 @@ public abstract class ConditionField { public void readNBT(NBTTagCompound nbt) { if (!nbt.hasKey(key)) return; T v; - if (type == Integer.class) v = (T) (Integer) nbt.getInteger(key); - else if (type == Float.class) v = (T) (Float) nbt.getFloat(key); - else if (type == Double.class) v = (T) (Double) nbt.getDouble(key); - else if (type == Long.class) v = (T) (Long) nbt.getLong(key); + Class t = type; + if (t == Integer.class) v = (T) (Integer) nbt.getInteger(key); + else if (t == Float.class) v = (T) (Float) nbt.getFloat(key); + else if (t == Double.class) v = (T) (Double) nbt.getDouble(key); + else if (t == Long.class) v = (T) (Long) nbt.getLong(key); else return; setValue(v); }