From 0a914734026e9ca193e78c02a7353ddbc8f85dfd Mon Sep 17 00:00:00 2001 From: James Seibel Date: Sun, 4 Jun 2023 21:07:54 -0500 Subject: [PATCH] remove ClassicConfigGUI.setWithoutSaving() --- .../seibel/lod/common/wrappers/gui/ClassicConfigGUI.java | 8 ++++---- coreSubProjects | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/common/src/main/java/com/seibel/lod/common/wrappers/gui/ClassicConfigGUI.java b/common/src/main/java/com/seibel/lod/common/wrappers/gui/ClassicConfigGUI.java index e68ad8ecf..5e9ca0ef0 100644 --- a/common/src/main/java/com/seibel/lod/common/wrappers/gui/ClassicConfigGUI.java +++ b/common/src/main/java/com/seibel/lod/common/wrappers/gui/ClassicConfigGUI.java @@ -131,9 +131,9 @@ public abstract class ClassicConfigGUI { if (((ConfigEntry) info).isValid(value) == 0 && info.getType() != List.class) { if (!cast) - ((ConfigEntry) info).setWithoutSaving(value); + ((ConfigEntry) info).set(value); else - ((ConfigEntry) info).setWithoutSaving(value.intValue()); + ((ConfigEntry) info).set(value.intValue()); } // else if (((ConfigEntry) info).isValidMemoryAddress() == 0) // { @@ -266,7 +266,7 @@ public abstract class ClassicConfigGUI { #else Button resetButton = new Button(this.width - ConfigScreenConfigs.SpaceFromRightScreen - 150 - ConfigScreenConfigs.ButtonWidthSpacing - ConfigScreenConfigs.ResetButtonWidth, 0, ConfigScreenConfigs.ResetButtonWidth, 20, Component.translatable("Reset").withStyle(ChatFormatting.RED), (button -> { #endif - ((ConfigEntry) info).setWithoutSaving(((ConfigEntry) info).getDefaultValue()); + ((ConfigEntry) info).set(((ConfigEntry) info).getDefaultValue()); ((EntryInfo) info.guiValue).index = 0; this.reload = true; Objects.requireNonNull(minecraft).setScreen(this); @@ -369,7 +369,7 @@ public abstract class ClassicConfigGUI { Function func = value -> Component.translatable((Boolean) value ? "True" : "False").withStyle((Boolean) value ? ChatFormatting.GREEN : ChatFormatting.RED); #endif ((EntryInfo) info.guiValue).widget = new AbstractMap.SimpleEntry>(button -> { - ((ConfigEntry) info).setWithoutSaving(!(Boolean) info.get()); + ((ConfigEntry) info).set(!(Boolean) info.get()); button.setMessage(func.apply(info.get())); }, func); } diff --git a/coreSubProjects b/coreSubProjects index ed935f6a0..d992bd05f 160000 --- a/coreSubProjects +++ b/coreSubProjects @@ -1 +1 @@ -Subproject commit ed935f6a0f90a08968b8c349b348cfd3789af2ad +Subproject commit d992bd05f455d2d90f6d77d20b3a3651bd3e063d