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 ;
3635
3736import net .minecraft .init .SoundEvents ;
3837
38+ import com .cleanroommc .modularui .api .drawable .IDrawable ;
3939import com .cleanroommc .modularui .widgets .ProgressWidget .Direction ;
4040import crafttweaker .annotations .ZenRegister ;
4141import stanhebben .zenscript .annotations .ZenClass ;
@@ -323,16 +323,14 @@ public final class RecipeMaps {
323323 @ ZenProperty
324324 public static final RecipeMap <SimpleRecipeBuilder > CANNER_RECIPES = new RecipeMapFluidCanner ("canner" ,
325325 new SimpleRecipeBuilder (), recipeMap -> {
326-
327326 RecipeMapUI <?> ui = new RecipeMapUI <>(recipeMap , true , true , true , true , false );
328- // todo update canner to mui2
329- ui .setItemSlotOverlay (GuiTextures .CANNER_OVERLAY , false , false );
330- ui .setItemSlotOverlay (GuiTextures .CANISTER_OVERLAY , false , true );
331- ui .setItemSlotOverlay (GuiTextures .CANISTER_OVERLAY , true );
332- ui .setFluidSlotOverlay (GuiTextures .DARK_CANISTER_OVERLAY , false );
333- ui .setFluidSlotOverlay (GuiTextures .DARK_CANISTER_OVERLAY , true );
334- ui .setProgressBar (GuiTextures .PROGRESS_BAR_CANNER , ProgressWidget .MoveType .HORIZONTAL );
335- return ui ;
327+ return ui .buildMui2 (b -> b
328+ .itemSlotOverlay (GTGuiTextures .CANNER_OVERLAY , false , false )
329+ .itemSlotOverlay (GTGuiTextures .CANISTER_OVERLAY , false , true )
330+ .itemSlotOverlay (GTGuiTextures .CANISTER_OVERLAY , true )
331+ .fluidSlotOverlay (GTGuiTextures .DARK_CANISTER_OVERLAY , false )
332+ .fluidSlotOverlay (GTGuiTextures .DARK_CANISTER_OVERLAY , true )
333+ .progressBar (GTGuiTextures .PROGRESS_BAR_CANNER , Direction .RIGHT ));
336334 });
337335
338336 /**
@@ -364,7 +362,7 @@ public final class RecipeMaps {
364362 .uiBuilder (b -> b
365363 .itemSlotOverlay (GTGuiTextures .EXTRACTOR_OVERLAY , false , false )
366364 .itemSlotOverlay (GTGuiTextures .CANISTER_OVERLAY , false , true )
367- .fluidSlotOverlay (GTGuiTextures .CENTRIFUGE_OVERLAY , false , true )
365+ .fluidSlotOverlay (GTGuiTextures .CENTRIFUGE_OVERLAY , false )
368366 .progressBar (GTGuiTextures .PROGRESS_BAR_EXTRACT ))
369367 .sound (GTSoundEvents .CENTRIFUGE )
370368 .build ();
@@ -429,8 +427,8 @@ public final class RecipeMaps {
429427 .itemSlotOverlay (GTGuiTextures .MOLECULAR_OVERLAY_1 , false , false )
430428 .itemSlotOverlay (GTGuiTextures .MOLECULAR_OVERLAY_2 , false , true )
431429 .itemSlotOverlay (GTGuiTextures .VIAL_OVERLAY_1 , true )
432- .fluidSlotOverlay (GTGuiTextures .MOLECULAR_OVERLAY_3 , false , false )
433- .fluidSlotOverlay (GTGuiTextures .MOLECULAR_OVERLAY_4 , false , true )
430+ .fluidSlotOverlay (GTGuiTextures .MOLECULAR_OVERLAY_3 , false )
431+ .fluidSlotOverlay (GTGuiTextures .MOLECULAR_OVERLAY_4 , false )
434432 .fluidSlotOverlay (GTGuiTextures .VIAL_OVERLAY_2 , true )
435433 .progressBar (GTGuiTextures .PROGRESS_BAR_ARROW_MULTIPLE ))
436434 .sound (GTValues .FOOLS .get () ? GTSoundEvents .SCIENCE : GTSoundEvents .CHEMICAL_REACTOR )
@@ -923,8 +921,17 @@ public final class RecipeMaps {
923921 */
924922 @ ZenProperty
925923 public static final RecipeMap <SimpleRecipeBuilder > FORMING_PRESS_RECIPES = new RecipeMapFormingPress (
926- "forming_press" , new SimpleRecipeBuilder (), FormingPressUI ::new );
927- // todo update forming press to mui2
924+ "forming_press" , new SimpleRecipeBuilder (), recipeMap -> new FormingPressUI <>(recipeMap )
925+ .buildMui2 (b -> {
926+ IDrawable [] overlays = { GTGuiTextures .PRESS_OVERLAY_2 , GTGuiTextures .PRESS_OVERLAY_4 ,
927+ GTGuiTextures .PRESS_OVERLAY_1 };
928+ for (int i = 0 ; i < 3 ; i ++) {
929+ b .itemSlotOverlay (overlays [i ], i , false );
930+ b .itemSlotOverlay (overlays [i ], i + 3 , false );
931+ }
932+ b .itemSlotOverlay (GTGuiTextures .PRESS_OVERLAY_3 , true );
933+ b .progressBar (GTGuiTextures .PROGRESS_BAR_COMPRESS , Direction .RIGHT );
934+ }));
928935
929936 /**
930937 *
@@ -950,11 +957,10 @@ public final class RecipeMaps {
950957 public static final RecipeMap <SimpleRecipeBuilder > FURNACE_RECIPES = new RecipeMapFurnace ("electric_furnace" ,
951958 new SimpleRecipeBuilder (), recipeMap -> {
952959 RecipeMapUI <?> ui = new RecipeMapUI <>(recipeMap , true , true , true , true , false );
953- ui .setItemSlotOverlay ( GuiTextures . FURNACE_OVERLAY_1 , false );
954- ui . setProgressBar ( GuiTextures . PROGRESS_BAR_ARROW , ProgressWidget . MoveType . HORIZONTAL );
955- return ui ;
960+ return ui .buildMui2 ( b -> b
961+ . itemSlotOverlay ( GTGuiTextures . FURNACE_OVERLAY_1 , false )
962+ . progressBar ( GTGuiTextures . PROGRESS_BAR_ARROW , Direction . RIGHT )) ;
956963 });
957- // todo update electric furnace to mui2
958964
959965 /**
960966 * Example:
@@ -1175,7 +1181,7 @@ public final class RecipeMaps {
11751181 .itemSlotOverlay (GTGuiTextures .ATOMIC_OVERLAY_1 , false )
11761182 .fluidSlotOverlay (GTGuiTextures .ATOMIC_OVERLAY_2 , false )
11771183 .fluidSlotOverlay (GTGuiTextures .POSITIVE_MATTER_OVERLAY , true )
1178- .fluidSlotOverlay (GTGuiTextures .NEUTRAL_MATTER_OVERLAY , true , true )
1184+ .fluidSlotOverlay (GTGuiTextures .NEUTRAL_MATTER_OVERLAY , true )
11791185 .progressBar (GTGuiTextures .PROGRESS_BAR_MASS_FAB ))
11801186 .sound (GTSoundEvents .REPLICATOR )
11811187 .build ();
@@ -1352,7 +1358,7 @@ public final class RecipeMaps {
13521358 .itemSlotOverlay (GTGuiTextures .DATA_ORB_OVERLAY , false )
13531359 .itemSlotOverlay (GTGuiTextures .ATOMIC_OVERLAY_1 , true )
13541360 .fluidSlotOverlay (GTGuiTextures .NEUTRAL_MATTER_OVERLAY , false )
1355- .fluidSlotOverlay (GTGuiTextures .POSITIVE_MATTER_OVERLAY , false , true )
1361+ .fluidSlotOverlay (GTGuiTextures .POSITIVE_MATTER_OVERLAY , false )
13561362 .fluidSlotOverlay (GTGuiTextures .ATOMIC_OVERLAY_2 , true )
13571363 .progressBar (GTGuiTextures .PROGRESS_BAR_REPLICATOR ))
13581364 .sound (GTSoundEvents .REPLICATOR )
@@ -1391,12 +1397,11 @@ public final class RecipeMaps {
13911397 public static final RecipeMap <SimpleRecipeBuilder > SCANNER_RECIPES = new RecipeMapScanner ("scanner" ,
13921398 new SimpleRecipeBuilder (), recipeMap -> {
13931399 RecipeMapUI <?> ui = new RecipeMapUI <>(recipeMap , true , true , true , true , false );
1394- ui .setItemSlotOverlay ( GuiTextures . DATA_ORB_OVERLAY , false , false );
1395- ui . setItemSlotOverlay ( GuiTextures . SCANNER_OVERLAY , false , true );
1396- ui . setProgressBar ( GuiTextures . PROGRESS_BAR_ARROW , ProgressWidget . MoveType . HORIZONTAL );
1397- return ui ;
1400+ return ui .buildMui2 ( b -> b
1401+ . itemSlotOverlay ( GTGuiTextures . DATA_ORB_OVERLAY , false , false )
1402+ . itemSlotOverlay ( GTGuiTextures . SCANNER_OVERLAY , false , true )
1403+ . progressBar ( GTGuiTextures . PROGRESS_BAR_ARROW , Direction . RIGHT )) ;
13981404 });
1399- // todo update scanner to mui2
14001405
14011406 /**
14021407 * Example:
0 commit comments