22
33import gregtech .api .GTValues ;
44import gregtech .api .gui .GuiTextures ;
5- import gregtech .api .gui .widgets .ProgressWidget ;
65import gregtech .api .mui .GTGuiTextures ;
76import gregtech .api .recipes .builders .AssemblerRecipeBuilder ;
87import gregtech .api .recipes .builders .AssemblyLineRecipeBuilder ;
3938import net .minecraft .init .SoundEvents ;
4039import net .minecraft .item .ItemStack ;
4140
41+ import com .cleanroommc .modularui .api .drawable .IDrawable ;
4242import com .cleanroommc .modularui .widgets .ProgressWidget .Direction ;
4343import crafttweaker .annotations .ZenRegister ;
4444import stanhebben .zenscript .annotations .ZenClass ;
@@ -337,16 +337,14 @@ public final class RecipeMaps {
337337 @ ZenProperty
338338 public static final RecipeMap <SimpleRecipeBuilder > CANNER_RECIPES = new RecipeMapFluidCanner ("canner" ,
339339 new SimpleRecipeBuilder (), recipeMap -> {
340-
341340 RecipeMapUI <?> ui = new RecipeMapUI <>(recipeMap , true , true , true , true , false );
342- // todo update canner to mui2
343- ui .setItemSlotOverlay (GuiTextures .CANNER_OVERLAY , false , false );
344- ui .setItemSlotOverlay (GuiTextures .CANISTER_OVERLAY , false , true );
345- ui .setItemSlotOverlay (GuiTextures .CANISTER_OVERLAY , true );
346- ui .setFluidSlotOverlay (GuiTextures .DARK_CANISTER_OVERLAY , false );
347- ui .setFluidSlotOverlay (GuiTextures .DARK_CANISTER_OVERLAY , true );
348- ui .setProgressBar (GuiTextures .PROGRESS_BAR_CANNER , ProgressWidget .MoveType .HORIZONTAL );
349- return ui ;
341+ return ui .buildMui2 (b -> b
342+ .itemSlotOverlay (GTGuiTextures .CANNER_OVERLAY , false , false )
343+ .itemSlotOverlay (GTGuiTextures .CANISTER_OVERLAY , false , true )
344+ .itemSlotOverlay (GTGuiTextures .CANISTER_OVERLAY , true )
345+ .fluidSlotOverlay (GTGuiTextures .DARK_CANISTER_OVERLAY , false )
346+ .fluidSlotOverlay (GTGuiTextures .DARK_CANISTER_OVERLAY , true )
347+ .progressBar (GTGuiTextures .PROGRESS_BAR_CANNER , Direction .RIGHT ));
350348 });
351349
352350 /**
@@ -378,7 +376,7 @@ public final class RecipeMaps {
378376 .uiBuilder (b -> b
379377 .itemSlotOverlay (GTGuiTextures .EXTRACTOR_OVERLAY , false , false )
380378 .itemSlotOverlay (GTGuiTextures .CANISTER_OVERLAY , false , true )
381- .fluidSlotOverlay (GTGuiTextures .CENTRIFUGE_OVERLAY , false , true )
379+ .fluidSlotOverlay (GTGuiTextures .CENTRIFUGE_OVERLAY , false )
382380 .progressBar (GTGuiTextures .PROGRESS_BAR_EXTRACT ))
383381 .sound (GTSoundEvents .CENTRIFUGE )
384382 .build ();
@@ -443,8 +441,8 @@ public final class RecipeMaps {
443441 .itemSlotOverlay (GTGuiTextures .MOLECULAR_OVERLAY_1 , false , false )
444442 .itemSlotOverlay (GTGuiTextures .MOLECULAR_OVERLAY_2 , false , true )
445443 .itemSlotOverlay (GTGuiTextures .VIAL_OVERLAY_1 , true )
446- .fluidSlotOverlay (GTGuiTextures .MOLECULAR_OVERLAY_3 , false , false )
447- .fluidSlotOverlay (GTGuiTextures .MOLECULAR_OVERLAY_4 , false , true )
444+ .fluidSlotOverlay (GTGuiTextures .MOLECULAR_OVERLAY_3 , false )
445+ .fluidSlotOverlay (GTGuiTextures .MOLECULAR_OVERLAY_4 , false )
448446 .fluidSlotOverlay (GTGuiTextures .VIAL_OVERLAY_2 , true )
449447 .progressBar (GTGuiTextures .PROGRESS_BAR_ARROW_MULTIPLE ))
450448 .sound (GTValues .FOOLS .get () ? GTSoundEvents .SCIENCE : GTSoundEvents .CHEMICAL_REACTOR )
@@ -937,8 +935,17 @@ public final class RecipeMaps {
937935 */
938936 @ ZenProperty
939937 public static final RecipeMap <SimpleRecipeBuilder > FORMING_PRESS_RECIPES = new RecipeMapFormingPress (
940- "forming_press" , new SimpleRecipeBuilder (), FormingPressUI ::new );
941- // todo update forming press to mui2
938+ "forming_press" , new SimpleRecipeBuilder (), recipeMap -> new FormingPressUI <>(recipeMap )
939+ .buildMui2 (b -> {
940+ IDrawable [] overlays = { GTGuiTextures .PRESS_OVERLAY_2 , GTGuiTextures .PRESS_OVERLAY_4 ,
941+ GTGuiTextures .PRESS_OVERLAY_1 };
942+ for (int i = 0 ; i < 3 ; i ++) {
943+ b .itemSlotOverlay (overlays [i ], i , false );
944+ b .itemSlotOverlay (overlays [i ], i + 3 , false );
945+ }
946+ b .itemSlotOverlay (GTGuiTextures .PRESS_OVERLAY_3 , true );
947+ b .progressBar (GTGuiTextures .PROGRESS_BAR_COMPRESS , Direction .RIGHT );
948+ }));
942949
943950 /**
944951 *
@@ -964,11 +971,10 @@ public final class RecipeMaps {
964971 public static final RecipeMap <SimpleRecipeBuilder > FURNACE_RECIPES = new RecipeMapFurnace ("electric_furnace" ,
965972 new SimpleRecipeBuilder (), recipeMap -> {
966973 RecipeMapUI <?> ui = new RecipeMapUI <>(recipeMap , true , true , true , true , false );
967- ui .setItemSlotOverlay ( GuiTextures . FURNACE_OVERLAY_1 , false );
968- ui . setProgressBar ( GuiTextures . PROGRESS_BAR_ARROW , ProgressWidget . MoveType . HORIZONTAL );
969- return ui ;
974+ return ui .buildMui2 ( b -> b
975+ . itemSlotOverlay ( GTGuiTextures . FURNACE_OVERLAY_1 , false )
976+ . progressBar ( GTGuiTextures . PROGRESS_BAR_ARROW , Direction . RIGHT )) ;
970977 });
971- // todo update electric furnace to mui2
972978
973979 /**
974980 * Example:
@@ -1189,7 +1195,7 @@ public final class RecipeMaps {
11891195 .itemSlotOverlay (GTGuiTextures .ATOMIC_OVERLAY_1 , false )
11901196 .fluidSlotOverlay (GTGuiTextures .ATOMIC_OVERLAY_2 , false )
11911197 .fluidSlotOverlay (GTGuiTextures .POSITIVE_MATTER_OVERLAY , true )
1192- .fluidSlotOverlay (GTGuiTextures .NEUTRAL_MATTER_OVERLAY , true , true )
1198+ .fluidSlotOverlay (GTGuiTextures .NEUTRAL_MATTER_OVERLAY , true )
11931199 .progressBar (GTGuiTextures .PROGRESS_BAR_MASS_FAB ))
11941200 .sound (GTSoundEvents .REPLICATOR )
11951201 .build ();
@@ -1366,7 +1372,7 @@ public final class RecipeMaps {
13661372 .itemSlotOverlay (GTGuiTextures .DATA_ORB_OVERLAY , false )
13671373 .itemSlotOverlay (GTGuiTextures .ATOMIC_OVERLAY_1 , true )
13681374 .fluidSlotOverlay (GTGuiTextures .NEUTRAL_MATTER_OVERLAY , false )
1369- .fluidSlotOverlay (GTGuiTextures .POSITIVE_MATTER_OVERLAY , false , true )
1375+ .fluidSlotOverlay (GTGuiTextures .POSITIVE_MATTER_OVERLAY , false )
13701376 .fluidSlotOverlay (GTGuiTextures .ATOMIC_OVERLAY_2 , true )
13711377 .progressBar (GTGuiTextures .PROGRESS_BAR_REPLICATOR ))
13721378 .sound (GTSoundEvents .REPLICATOR )
@@ -1405,12 +1411,11 @@ public final class RecipeMaps {
14051411 public static final RecipeMap <SimpleRecipeBuilder > SCANNER_RECIPES = new RecipeMapScanner ("scanner" ,
14061412 new SimpleRecipeBuilder (), recipeMap -> {
14071413 RecipeMapUI <?> ui = new RecipeMapUI <>(recipeMap , true , true , true , true , false );
1408- ui .setItemSlotOverlay ( GuiTextures . DATA_ORB_OVERLAY , false , false );
1409- ui . setItemSlotOverlay ( GuiTextures . SCANNER_OVERLAY , false , true );
1410- ui . setProgressBar ( GuiTextures . PROGRESS_BAR_ARROW , ProgressWidget . MoveType . HORIZONTAL );
1411- return ui ;
1414+ return ui .buildMui2 ( b -> b
1415+ . itemSlotOverlay ( GTGuiTextures . DATA_ORB_OVERLAY , false , false )
1416+ . itemSlotOverlay ( GTGuiTextures . SCANNER_OVERLAY , false , true )
1417+ . progressBar ( GTGuiTextures . PROGRESS_BAR_ARROW , Direction . RIGHT )) ;
14121418 });
1413- // todo update scanner to mui2
14141419
14151420 /**
14161421 * Example:
0 commit comments