55
66package meteordevelopment .meteorclient .mixin ;
77
8+ import com .llamalad7 .mixinextras .sugar .Local ;
89import meteordevelopment .meteorclient .mixininterface .ICamera ;
910import meteordevelopment .meteorclient .systems .modules .Modules ;
1011import meteordevelopment .meteorclient .systems .modules .render .CameraTweaks ;
@@ -37,9 +38,6 @@ public abstract class CameraMixin implements ICamera {
3738
3839 @ Shadow protected abstract void setRotation (float yaw , float pitch );
3940
40- @ Unique
41- private float tickDelta ;
42-
4341 @ Inject (method = "getSubmersionType" , at = @ At ("HEAD" ), cancellable = true )
4442 private void getSubmergedFluidState (CallbackInfoReturnable <CameraSubmersionType > ci ) {
4543 if (Modules .get ().get (NoRender .class ).noLiquidOverlay ()) ci .setReturnValue (CameraSubmersionType .NONE );
@@ -60,11 +58,6 @@ private void onClipToSpace(float desiredCameraDistance, CallbackInfoReturnable<F
6058 }
6159 }
6260
63- @ Inject (method = "update" , at = @ At ("HEAD" ))
64- private void onUpdateHead (BlockView area , Entity focusedEntity , boolean thirdPerson , boolean inverseView , float tickDelta , CallbackInfo info ) {
65- this .tickDelta = tickDelta ;
66- }
67-
6861 @ Inject (method = "update" , at = @ At ("TAIL" ))
6962 private void onUpdateTail (BlockView area , Entity focusedEntity , boolean thirdPerson , boolean inverseView , float tickDelta , CallbackInfo info ) {
7063 if (Modules .get ().isActive (Freecam .class )) {
@@ -73,7 +66,7 @@ private void onUpdateTail(BlockView area, Entity focusedEntity, boolean thirdPer
7366 }
7467
7568 @ ModifyArgs (method = "update" , at = @ At (value = "INVOKE" , target = "Lnet/minecraft/client/render/Camera;setPos(DDD)V" ))
76- private void onUpdateSetPosArgs (Args args ) {
69+ private void onUpdateSetPosArgs (Args args , @ Local ( argsOnly = true ) float tickDelta ) {
7770 Freecam freecam = Modules .get ().get (Freecam .class );
7871
7972 if (freecam .isActive ()) {
@@ -84,7 +77,7 @@ private void onUpdateSetPosArgs(Args args) {
8477 }
8578
8679 @ ModifyArgs (method = "update" , at = @ At (value = "INVOKE" , target = "Lnet/minecraft/client/render/Camera;setRotation(FF)V" ))
87- private void onUpdateSetRotationArgs (Args args ) {
80+ private void onUpdateSetRotationArgs (Args args , @ Local ( argsOnly = true ) float tickDelta ) {
8881 Freecam freecam = Modules .get ().get (Freecam .class );
8982 FreeLook freeLook = Modules .get ().get (FreeLook .class );
9083
0 commit comments