From 0f1e0788b97ca254365d393ea532e6a0bf0a897c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?der=5Ffr=C3=BChling?= Date: Sun, 19 May 2024 16:12:58 -0700 Subject: [PATCH] correctly apply roll in CameraMixin --- .../minecraft/create/trainperspective/mixin/CameraMixin.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/src/main/java/net/derfruhling/minecraft/create/trainperspective/mixin/CameraMixin.java b/common/src/main/java/net/derfruhling/minecraft/create/trainperspective/mixin/CameraMixin.java index 025b314..e850164 100644 --- a/common/src/main/java/net/derfruhling/minecraft/create/trainperspective/mixin/CameraMixin.java +++ b/common/src/main/java/net/derfruhling/minecraft/create/trainperspective/mixin/CameraMixin.java @@ -33,7 +33,7 @@ public abstract class CameraMixin { @ModifyArg(method = "setRotation", at = @At(value = "INVOKE", target = "Lorg/joml/Quaternionf;rotationYXZ(FFF)Lorg/joml/Quaternionf;"), index = 2) private float modifyRoll(float original) { - return original + ctp$zRot; + return original + (ctp$zRot * Mth.DEG_TO_RAD); } @Inject(method = "setRotation", at = @At(value = "INVOKE", target = "Lorg/joml/Quaternionf;rotationYXZ(FFF)Lorg/joml/Quaternionf;", shift = At.Shift.AFTER))