From 91d137c9b80243165e545efbc8962d3a6d0421ab Mon Sep 17 00:00:00 2001 From: Vlad Date: Tue, 27 Sep 2022 15:11:58 +0200 Subject: [PATCH] update ETF version --- gradle.properties | 4 +-- .../java/net/puzzlemc/gui/PuzzleClient.java | 33 ++++++++----------- 2 files changed, 15 insertions(+), 22 deletions(-) diff --git a/gradle.properties b/gradle.properties index b3704b3..1b0e947 100755 --- a/gradle.properties +++ b/gradle.properties @@ -16,7 +16,7 @@ org.gradle.jvmargs=-Xmx4G # currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api fabric_version=0.57.0+1.18.2 mod_menu_version = 2.0.13 - + cull_leaves_version = 2.3.3 ldl_version = 2.1.0+1.17 lbg_version = 1.2.3+1.18 @@ -32,4 +32,4 @@ org.gradle.jvmargs=-Xmx4G complete_config_version = 1.0.0 spruceui_version=3.3.3+1.18 midnightlib_version=0.4.4 - entitytexturefeatures_version=3.1.4-mc1.18 + entitytexturefeatures_version=4.1.1.fabric_18 diff --git a/puzzle-gui/src/main/java/net/puzzlemc/gui/PuzzleClient.java b/puzzle-gui/src/main/java/net/puzzlemc/gui/PuzzleClient.java index dd0b81e..0a758b0 100755 --- a/puzzle-gui/src/main/java/net/puzzlemc/gui/PuzzleClient.java +++ b/puzzle-gui/src/main/java/net/puzzlemc/gui/PuzzleClient.java @@ -28,10 +28,9 @@ import net.minecraft.text.Text; import net.minecraft.util.Formatting; import net.puzzlemc.splashscreen.PuzzleSplashScreen; import shcm.shsupercm.fabric.citresewn.config.CITResewnConfig; -import traben.entity_texture_features.client.ETFClient; +import traben.entity_texture_features.ETFApi; import traben.entity_texture_features.config.ETFConfig; import io.github.kvverti.colormatic.ColormaticConfig; -import traben.entity_texture_features.config.ETFConfigScreen; public class PuzzleClient implements ClientModInitializer { @@ -258,33 +257,27 @@ public class PuzzleClient implements ClientModInitializer { }); } if (FabricLoader.getInstance().isModLoaded("entity_texture_features") && !PuzzleConfig.disabledIntegrations.contains("entity_texture_features")) { - PuzzleApi.addToResourceOptions(new PuzzleWidget(new TranslatableText("config.etf.title"))); - ETFConfig etfConfig = ETFClient.ETFConfigData; - ETFConfigScreen etfConfigScreen = new ETFConfigScreen(); - PuzzleApi.addToResourceOptions(new PuzzleWidget(new TranslatableText("config.etf.enable_custom_textures.title"), (button) -> button.setMessage(etfConfig.enableCustomTextures ? YES : NO), (button) -> { + PuzzleApi.addToResourceOptions(new PuzzleWidget(new TranslatableText("config.entity_texture_features.title"))); + ETFConfig etfConfig = ETFApi.getETFConfigObject; + PuzzleApi.addToResourceOptions(new PuzzleWidget(new TranslatableText("config.entity_texture_features.enable_custom_textures.title"), (button) -> button.setMessage(etfConfig.enableCustomTextures ? YES : NO), (button) -> { etfConfig.enableCustomTextures = !etfConfig.enableCustomTextures; - etfConfigScreen.saveConfig(); - etfConfigScreen.resetVisuals(); + ETFApi.saveETFConfigChangesAndResetETF(); })); - PuzzleApi.addToResourceOptions(new PuzzleWidget(new TranslatableText("config.etf.enable_emissive_textures.title"), (button) -> button.setMessage(etfConfig.enableEmissiveTextures ? YES : NO), (button) -> { + PuzzleApi.addToResourceOptions(new PuzzleWidget(new TranslatableText("config.entity_texture_features.enable_emissive_textures.title"), (button) -> button.setMessage(etfConfig.enableEmissiveTextures ? YES : NO), (button) -> { etfConfig.enableEmissiveTextures = !etfConfig.enableEmissiveTextures; - etfConfigScreen.saveConfig(); - etfConfigScreen.resetVisuals(); + ETFApi.saveETFConfigChangesAndResetETF(); })); - PuzzleApi.addToResourceOptions(new PuzzleWidget(Text.of("Emissive Texture Rendering Mode"), (button) -> button.setMessage(etfConfig.fullBrightEmissives ? Text.of("Brighter") : Text.of("Default")), (button) -> { + PuzzleApi.addToResourceOptions(new PuzzleWidget(new TranslatableText("config.entity_texture_features.full_bright_emissives.title"), (button) -> button.setMessage(etfConfig.fullBrightEmissives ? Text.of("Brighter") : Text.of("Default")), (button) -> { etfConfig.fullBrightEmissives = !etfConfig.fullBrightEmissives ; - etfConfigScreen.saveConfig(); - etfConfigScreen.resetVisuals(); + ETFApi.saveETFConfigChangesAndResetETF(); })); - PuzzleApi.addToResourceOptions(new PuzzleWidget(new TranslatableText("config.etf.blinking_mob_settings.title"), (button) -> button.setMessage(etfConfig.enableBlinking ? YES : NO), (button) -> { + PuzzleApi.addToResourceOptions(new PuzzleWidget(new TranslatableText("config.entity_texture_features.blinking_mob_settings.title"), (button) -> button.setMessage(etfConfig.enableBlinking ? YES : NO), (button) -> { etfConfig.enableBlinking = !etfConfig.enableBlinking; - etfConfigScreen.saveConfig(); - etfConfigScreen.resetVisuals(); + ETFApi.saveETFConfigChangesAndResetETF(); })); - PuzzleApi.addToResourceOptions(new PuzzleWidget(Text.of("Enable Player Skin Features"), (button) -> button.setMessage(etfConfig.skinFeaturesEnabled ? YES : NO), (button) -> { + PuzzleApi.addToResourceOptions(new PuzzleWidget(new TranslatableText("config.entity_texture_features.player_skin_features.title"), (button) -> button.setMessage(etfConfig.skinFeaturesEnabled ? YES : NO), (button) -> { etfConfig.skinFeaturesEnabled = !etfConfig.skinFeaturesEnabled; - etfConfigScreen.saveConfig(); - etfConfigScreen.resetVisuals(); + ETFApi.saveETFConfigChangesAndResetETF(); })); } lateInitDone = true;