diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/ClassicConfigGUI.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/ClassicConfigGUI.java index 9271a9637..e173fe999 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/ClassicConfigGUI.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/ClassicConfigGUI.java @@ -98,6 +98,7 @@ public class ClassicConfigGUI public static final int SpaceFromRightScreen = 10; public static final int ButtonWidthSpacing = 5; public static final int ResetButtonWidth = 40; + public static final int ResetButtonHeight = 20; } @@ -322,12 +323,12 @@ public class ClassicConfigGUI this.reload = true; Objects.requireNonNull(minecraft).setScreen(this); }; - int a = this.width - ConfigScreenConfigs.SpaceFromRightScreen - 150 - ConfigScreenConfigs.ButtonWidthSpacing - ConfigScreenConfigs.ResetButtonWidth; - int b = 0; - int c = ConfigScreenConfigs.ResetButtonWidth; - int d = 20; + int posX = this.width - ConfigScreenConfigs.SpaceFromRightScreen - 150 - ConfigScreenConfigs.ButtonWidthSpacing - ConfigScreenConfigs.ResetButtonWidth; + int posZ = 0; - Button resetButton = MakeBtn(Translatable("distanthorizons.general.reset").withStyle(ChatFormatting.RED), a, b, c, d, btnAction); + Button resetButton = MakeBtn(Translatable("distanthorizons.general.reset").withStyle(ChatFormatting.RED), + posX, posZ, ConfigScreenConfigs.ResetButtonWidth, ConfigScreenConfigs.ResetButtonHeight, + btnAction); if (((EntryInfo) info.guiValue).widget instanceof Map.Entry) { diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/GuiHelper.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/GuiHelper.java index 18274f77c..53b0cebaa 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/GuiHelper.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/GuiHelper.java @@ -15,12 +15,12 @@ public class GuiHelper /** * Helper static methods for versional compat */ - public static Button MakeBtn(Component base, int a, int b, int c, int d, Button.OnPress action) + public static Button MakeBtn(Component base, int posX, int posZ, int width, int height, Button.OnPress action) { #if MC_VER < MC_1_19_4 return new Button(a, b, c, d, base, action); #else - return Button.builder(base, action).bounds(a, b, c, d).build(); + return Button.builder(base, action).bounds(posX, posZ, width, height).build(); #endif }