diff --git a/src/main/java/emu/grasscutter/game/world/SceneGroupInstance.java b/src/main/java/emu/grasscutter/game/world/SceneGroupInstance.java index 0fe8d042..cbfa02fa 100644 --- a/src/main/java/emu/grasscutter/game/world/SceneGroupInstance.java +++ b/src/main/java/emu/grasscutter/game/world/SceneGroupInstance.java @@ -80,8 +80,7 @@ public class SceneGroupInstance implements SceneGroupUserData { } public int getCachedGadgetState(SceneGadget g) { - Integer state = cachedGadgetStates.getOrDefault(g.getConfigId(), null); - return (state == null) ? g.getState() : state; + return cachedGadgetStates.getOrDefault(g.getConfigId(), g.getState()); } public void save() {