Compare commits

..

No commits in common. "d62ae7be349aaeedb4f33e91d7d29acf94fd39b0" and "f9cb3c053714d45c04915daa9634b501ad844cba" have entirely different histories.

2 changed files with 2 additions and 11 deletions

View file

@ -1,11 +1,5 @@
# Upcoming changes # Upcoming changes
Update TBM\_Config.toml to have haste\_speed and slow\_speed for all mob
entries.
Update ClientConfigGui to quit to mod-menu screen in NeoForge (before, it quit
to the main screen or current game).
# Version Forge-1.26.4 # Version Forge-1.26.4
[Add support for "per-player-stats" in Turn-Based-Battle.](https://stephen-seo.github.io/TurnBasedMinecraftMod/server_config/#per-player-settings) [Add support for "per-player-stats" in Turn-Based-Battle.](https://stephen-seo.github.io/TurnBasedMinecraftMod/server_config/#per-player-settings)

View file

@ -20,7 +20,6 @@ public class ClientConfigGui extends net.minecraft.client.gui.screens.Screen {
private Checkbox affectedByMasterVolCheckbox = null; private Checkbox affectedByMasterVolCheckbox = null;
private Checkbox affectedByMusicVolCheckbox = null; private Checkbox affectedByMusicVolCheckbox = null;
private SliderPercentage volumeSlider = null; private SliderPercentage volumeSlider = null;
private Screen parentScreen = null;
public ClientConfigGui(ModContainer container, Screen parent) { public ClientConfigGui(ModContainer container, Screen parent) {
super(Component.literal("TurnBasedMC Client Config")); super(Component.literal("TurnBasedMC Client Config"));
@ -28,8 +27,6 @@ public class ClientConfigGui extends net.minecraft.client.gui.screens.Screen {
dirtyFlag = true; dirtyFlag = true;
accepted = false; accepted = false;
this.parentScreen = parent;
} }
public void onDirty() { public void onDirty() {
@ -178,7 +175,7 @@ public class ClientConfigGui extends net.minecraft.client.gui.screens.Screen {
addRenderableWidget(volumeSlider); addRenderableWidget(volumeSlider);
addRenderableWidget(Button.builder(Component.literal("Cancel"), addRenderableWidget(Button.builder(Component.literal("Cancel"),
(b) -> Minecraft.getInstance().setScreen(this.parentScreen)) (b) -> Minecraft.getInstance().setScreen(null))
.bounds(this.width / 2 - widget_width + widget_x_offset, .bounds(this.width / 2 - widget_width + widget_x_offset,
this.height - widget_height, widget_width, widget_height).build()); this.height - widget_height, widget_width, widget_height).build());
addRenderableWidget(Button.builder(Component.literal("Accept"), (b) -> { addRenderableWidget(Button.builder(Component.literal("Accept"), (b) -> {
@ -228,7 +225,7 @@ public class ClientConfigGui extends net.minecraft.client.gui.screens.Screen {
public void render(GuiGraphics pGuiGraphics, int pMouseX, int pMouseY, float pPartialTick) { public void render(GuiGraphics pGuiGraphics, int pMouseX, int pMouseY, float pPartialTick) {
if (accepted) { if (accepted) {
doAccepted(); doAccepted();
Minecraft.getInstance().setScreen(this.parentScreen); Minecraft.getInstance().setScreen(null);
return; return;
} }
if (dirtyFlag) { if (dirtyFlag) {