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. --- .../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 ++++++------ 6 files changed, 59 insertions(+), 19 deletions(-) (limited to 'src/main/java/com/anthonyhilyard') 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