@@ -719,8 +719,7 @@ public class MillingRecipeGen extends ProcessingRecipeGen {
719
719
720
720
RU_YELLOW_SNOWBELLE = ruFlower ("yellow_snowbelle" , List .of (1f ),
721
721
List .of (Items .YELLOW_DYE ), List .of (2 ))
722
-
723
- ;
722
+ ;
724
723
725
724
protected GeneratedRecipe metalOre (String name , ItemEntry <? extends Item > crushed , int duration ) {
726
725
return create (name + "_ore" , b -> b .duration (duration )
@@ -847,6 +846,36 @@ protected GeneratedRecipe ruFlower(String input, List<Float> chances,
847
846
}
848
847
}
849
848
849
+ protected GeneratedRecipe modFlower (Mods mod , String input , List <Float > chances ,
850
+ List <Item > dyes , List <Integer > amounts ){
851
+ return switch (chances .size ()) {
852
+ // Milling recipe has a max of 4 outputs
853
+ case 1 -> create (mod .recipeId (input ), b -> b .duration (50 )
854
+ .require (mod , input )
855
+ .output (chances .get (0 ), dyes .get (0 ), amounts .get (0 ))
856
+ .whenModLoaded (mod .getId ()));
857
+ case 2 -> create (mod .recipeId (input ), b -> b .duration (50 )
858
+ .require (mod , input )
859
+ .output (chances .get (0 ), dyes .get (0 ), amounts .get (0 ))
860
+ .output (chances .get (1 ), dyes .get (1 ), amounts .get (1 ))
861
+ .whenModLoaded (mod .getId ()));
862
+ case 3 -> create (mod .recipeId (input ), b -> b .duration (50 )
863
+ .require (mod , input )
864
+ .output (chances .get (0 ), dyes .get (0 ), amounts .get (0 ))
865
+ .output (chances .get (1 ), dyes .get (1 ), amounts .get (1 ))
866
+ .output (chances .get (2 ), dyes .get (2 ), amounts .get (2 ))
867
+ .whenModLoaded (mod .getId ()));
868
+ case 4 -> create (mod .recipeId (input ), b -> b .duration (50 )
869
+ .require (mod , input )
870
+ .output (chances .get (0 ), dyes .get (0 ), amounts .get (0 ))
871
+ .output (chances .get (1 ), dyes .get (1 ), amounts .get (1 ))
872
+ .output (chances .get (2 ), dyes .get (2 ), amounts .get (2 ))
873
+ .output (chances .get (3 ), dyes .get (3 ), amounts .get (3 ))
874
+ .whenModLoaded (mod .getId ()));
875
+ default -> null ;
876
+ };
877
+ }
878
+
850
879
public MillingRecipeGen (PackOutput output ) {
851
880
super (output );
852
881
}
0 commit comments