From cdb5e60f52eea9030af9ca2d4a49913664023965 Mon Sep 17 00:00:00 2001 From: Linnea Gräf Date: Wed, 4 Dec 2024 16:48:46 +0100 Subject: feat: Hide incorrect REI warning Fixes https://github.com/nea89o/Firmament/issues/52 --- .../mixins/compat/HideREIRecipeWarning.java | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/compat/rei/java/moe/nea/firmament/mixins/compat/HideREIRecipeWarning.java (limited to 'src') diff --git a/src/compat/rei/java/moe/nea/firmament/mixins/compat/HideREIRecipeWarning.java b/src/compat/rei/java/moe/nea/firmament/mixins/compat/HideREIRecipeWarning.java new file mode 100644 index 0000000..14eeaf2 --- /dev/null +++ b/src/compat/rei/java/moe/nea/firmament/mixins/compat/HideREIRecipeWarning.java @@ -0,0 +1,20 @@ +package moe.nea.firmament.mixins.compat; + +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.Pseudo; +import org.spongepowered.asm.mixin.Shadow; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; + +@Mixin(targets = "me.shedaniel.rei.impl.client.gui.hints.ImportantWarningsWidget") +@Pseudo +public class HideREIRecipeWarning { + @Shadow + private boolean visible; + + @Inject(method = "", at = @At("TAIL")) + private void onCreateImportantWidget(CallbackInfo ci) { + visible = false; + } +} -- cgit