Skip to content

Commit

Permalink
Port of nametag render fix
Browse files Browse the repository at this point in the history
  • Loading branch information
AzureZhen committed Aug 21, 2022
1 parent 71d42f2 commit 6018d56
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ protected boolean hasLabel(T entity) {
if (d0 >= (double) (f * f)) {
return false;
} else {
return entity == this.dispatcher.targetedEntity && entity.hasCustomName();
return entity == this.dispatcher.targetedEntity && entity.hasCustomName() && MinecraftClient.isHudEnabled();
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ protected boolean hasLabel(Entity entity) {
if (d0 >= (double) (f * f)) {
return false;
} else {
return entity == this.dispatcher.targetedEntity && entity.hasCustomName();
return entity == this.dispatcher.targetedEntity && entity.hasCustomName() && MinecraftClient.isHudEnabled();
}
}

Expand Down Expand Up @@ -338,12 +338,12 @@ public <E extends Entity> void renderLeash(MobEntity entity, float partialTicks,
int s = entity.world.getLightLevel(LightType.SKY, blockPos);
int t = entity.world.getLightLevel(LightType.SKY, blockPos2);
for (u = 0; u <= 24; ++u) {
GeoReplacedEntityRenderer.renderLeashPiece(vertexConsumer, matrix4f, j, k, l, q, r, s, t, 0.025f, 0.025f, o, p, u,
false);
GeoReplacedEntityRenderer.renderLeashPiece(vertexConsumer, matrix4f, j, k, l, q, r, s, t, 0.025f, 0.025f, o,
p, u, false);
}
for (u = 24; u >= 0; --u) {
GeoReplacedEntityRenderer.renderLeashPiece(vertexConsumer, matrix4f, j, k, l, q, r, s, t, 0.025f, 0.0f, o, p, u,
true);
GeoReplacedEntityRenderer.renderLeashPiece(vertexConsumer, matrix4f, j, k, l, q, r, s, t, 0.025f, 0.0f, o,
p, u, true);
}
poseStack.pop();
}
Expand Down

0 comments on commit 6018d56

Please sign in to comment.