5656import org .objectweb .asm .Opcodes ;
5757import org .spongepowered .asm .mixin .Mixin ;
5858import org .spongepowered .asm .mixin .Shadow ;
59+ import org .spongepowered .asm .mixin .Unique ;
5960import org .spongepowered .asm .mixin .injection .At ;
6061import org .spongepowered .asm .mixin .injection .At .Shift ;
6162import org .spongepowered .asm .mixin .injection .Inject ;
@@ -79,7 +80,10 @@ public abstract class GameRendererMixin {
7980 private float fogBlue ;
8081 @ Shadow
8182 private boolean thickFog ;
83+ @ Unique
8284 private float cachedMouseFactor ;
85+ @ Shadow
86+ private boolean renderingPanorama ;
8387
8488 @ Inject (method = "render" , at = @ At (value = "FIELD" , target = "Lnet/minecraft/client/MouseInput;x:I" ), locals = LocalCapture .CAPTURE_FAILEXCEPTION )
8589 public void axolotlclient$rawMouseInput (float tickDelta , long nanoTime , CallbackInfo ci , boolean displayActive , float f ,
@@ -171,8 +175,13 @@ public abstract class GameRendererMixin {
171175 @ Shadow
172176 protected abstract FloatBuffer updateFogColorBuffer (float red , float green , float blue , float alpha );
173177
174- @ Inject (method = "getFov" , at = @ At (value = "RETURN" , ordinal = 1 ), cancellable = true )
178+ @ Inject (method = "getFov" , at = @ At (value = "RETURN" ), cancellable = true )
175179 public void axolotlclient$setZoom (float tickDelta , boolean changingFov , CallbackInfoReturnable <Float > cir ) {
180+
181+ if (renderingPanorama ) {
182+ return ;
183+ }
184+
176185 Zoom .update ();
177186
178187 float returnValue = cir .getReturnValue ();
@@ -298,8 +307,8 @@ public abstract class GameRendererMixin {
298307 }
299308
300309 @ Inject (method = "bobViewWhenHurt" , at = @ At (value = "INVOKE" , target = "Lnet/minecraft/client/MinecraftClient;getCameraEntity()Lnet/minecraft/entity/Entity;" , ordinal = 1 ), cancellable = true )
301- private void axolotlclient$noHurtCam (float f , CallbackInfo ci ){
302- if (AxolotlClient .CONFIG .noHurtCam .get ()){
310+ private void axolotlclient$noHurtCam (float f , CallbackInfo ci ) {
311+ if (AxolotlClient .CONFIG .noHurtCam .get ()) {
303312 ci .cancel ();
304313 }
305314 }
0 commit comments