Skip to content

Commit c3c9a92

Browse files
committed
Use machine casing translations instead of casing id
1 parent 574d9b9 commit c3c9a92

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/client/java/aztech/modern_industrialization/items/client/ClientStructureMemberBlockTooltip.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ public int height(Font font) {
305305

306306
@Override
307307
public int width(Font font) {
308-
return font.width(label) + 20 + font.width(Component.literal(casing.key.toString()));
308+
return font.width(label) + 20 + font.width(casing.getDisplayName());
309309
}
310310

311311
@Override
@@ -317,8 +317,8 @@ public void renderImage(Font font, int x, int y, GuiGraphics graphics) {
317317
public void renderText(Font font, int x, int y, Matrix4f matrix, MultiBufferSource.BufferSource buffer) {
318318
font.drawInBatch(label, x, y + 5, -1, true, matrix, buffer, Font.DisplayMode.NORMAL, 0, 0xF000F0);
319319

320-
font.drawInBatch(Component.literal(casing.key.toString()), x + font.width(label) + 20, y + 5, -1, true, matrix, buffer,
321-
Font.DisplayMode.NORMAL, 0, 0xF000F0);
320+
font.drawInBatch(casing.getDisplayName().copy().withStyle(MITooltips.DEFAULT_STYLE), x + font.width(label) + 20, y + 5, -1, true, matrix, buffer, Font.DisplayMode.NORMAL, 0,
321+
0xF000F0);
322322
}
323323
}
324324
}

0 commit comments

Comments
 (0)