From 49cbeb6c9b7cdc892520dfe3ac5c4d12351fce0d Mon Sep 17 00:00:00 2001 From: Hendrix-Shen Date: Sat, 18 Jan 2025 20:27:35 +0800 Subject: [PATCH] Fix mixin target - Also reduce injection required to workaround for unexpected break changes Signed-off-by: Hendrix-Shen --- .../fastSwitchMasaConfigGui/MixinGuiConfigBase.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/plusls/MasaGadget/mixin/mod_tweak/malilib/fastSwitchMasaConfigGui/MixinGuiConfigBase.java b/src/main/java/com/plusls/MasaGadget/mixin/mod_tweak/malilib/fastSwitchMasaConfigGui/MixinGuiConfigBase.java index ac6d4c4..3ed1947 100644 --- a/src/main/java/com/plusls/MasaGadget/mixin/mod_tweak/malilib/fastSwitchMasaConfigGui/MixinGuiConfigBase.java +++ b/src/main/java/com/plusls/MasaGadget/mixin/mod_tweak/malilib/fastSwitchMasaConfigGui/MixinGuiConfigBase.java @@ -22,6 +22,7 @@ //#if MC > 12006 //$$ import com.llamalad7.mixinextras.injector.v2.WrapWithCondition; //$$ import fi.dy.masa.malilib.gui.widgets.WidgetBase; +//$$ import org.spongepowered.asm.mixin.Dynamic; //$$ import org.spongepowered.asm.mixin.injection.At; //#endif @@ -99,12 +100,14 @@ protected MixinGuiConfigBase(int listX, int listY) { //#if MC > 12006 //$$ // Force blocking malilib's intrinsic dropdown list + //$$ @Dynamic //$$ @WrapWithCondition( - //$$ method = "initGui", + //$$ method = {"initGui", "buildConfigSwitcher"}, //$$ at = @At( //$$ value = "INVOKE", //$$ target = "Lfi/dy/masa/malilib/gui/GuiConfigsBase;addWidget(Lfi/dy/masa/malilib/gui/widgets/WidgetBase;)Lfi/dy/masa/malilib/gui/widgets/WidgetBase;" - //$$ ) + //$$ ), + //$$ require = 0 //$$ ) //$$ private boolean blockInherentDropdownList(GuiConfigsBase instance, WidgetBase widgetBase) { //$$ return !Configs.fastSwitchMasaConfigGui.getBooleanValue();