Compare commits

...

4 commits

Author SHA1 Message Date
009822531a Update Changelog
All checks were successful
Build TurnBasedMC and create Release / check-release-exists (push) Successful in 2s
Build TurnBasedMC and create Release / build-and-create-release (push) Successful in 1m31s
2024-11-05 17:22:04 +09:00
aee0f1b569 Update version to 1.26.5, NeoForge 21.1.74 2024-11-05 17:19:53 +09:00
a6b905c01f Change Config to add new entries in-place
Now, if changes are added to the default Config, they should be appended
to the existing config file instead of replacing it. All missing values
will be populated with defaults as well.
2024-11-05 17:19:53 +09:00
ee37b83769 Update ClientConfigGui to quit to "parentScreen" 2024-11-05 16:35:00 +09:00
6 changed files with 590 additions and 145 deletions

View file

@ -1,5 +1,41 @@
# Upcoming changes # Upcoming changes
# Version Forge-1.26.5
Update TBM\_Config.toml to have haste\_speed and slow\_speed for all mob
entries.
Update Config to merge in new changes. This means that the existing config will
be overwritten much less frequently (if ever).
Update to Forge 52.0.26 (MC 1.21.1).
# Version NeoForge-1.26.5-MC-1.21.1
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).
Update Config to merge in new changes. This means that the existing config will
be overwritten much less frequently (if ever).
Update to NeoForge 21.1.74 (MC 1.21.1).
# Version NeoForge-1.26.5
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).
Update Config to merge in new changes. This means that the existing config will
be overwritten much less frequently (if ever).
Update to NeoForge 21.3.11-beta (MC 1.21.3).
# 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

@ -78,7 +78,7 @@ configured for them.)
Simply invoke `./gradlew build` in the mod directory and after some time the Simply invoke `./gradlew build` in the mod directory and after some time the
finished jar will be saved at finished jar will be saved at
`build/libs/TurnBasedMinecraft-NeoForge-1.26.4-MC-1.21.1-all.jar` `build/libs/TurnBasedMinecraft-NeoForge-1.26.5-MC-1.21.1-all.jar`
# Reproducibility # Reproducibility

View file

@ -21,7 +21,7 @@ minecraft_version=1.21.1
minecraft_version_range=[1.21.1, 1.22) minecraft_version_range=[1.21.1, 1.22)
# The Neo version must agree with the Minecraft version to get a valid artifact # The Neo version must agree with the Minecraft version to get a valid artifact
neo_version=21.1.73 neo_version=21.1.74
# The Neo version range can use any version of Neo as bounds # The Neo version range can use any version of Neo as bounds
neo_version_range=[21.1.0,) neo_version_range=[21.1.0,)
# The loader version range can only use the major version of FML as bounds # The loader version range can only use the major version of FML as bounds
@ -37,7 +37,7 @@ mod_name=TurnBasedMinecraftMod
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default. # The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
mod_license=MIT mod_license=MIT
# The mod version. See https://semver.org/ # The mod version. See https://semver.org/
mod_version=1.26.4-MC-1.21.1 mod_version=1.26.5-MC-1.21.1
# The group ID for the mod. It is only important when publishing as an artifact to a Maven repository. # The group ID for the mod. It is only important when publishing as an artifact to a Maven repository.
# This should match the base package used for the mod sources. # This should match the base package used for the mod sources.
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html # See https://maven.apache.org/guides/mini/guide-naming-conventions.html

View file

@ -20,6 +20,7 @@ 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"));
@ -27,6 +28,8 @@ 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() {
@ -175,7 +178,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(null)) (b) -> Minecraft.getInstance().setScreen(this.parentScreen))
.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) -> {
@ -225,7 +228,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(null); Minecraft.getInstance().setScreen(this.parentScreen);
return; return;
} }
if (dirtyFlag) { if (dirtyFlag) {

View file

@ -41,7 +41,7 @@ import org.apache.logging.log4j.Logger;
public class TurnBasedMinecraftMod { public class TurnBasedMinecraftMod {
public static final String MODID = "com_burnedkirby_turnbasedminecraft"; public static final String MODID = "com_burnedkirby_turnbasedminecraft";
public static final String NAME = "Turn Based Minecraft Mod"; public static final String NAME = "Turn Based Minecraft Mod";
public static final String VERSION = "1.26.4-MC-1.21.1"; public static final String VERSION = "1.26.5-MC-1.21.1";
public static final String CONFIG_FILENAME = "TBM_Config.toml"; public static final String CONFIG_FILENAME = "TBM_Config.toml";
public static final String DEFAULT_CONFIG_FILENAME = "TBM_Config_DEFAULT.toml"; public static final String DEFAULT_CONFIG_FILENAME = "TBM_Config_DEFAULT.toml";
public static final String CONFIG_DIRECTORY = "config/TurnBasedMinecraft/"; public static final String CONFIG_DIRECTORY = "config/TurnBasedMinecraft/";