From 6d01463c32ea14f48ce273e9daf753905f101946 Mon Sep 17 00:00:00 2001 From: Anthony Hilyard Date: Sun, 24 Jul 2022 23:22:06 -0700 Subject: Added support for latest Forge and Configured. --- build.gradle | 2 +- gradle.properties | 4 +-- .../iceberg/mixin/ConfiguredConfigHelperMixin.java | 2 +- .../ConfiguredModConfigSelectionScreenMixin.java | 18 ++++++----- .../com/anthonyhilyard/iceberg/util/GuiHelper.java | 36 ++++++++++++++++++++++ .../com/anthonyhilyard/iceberg/util/ItemColor.java | 1 + .../com/anthonyhilyard/iceberg/util/Selectors.java | 2 +- .../com/anthonyhilyard/iceberg/util/Tooltips.java | 19 ++++++------ src/main/resources/META-INF/mods.toml | 2 +- 9 files changed, 63 insertions(+), 23 deletions(-) diff --git a/build.gradle b/build.gradle index 73cd42a..2d142c6 100644 --- a/build.gradle +++ b/build.gradle @@ -60,7 +60,7 @@ dependencies { minecraft "net.minecraftforge:forge:${project.mcVersion}-${project.forgeVersion}" annotationProcessor 'org.spongepowered:mixin:0.8.5:processor' compileClasspath fg.deobf('curse.maven:configmenusforge-544048:3570070') - compileClasspath fg.deobf('curse.maven:configured-457570:3822820') + compileClasspath fg.deobf('curse.maven:configured-457570:3872190') } jar { diff --git a/gradle.properties b/gradle.properties index 239dfec..3de623b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,6 +6,6 @@ org.gradle.daemon=false name=${rootProject.name} group=com.anthonyhilyard.${name.toLowerCase()} author=anthonyhilyard -version=1.0.45 +version=1.0.46 mcVersion=1.19 -forgeVersion=41.0.30 \ No newline at end of file +forgeVersion=41.0.110 \ No newline at end of file diff --git a/src/main/java/com/anthonyhilyard/iceberg/mixin/ConfiguredConfigHelperMixin.java b/src/main/java/com/anthonyhilyard/iceberg/mixin/ConfiguredConfigHelperMixin.java index 682fcb8..9918740 100644 --- a/src/main/java/com/anthonyhilyard/iceberg/mixin/ConfiguredConfigHelperMixin.java +++ b/src/main/java/com/anthonyhilyard/iceberg/mixin/ConfiguredConfigHelperMixin.java @@ -25,7 +25,7 @@ import com.mrcrayfish.configured.util.ConfigHelper; public class ConfiguredConfigHelperMixin { @Inject(method = "gatherAllConfigValues(Lnet/minecraftforge/fml/config/ModConfig;)Ljava/util/List;", - at = @At(value = "HEAD"), cancellable = true, remap = false) + at = @At(value = "HEAD"), cancellable = true, remap = false, require = 0) private static void gatherAllConfigValuesIcebergSupport(ModConfig config, CallbackInfoReturnable> info) { if (config.getSpec() instanceof IcebergConfigSpec icebergConfigSpec) diff --git a/src/main/java/com/anthonyhilyard/iceberg/mixin/ConfiguredModConfigSelectionScreenMixin.java b/src/main/java/com/anthonyhilyard/iceberg/mixin/ConfiguredModConfigSelectionScreenMixin.java index a682a00..1d0882a 100644 --- a/src/main/java/com/anthonyhilyard/iceberg/mixin/ConfiguredModConfigSelectionScreenMixin.java +++ b/src/main/java/com/anthonyhilyard/iceberg/mixin/ConfiguredModConfigSelectionScreenMixin.java @@ -1,6 +1,8 @@ package com.anthonyhilyard.iceberg.mixin; import java.lang.reflect.Field; +import java.util.List; +import java.util.ArrayList; import com.anthonyhilyard.iceberg.Loader; import com.anthonyhilyard.iceberg.config.IcebergConfigSpec; @@ -56,7 +58,7 @@ public class ConfiguredModConfigSelectionScreenMixin @Shadow(remap = false) private boolean hasRequiredPermission() { return true; } - @Inject(method = "createModifyButton", at = @At(value = "HEAD"), remap = false, cancellable = true) + @Inject(method = "createModifyButton", at = @At(value = "HEAD"), remap = false, cancellable = true, require = 0) private void createModifyButton(ModConfig config, CallbackInfoReturnable