Fix GeneratingKineticTileEntity rendering the gui overlay crashing the game

This commit is contained in:
grimmauld 2020-10-04 00:05:33 +02:00
parent a15937b5fc
commit 37a61ef0e4

View file

@ -69,9 +69,10 @@ public abstract class GeneratingKineticTileEntity extends KineticTileEntity {
speed = Math.abs(speed);
float stressTotal = stressBase * speed;
String stressString = spacing + "%s%s" + Lang.translate("generic.unit.stress") + " " + TextFormatting.DARK_GRAY + "%s";
// FIXME add colours back
String stressString = spacing + "%s" + Lang.translate("generic.unit.stress").getUnformattedComponentText() + " %s";
tooltip.add(ITextComponent.of(String.format(stressString, IHaveGoggleInformation.format(stressBase), Lang.translate("gui.goggles.base_value").getUnformattedComponentText())));
tooltip.add(ITextComponent.of(String.format(stressString, TextFormatting.GRAY, IHaveGoggleInformation.format(stressTotal), Lang.translate("gui.goggles.at_current_speed").getUnformattedComponentText())));
tooltip.add(ITextComponent.of(String.format(stressString, IHaveGoggleInformation.format(stressTotal), Lang.translate("gui.goggles.at_current_speed").getUnformattedComponentText())));
added = true;
}