|
22 | 22 |
|
23 | 23 | package io.github.axolotlclient.mixin; |
24 | 24 |
|
| 25 | +import java.nio.FloatBuffer; |
| 26 | + |
| 27 | +import org.lwjgl.opengl.GL11; |
| 28 | +import org.lwjgl.opengl.GLContext; |
| 29 | +import org.objectweb.asm.Opcodes; |
| 30 | +import org.spongepowered.asm.mixin.Mixin; |
| 31 | +import org.spongepowered.asm.mixin.Shadow; |
| 32 | +import org.spongepowered.asm.mixin.injection.At; |
| 33 | +import org.spongepowered.asm.mixin.injection.At.Shift; |
| 34 | +import org.spongepowered.asm.mixin.injection.Inject; |
| 35 | +import org.spongepowered.asm.mixin.injection.Redirect; |
| 36 | +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; |
| 37 | +import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; |
| 38 | +import org.spongepowered.asm.mixin.injection.callback.LocalCapture; |
| 39 | + |
25 | 40 | import com.mojang.blaze3d.platform.GLX; |
26 | 41 | import com.mojang.blaze3d.platform.GlStateManager; |
| 42 | + |
27 | 43 | import io.github.axolotlclient.AxolotlClient; |
28 | 44 | import io.github.axolotlclient.modules.freelook.Freelook; |
29 | 45 | import io.github.axolotlclient.modules.hud.HudManager; |
30 | 46 | import io.github.axolotlclient.modules.hud.gui.hud.vanilla.CrosshairHud; |
| 47 | +import io.github.axolotlclient.modules.hypixel.skyblock.Skyblock; |
31 | 48 | import io.github.axolotlclient.modules.motionblur.MotionBlur; |
32 | 49 | import io.github.axolotlclient.modules.sky.SkyboxManager; |
33 | 50 | import io.github.axolotlclient.modules.zoom.Zoom; |
34 | | -import io.github.axolotlclient.util.Util; |
35 | 51 | import net.minecraft.block.Block; |
36 | 52 | import net.minecraft.block.material.Material; |
37 | 53 | import net.minecraft.client.MinecraftClient; |
38 | 54 | import net.minecraft.client.MouseInput; |
39 | 55 | import net.minecraft.client.options.GameOptions; |
40 | 56 | import net.minecraft.client.render.Camera; |
41 | 57 | import net.minecraft.client.render.GameRenderer; |
42 | | -import net.minecraft.client.util.Window; |
43 | 58 | import net.minecraft.enchantment.EnchantmentHelper; |
44 | 59 | import net.minecraft.entity.Entity; |
45 | 60 | import net.minecraft.entity.LivingEntity; |
46 | 61 | import net.minecraft.entity.effect.StatusEffect; |
47 | 62 | import net.minecraft.entity.player.ClientPlayerEntity; |
48 | | -import org.lwjgl.opengl.GL11; |
49 | | -import org.lwjgl.opengl.GLContext; |
50 | | -import org.objectweb.asm.Opcodes; |
51 | | -import org.spongepowered.asm.mixin.Mixin; |
52 | | -import org.spongepowered.asm.mixin.Shadow; |
53 | | -import org.spongepowered.asm.mixin.injection.At; |
54 | | -import org.spongepowered.asm.mixin.injection.At.Shift; |
55 | | -import org.spongepowered.asm.mixin.injection.Inject; |
56 | | -import org.spongepowered.asm.mixin.injection.Redirect; |
57 | | -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; |
58 | | -import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; |
59 | | -import org.spongepowered.asm.mixin.injection.callback.LocalCapture; |
60 | | - |
61 | | -import java.nio.FloatBuffer; |
62 | 63 |
|
63 | 64 | @Mixin(GameRenderer.class) |
64 | 65 | public abstract class GameRendererMixin { |
@@ -238,10 +239,10 @@ public void motionBlur(float tickDelta, long nanoTime, CallbackInfo ci) { |
238 | 239 | } |
239 | 240 |
|
240 | 241 | @Redirect(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/player/ClientPlayerEntity;increaseTransforms(FF)V")) |
241 | | - public void updateFreelook(ClientPlayerEntity entity, float yaw, float pitch) { |
| 242 | + public void updateRotation(ClientPlayerEntity entity, float yaw, float pitch) { |
242 | 243 | Freelook freelook = Freelook.getInstance(); |
243 | 244 |
|
244 | | - if (freelook.consumeRotation(yaw, pitch)) |
| 245 | + if (freelook.consumeRotation(yaw, pitch) || Skyblock.getInstance().rotationLocked.get()) |
245 | 246 | return; |
246 | 247 |
|
247 | 248 | entity.increaseTransforms(yaw, pitch); |
|
0 commit comments