From e753f4df32d730d3db5f5b278559a7e94a085c27 Mon Sep 17 00:00:00 2001 From: WinDanesz <31292708+windanesz@users.noreply.github.com> Date: Sat, 18 Apr 2026 23:34:56 +0200 Subject: [PATCH] Fix: Ensure spell properties are initialized before checking if the spell is enabled --- src/main/java/electroblob/wizardry/spell/Spell.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/electroblob/wizardry/spell/Spell.java b/src/main/java/electroblob/wizardry/spell/Spell.java index b3641803..a09c13ad 100644 --- a/src/main/java/electroblob/wizardry/spell/Spell.java +++ b/src/main/java/electroblob/wizardry/spell/Spell.java @@ -907,7 +907,7 @@ public abstract class Spell extends IForgeRegistryEntry.Impl implements C * its JSON file using a resource pack. If called with no arguments, defaults to any context, i.e. only returns * false if the spell is completely disabled in all contexts. */ public final boolean isEnabled(SpellProperties.Context... contexts){ - return enabled && (contexts.length == 0 || properties.isEnabled(contexts)); + return enabled && (contexts.length == 0 || (arePropertiesInitialised() && properties.isEnabled(contexts))); } /** Sets whether the spell is enabled or not. */