From f2ce1081e1adc9df337949f82097762ada84fdbd Mon Sep 17 00:00:00 2001 From: Phoupraw <467934387@qq.com> Date: Tue, 31 Jan 2023 23:35:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20#1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mixin/MixinAnimatedKineticsWidget.java | 31 +++++++++++++++++++ .../mixin/MixinWidgetUtil_1.java | 31 +++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 src/main/java/phoupraw/mcmod/createsdelight/mixin/MixinAnimatedKineticsWidget.java create mode 100644 src/main/java/phoupraw/mcmod/createsdelight/mixin/MixinWidgetUtil_1.java diff --git a/src/main/java/phoupraw/mcmod/createsdelight/mixin/MixinAnimatedKineticsWidget.java b/src/main/java/phoupraw/mcmod/createsdelight/mixin/MixinAnimatedKineticsWidget.java new file mode 100644 index 00000000..b5ecd66b --- /dev/null +++ b/src/main/java/phoupraw/mcmod/createsdelight/mixin/MixinAnimatedKineticsWidget.java @@ -0,0 +1,31 @@ +package phoupraw.mcmod.createsdelight.mixin; + +import com.simibubi.create.compat.rei.widgets.AnimatedKineticsWidget; +import net.minecraft.client.gui.Drawable; +import net.minecraft.client.gui.Element; +import net.minecraft.client.gui.ParentElement; +import net.minecraft.client.util.math.MatrixStack; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.Shadow; + +import java.util.List; +/** + * @see MixinWidgetUtil_1 + */ +@Mixin(AnimatedKineticsWidget.class) +public abstract class MixinAnimatedKineticsWidget implements ParentElement , Drawable { + @Shadow(remap = false) + public abstract void method_25394(MatrixStack matrices, int mouseX, int mouseY, float delta); + + @Override + public void render(MatrixStack matrices, int mouseX, int mouseY, float delta) { + method_25394(matrices, mouseX, mouseY, delta); + } + @Shadow(remap = false) + public abstract List method_25396(); + + @Override + public List children() { + return method_25396(); + } +} diff --git a/src/main/java/phoupraw/mcmod/createsdelight/mixin/MixinWidgetUtil_1.java b/src/main/java/phoupraw/mcmod/createsdelight/mixin/MixinWidgetUtil_1.java new file mode 100644 index 00000000..52f74f60 --- /dev/null +++ b/src/main/java/phoupraw/mcmod/createsdelight/mixin/MixinWidgetUtil_1.java @@ -0,0 +1,31 @@ +package phoupraw.mcmod.createsdelight.mixin; + +import net.minecraft.client.gui.Drawable; +import net.minecraft.client.gui.Element; +import net.minecraft.client.gui.ParentElement; +import net.minecraft.client.util.math.MatrixStack; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.Shadow; + +import java.util.List; +/** + * 修复Can't check the recipe of chocolate pie in jei alone #1[Crash] Open REI recipe screen #788 + */ +@Mixin(targets = "com.simibubi.create.compat.rei.category.WidgetUtil$1") +public abstract class MixinWidgetUtil_1 implements ParentElement ,Drawable{ + @Shadow(remap = false) + public abstract void method_25394(MatrixStack matrices, int mouseX, int mouseY, float delta); + + @Override + public void render(MatrixStack matrices, int mouseX, int mouseY, float delta) { + method_25394(matrices, mouseX, mouseY, delta); + } + + @Shadow(remap = false) + public abstract List method_25396(); + + @Override + public List children() { + return method_25396(); + } +}