diff --git a/src/main/java/net/irisshaders/iris/mixin/entity_render_context/MixinEntityRenderer.java b/src/main/java/net/irisshaders/iris/mixin/entity_render_context/MixinEntityRenderer.java index 15da2555d7..b105e4525d 100644 --- a/src/main/java/net/irisshaders/iris/mixin/entity_render_context/MixinEntityRenderer.java +++ b/src/main/java/net/irisshaders/iris/mixin/entity_render_context/MixinEntityRenderer.java @@ -23,8 +23,8 @@ public class MixinEntityRenderer { @Unique private int lastId = -100; - @Inject(method = "renderNameTag", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/entity/Entity;getNameTagOffsetY()F")) - private void setNameTagId(T entity, Component component, PoseStack poseStack, MultiBufferSource multiBufferSource, int i, CallbackInfo ci) { + @Inject(method = "renderNameTag", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/entity/Entity;getViewYRot(F)F")) + private void setNameTagId(T entity, Component component, PoseStack poseStack, MultiBufferSource multiBufferSource, int i, float f, CallbackInfo ci) { Object2IntFunction entityIds = WorldRenderingSettings.INSTANCE.getEntityIds(); if (entityIds == null) { @@ -39,7 +39,7 @@ private void setNameTagId(T entity, Component component, PoseStack poseStack, Mu } @Inject(method = "renderNameTag", at = @At("RETURN")) - private void resetId(T entity, Component component, PoseStack poseStack, MultiBufferSource multiBufferSource, int i, CallbackInfo ci) { + private void resetId(T entity, Component component, PoseStack poseStack, MultiBufferSource multiBufferSource, int i, float f, CallbackInfo ci) { if (lastId != -100) { CapturedRenderingState.INSTANCE.setCurrentEntity(lastId); lastId = -100 ;