Skip to content

Commit

Permalink
fix GUI error because LDLib is dumb
Browse files Browse the repository at this point in the history
  • Loading branch information
screret committed Aug 16, 2024
1 parent 74d3273 commit 0e79987
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -893,7 +893,7 @@ public List<BlockPos> getSeatPositions() {
return this.entityData.get(SEAT_POSITIONS);
}

public Component getDisplayThrust() {
public String getDisplayThrust() {
ChatFormatting style;
var thrust = getRocketSpeed();

Expand All @@ -904,7 +904,8 @@ public Component getDisplayThrust() {
} else {
style = ChatFormatting.GREEN;
}
return Component.translatable("menu.gcyr.rocket.thrust", style + String.format("%.1f", thrust) + ChatFormatting.RESET);
var thrustComponent = Component.literal(String.format("%.1f", thrust)).withStyle(style);
return Component.translatable("menu.gcyr.rocket.thrust", thrustComponent).getString();
}

public double getRocketSpeed() {
Expand Down

0 comments on commit 0e79987

Please sign in to comment.