修复无人机视角实体显示名称问题
This commit is contained in:
parent
fd1a829823
commit
f6eb2c18ac
1 changed files with 4 additions and 1 deletions
|
@ -125,8 +125,11 @@ public class DroneUIOverlay {
|
|||
|
||||
if (lookAtEntity) {
|
||||
// 实体距离
|
||||
var displayName = lookingEntity.getDisplayName();
|
||||
if (displayName == null) displayName = Component.literal("");
|
||||
|
||||
guiGraphics.drawString(mc.font, Component.translatable("tips.superbwarfare.drone.range")
|
||||
.append(Component.literal(FormatTool.format1D(entityRange, "m ") + lookingEntity.getDisplayName())),
|
||||
.append(Component.literal(FormatTool.format1D(entityRange, "m ") + displayName.getString())),
|
||||
w / 2 + 12, h / 2 - 28, color, false);
|
||||
} else {
|
||||
// 方块距离
|
||||
|
|
Loading…
Add table
Reference in a new issue