New worlds ignoring global cheatmode (#1003)

Co-authored-by: slprime <[email protected]>
This commit is contained in:
Taran Robertsandslprime authored and GitHub committed 2026-08-14 16:20:31 +03:00
1 parent f93d5977ed
commit 75d53b12ca
2 files changed
+10 -4

No files matched your search

@@ -14,8 +14,9 @@ public class NEIInfo {
public static void load(World world) {
OptionCycled modeOption = (OptionCycled) NEIClientConfig.getOptionList().getOption("inventory.cheatmode");
final boolean worldConfig = NEIClientConfig.isWorldSpecific("inventory.cheatmode");
// kept alive so the WeakReference in Option.slotRef isn't GC'd before copyGlobals/cycle use it
GuiOptionList env = modeOption.parent.synthesizeEnvironment(false);
GuiOptionList env = modeOption.parent.synthesizeEnvironment(worldConfig);
if (!modeOption.optionValid(modeOption.value())) {
modeOption.copyGlobals();
modeOption.cycle();