Skip to content

Commit

Permalink
fix player rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
okx-code committed Nov 17, 2024
1 parent 33990b3 commit 1c341ec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions common/src/main/java/sh/okx/civmodern/common/radar/Radar.java
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ private void renderPlayers(GuiGraphics guiGraphics, float delta) {
RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1);

guiGraphics.pose().pushPose();
guiGraphics.pose().translate(dx * v, dz * v, 0);
guiGraphics.pose().translate(dx * v, dz * v, 211);
guiGraphics.pose().scale(0.9f, 0.9f, 0);

PlayerInfo entry = minecraft.player.connection.getPlayerInfo(player.getUUID());
Expand All @@ -351,7 +351,7 @@ private void renderPlayers(GuiGraphics guiGraphics, float delta) {
guiGraphics.pose().scale(0.6f, 0.6f, 0);
Component component = Component.literal(
player.getScoreboardName() + " (" + (hideY() ? ((int) Math.round(Math.sqrt(dx * dx + dz * dz))) : (int) player.getY()) + ")");
minecraft.font.drawInBatch(component, -minecraft.font.width(component) / 2f, 7, 0xffffff, false, guiGraphics.pose().last().pose(), guiGraphics.bufferSource(), Font.DisplayMode.NORMAL, 0, 0xff);
guiGraphics.drawCenteredString(minecraft.font, component, 0, 7, 0xffffff);

guiGraphics.pose().popPose();
}
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ org.gradle.jvmargs=-Xmx3072M

archives_base_name=civmodern
maven_group=sh.okx.civmodern
mod_version=1.6.5
mod_version=1.6.6
mod_name=CivModern
mod_description=Radar and civ utilities
mod_authors=Okx,Protonull
Expand Down

0 comments on commit 1c341ec

Please sign in to comment.