diff --git a/src/main/java/electroblob/wizardry/util/WandHelper.java b/src/main/java/electroblob/wizardry/util/WandHelper.java index 872eeb6d..7651abfb 100644 --- a/src/main/java/electroblob/wizardry/util/WandHelper.java +++ b/src/main/java/electroblob/wizardry/util/WandHelper.java @@ -50,7 +50,7 @@ public final class WandHelper { public static final String UPGRADES_KEY = "upgrades"; public static final String PROGRESSION_KEY = "progression"; - private static final HashMap upgradeMap = new HashMap(); + private static final HashMap upgradeMap = new HashMap<>(); static { upgradeMap.put(WizardryItems.condenser_upgrade, "condenser"); @@ -251,6 +251,8 @@ public final class WandHelper { /** Returns the given wand's cooldown for the currently selected spell, or 0 if the wand has no cooldown data. */ public static int getCurrentCooldown(ItemStack wand){ + if(wand.getTagCompound() == null) wand.setTagCompound(new NBTTagCompound()); + int[] cooldowns = getCooldowns(wand); int selectedSpell = wand.getTagCompound().getInteger(SELECTED_SPELL_KEY);