Skip to content

Commit

Permalink
let blood vision render invisible entities
Browse files Browse the repository at this point in the history
  • Loading branch information
Cheaterpaul committed Jun 7, 2024
1 parent f3f398a commit 8ea28b7
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,16 @@ public void onRenderLivingPost(RenderLivingEvent.@NotNull Post<?, ?> event) {
float f = Mth.lerp(event.getPartialTick(), entity.yRotO, entity.getYRot());
isInsideBloodVisionRendering = true;
EntityRenderer<? super Entity> entityrenderer = renderManager.getRenderer(entity);

// force entity to be rendered without nametag
boolean isInvisible = entity.isInvisible();
entity.setInvisible(false);
boolean hideGui = Minecraft.getInstance().options.hideGui;
Minecraft.getInstance().options.hideGui = true;
entityrenderer.render(entity, f, event.getPartialTick(), event.getPoseStack(), bloodVisionBuffer, renderManager.getPackedLightCoords(entity, event.getPartialTick()));
entity.setInvisible(isInvisible);
Minecraft.getInstance().options.hideGui = hideGui;

mc.getMainRenderTarget().bindWrite(false);
isInsideBloodVisionRendering = false;

Expand Down

0 comments on commit 8ea28b7

Please sign in to comment.