From 7315266bdd84a2c0ec68f0934830a093c36dd995 Mon Sep 17 00:00:00 2001 From: inglettronald Date: Fri, 19 May 2023 05:39:34 -0500 Subject: Added stuff for pitch/yaw outside garden --- src/main/java/dulkirmod/mixins/MixinEntityRenderer.java | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/main/java/dulkirmod') diff --git a/src/main/java/dulkirmod/mixins/MixinEntityRenderer.java b/src/main/java/dulkirmod/mixins/MixinEntityRenderer.java index d8cb05c..f754f2c 100644 --- a/src/main/java/dulkirmod/mixins/MixinEntityRenderer.java +++ b/src/main/java/dulkirmod/mixins/MixinEntityRenderer.java @@ -1,6 +1,7 @@ package dulkirmod.mixins; import dulkirmod.features.HurtCamSlider; +import dulkirmod.features.ViewBobbing; import net.minecraft.client.renderer.EntityRenderer; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; @@ -15,4 +16,10 @@ public class MixinEntityRenderer { if (HurtCamSlider.INSTANCE.renderHurt(partialTicks)) ci.cancel(); } + + @Inject(method = "setupViewBobbing", at = @At("HEAD"), cancellable = true) + private void modifyViewBobbing(float partialTicks, CallbackInfo ci) { + if (ViewBobbing.INSTANCE.renderBob(partialTicks)) + ci.cancel(); + } } -- cgit