aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client
diff options
context:
space:
mode:
authorModMaker101 <119018978+ModMaker101@users.noreply.github.com>2026-03-04 12:24:42 -0500
committerGitHub <noreply@github.com>2026-03-05 00:24:42 +0700
commit870d3e4b6854215ff4c0e2aa449e3835e1e37327 (patch)
treeef7348f00b8269b1069d32419b304229f3bd8c91 /Minecraft.Client
parent1dc8a005ed111463c22c17b487e5ec8a3e2d30f3 (diff)
Fix mob nametag position to match correct height offset #422 (#440)
Diffstat (limited to 'Minecraft.Client')
-rw-r--r--Minecraft.Client/LivingEntityRenderer.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Minecraft.Client/LivingEntityRenderer.cpp b/Minecraft.Client/LivingEntityRenderer.cpp
index 89d65614..757948a3 100644
--- a/Minecraft.Client/LivingEntityRenderer.cpp
+++ b/Minecraft.Client/LivingEntityRenderer.cpp
@@ -487,11 +487,11 @@ void LivingEntityRenderer::renderNameTag(shared_ptr<LivingEntity> mob, const wst
Font *font = getFont();
- float size = 1.60f;
- float s = 1 / 60.0f * size;
+ constexpr float size = 1.60f;
+ constexpr float s = 1 / 60.0f * size;
glPushMatrix();
- glTranslatef((float) x + 0, (float) y + 2.3f, (float) z);
+ glTranslatef(static_cast<float>(x) + 0, static_cast<float>(y) + mob->bbHeight + 0.5f, static_cast<float>(z));
glNormal3f(0, 1, 0);
glRotatef(-this->entityRenderDispatcher->playerRotY, 0, 1, 0);