From ee5167dc21bf97b678ef9f9b5199f258b8933ab9 Mon Sep 17 00:00:00 2001 From: Sakura Ryoko Date: Mon, 2 Dec 2024 15:33:36 -0500 Subject: [PATCH] Fix Feature Toggle widths --- gradle.properties | 4 +- .../masa/tweakeroo/config/FeatureToggle.java | 41 +++++++++---------- src/main/resources/fabric.mod.json | 2 +- 3 files changed, 23 insertions(+), 24 deletions(-) diff --git a/gradle.properties b/gradle.properties index 1cb449650..d57beb598 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,10 +9,10 @@ author = masa mod_file_name = tweakeroo-fabric # Current mod version -mod_version = 0.21.54 +mod_version = 0.21.55 # Required malilib version -malilib_version = 1f6f19c122 +malilib_version = a4f54b1e67 # Minecraft, Fabric Loader and API and mappings versions minecraft_version_out = 1.21 diff --git a/src/main/java/fi/dy/masa/tweakeroo/config/FeatureToggle.java b/src/main/java/fi/dy/masa/tweakeroo/config/FeatureToggle.java index 12abc074c..989181085 100644 --- a/src/main/java/fi/dy/masa/tweakeroo/config/FeatureToggle.java +++ b/src/main/java/fi/dy/masa/tweakeroo/config/FeatureToggle.java @@ -250,7 +250,6 @@ public String getName() @Override public String getConfigGuiDisplayName() { - // This doesn't get called ? String name = StringUtils.getTranslatedOrFallback(this.translatedName, this.name); if (this.singlePlayer) @@ -269,6 +268,26 @@ public String getPrettyName() !this.prettyName.isEmpty() ? this.prettyName : StringUtils.splitCamelCase(this.name.substring(5))); } + @Override + public String getComment() + { + String comment = StringUtils.getTranslatedOrFallback(this.comment, this.comment); + + if (comment != null && this.singlePlayer) + { + return comment + "\n" + StringUtils.translate("tweakeroo.label.config_comment.single_player_only"); + } + + //System.out.printf("FeatureToggle#getComment(): comment [%s] // test [%s]\n", this.comment, comment); + return comment; + } + + @Override + public String getTranslatedName() + { + return StringUtils.getTranslatedOrFallback(this.translatedName, this.name); + } + @Override public String getStringValue() { @@ -301,26 +320,6 @@ public void setValueChangeCallback(IValueChangeCallback callback this.callback = callback; } - @Override - public String getComment() - { - String comment = StringUtils.getTranslatedOrFallback(this.comment, this.comment); - - if (comment != null && this.singlePlayer) - { - return comment + "\n" + StringUtils.translate("tweakeroo.label.config_comment.single_player_only"); - } - - //System.out.printf("FeatureToggle#getComment(): comment [%s] // test [%s]\n", this.comment, comment); - return comment; - } - - @Override - public String getTranslatedName() - { - return this.translatedName; - } - @Override public void setPrettyName(String s) { diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 248b30624..5e770728a 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -34,6 +34,6 @@ "depends": { "minecraft": ">=1.21 <=1.21.1", - "malilib": ">=0.21.3" + "malilib": ">=0.21.4" } }