fix rendering nametags on npcs

This commit is contained in:
The Biggest skiddd 2023-06-25 16:39:45 +02:00
parent 7e45377809
commit bd6151a7c6
14 changed files with 94629 additions and 3 deletions

View File

@ -465,6 +465,24 @@ public abstract class Render<T extends Entity>
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
GlStateManager.popMatrix(); GlStateManager.popMatrix();
} }
} else {
int i = fontrenderer.getStringWidth(str) / 2;
GlStateManager.disableTexture2D();
worldrenderer.begin(7, DefaultVertexFormats.POSITION_COLOR);
worldrenderer.pos((double)(-i - 1), (double)(-1 + b0), 0.0D).color(0.0F, 0.0F, 0.0F, 0.25F).endVertex();
worldrenderer.pos((double)(-i - 1), (double)(8 + b0), 0.0D).color(0.0F, 0.0F, 0.0F, 0.25F).endVertex();
worldrenderer.pos((double)(i + 1), (double)(8 + b0), 0.0D).color(0.0F, 0.0F, 0.0F, 0.25F).endVertex();
worldrenderer.pos((double)(i + 1), (double)(-1 + b0), 0.0D).color(0.0F, 0.0F, 0.0F, 0.25F).endVertex();
tessellator.draw();
GlStateManager.enableTexture2D();
fontrenderer.drawString(str, -fontrenderer.getStringWidth(str) / 2, b0, 553648127);
GlStateManager.enableDepth();
GlStateManager.depthMask(true);
fontrenderer.drawString(str, -fontrenderer.getStringWidth(str) / 2, b0, -1);
GlStateManager.enableLighting();
GlStateManager.disableBlend();
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
GlStateManager.popMatrix();
} }
} }
} }

File diff suppressed because it is too large Load Diff

View File

@ -1 +1 @@
{"stat.flyOneCm":1930,"stat.walkOneCm":1838,"stat.jump":11,"stat.playOneMinute":3547,"stat.timeSinceDeath":3547,"stat.sprintOneCm":1043,"achievement.exploreAllBiomes":{"value":0,"progress":["Desert"]}} {"stat.flyOneCm":1930,"stat.walkOneCm":2000,"stat.jump":11,"stat.playOneMinute":5003,"stat.leaveGame":1,"stat.timeSinceDeath":5003,"stat.sprintOneCm":1117,"achievement.exploreAllBiomes":{"value":0,"progress":["Desert"]}}

View File

@ -253,8 +253,8 @@
"bind": 0, "bind": 0,
"hud": {"scoreboard": { "hud": {"scoreboard": {
"visible": true, "visible": true,
"x": 880, "x": 842,
"y": 212, "y": 225,
"scale": 1 "scale": 1
}}, }},
"bindtype": "Toggle", "bindtype": "Toggle",