From a81bc67e90df2fddb8e2b8ad5ac6e13cf7c81032 Mon Sep 17 00:00:00 2001 From: Wyvest <45589059+Wyvest@users.noreply.github.com> Date: Sat, 2 Jul 2022 07:38:22 +0700 Subject: pass a UMatrixStack in HUD API From 1.17+, most matrix transformations can only be done with a MatrixStack instance, thus to prepare for a OneConfig 1.17+ port this has been done. --- .../cc/polyfrost/oneconfig/internal/mixin/GuiIngameForgeMixin.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'versions/1.12.2-forge/src/main/java/cc/polyfrost/oneconfig') diff --git a/versions/1.12.2-forge/src/main/java/cc/polyfrost/oneconfig/internal/mixin/GuiIngameForgeMixin.java b/versions/1.12.2-forge/src/main/java/cc/polyfrost/oneconfig/internal/mixin/GuiIngameForgeMixin.java index 6c615c8..775e055 100644 --- a/versions/1.12.2-forge/src/main/java/cc/polyfrost/oneconfig/internal/mixin/GuiIngameForgeMixin.java +++ b/versions/1.12.2-forge/src/main/java/cc/polyfrost/oneconfig/internal/mixin/GuiIngameForgeMixin.java @@ -2,6 +2,7 @@ package cc.polyfrost.oneconfig.internal.mixin; import cc.polyfrost.oneconfig.events.EventManager; import cc.polyfrost.oneconfig.events.event.HudRenderEvent; +import cc.polyfrost.oneconfig.libs.universal.UMatrixStack; import net.minecraftforge.client.GuiIngameForge; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; @@ -12,6 +13,6 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; public class GuiIngameForgeMixin { @Inject(method = "renderGameOverlay", at = @At(value = "INVOKE", target = "Lnet/minecraftforge/client/GuiIngameForge;post(Lnet/minecraftforge/client/event/RenderGameOverlayEvent$ElementType;)V", shift = At.Shift.AFTER, remap = false), remap = true) private void onRenderGameOverlay(float partialTicks, CallbackInfo ci) { - EventManager.INSTANCE.post(new HudRenderEvent(partialTicks)); + EventManager.INSTANCE.post(new HudRenderEvent(new UMatrixStack(), partialTicks)); } } \ No newline at end of file -- cgit