1616import gregtech .api .recipes .Recipe ;
1717import gregtech .api .recipes .RecipeMap ;
1818import gregtech .api .util .KeyUtil ;
19- import gregtech .api .util .TextFormattingUtil ;
2019import gregtech .common .ConfigHolder ;
2120
2221import net .minecraft .entity .player .EntityPlayer ;
@@ -102,14 +101,15 @@ private void resetTileAbilities() {
102101 @ Override
103102 protected void configureDisplayText (MultiblockUIBuilder builder ) {
104103 builder .setWorkingStatus (recipeMapWorkable .isWorkingEnabled (), recipeMapWorkable .isActive ())
105- .addCustom (keyManager -> {
104+ .addCustom (( keyManager , syncer ) -> {
106105 // custom steam tank line
107106 IFluidTank steamFluidTank = recipeMapWorkable .getSteamFluidTankCombined ();
108- if (steamFluidTank != null && steamFluidTank .getCapacity () > 0 ) {
109- String stored = TextFormattingUtil .formatNumbers (steamFluidTank .getFluidAmount ());
110- String capacity = TextFormattingUtil .formatNumbers (steamFluidTank .getCapacity ());
111-
112- IKey steamInfo = KeyUtil .string (TextFormatting .BLUE , "%s/%s L" , stored , capacity );
107+ int stored = syncer .syncInt (steamFluidTank .getFluidAmount ());
108+ int capacity = syncer .syncInt (steamFluidTank .getCapacity ());
109+ if (capacity > 0 ) {
110+ IKey steamInfo = KeyUtil .string (TextFormatting .BLUE , "%s/%s L" ,
111+ KeyUtil .number (stored ),
112+ KeyUtil .number (capacity ));
113113 IKey steamStored = KeyUtil .lang (TextFormatting .GRAY ,
114114 "gregtech.multiblock.steam.steam_stored" , steamInfo );
115115 keyManager .add (steamStored );
@@ -122,12 +122,12 @@ protected void configureDisplayText(MultiblockUIBuilder builder) {
122122
123123 @ Override
124124 protected void configureWarningText (MultiblockUIBuilder builder ) {
125- builder .addCustom (list -> {
126- if (isStructureFormed () && recipeMapWorkable .isHasNotEnoughEnergy ()) {
125+ builder .addCustom ((list , syncer ) -> {
126+ boolean noEnergy = syncer .syncBoolean (recipeMapWorkable .isHasNotEnoughEnergy ());
127+ if (isStructureFormed () && noEnergy ) {
127128 list .add (KeyUtil .lang (TextFormatting .YELLOW , "gregtech.multiblock.steam.low_steam" ));
128129 }
129- })
130- .addMaintenanceProblemLines (getMaintenanceProblems ());
130+ }).addMaintenanceProblemLines (getMaintenanceProblems ());
131131 }
132132
133133 @ Override
0 commit comments