99import com .cleanroommc .groovyscript .helper .SimpleObjectStream ;
1010import com .cleanroommc .groovyscript .helper .ingredient .IngredientHelper ;
1111import com .cleanroommc .groovyscript .helper .recipe .AbstractRecipeBuilder ;
12- import com .cleanroommc .groovyscript .helper .recipe .RecipeName ;
1312import com .cleanroommc .groovyscript .registry .VirtualizedRegistry ;
1413import net .minecraft .item .ItemStack ;
1514import net .minecraft .util .ResourceLocation ;
@@ -127,6 +126,9 @@ public void removeAll() {
127126 }
128127 }
129128
129+ @ Property (property = "input" , comp = @ Comp (gte = 1 ))
130+ @ Property (property = "output" , comp = @ Comp (eq = 1 ))
131+ @ Property (property = "name" )
130132 public static class RecipeBuilder extends AbstractRecipeBuilder <InfusionRecipe > {
131133
132134 @ Property (comp = @ Comp (not = "null" ))
@@ -138,6 +140,11 @@ public static class RecipeBuilder extends AbstractRecipeBuilder<InfusionRecipe>
138140 @ Property
139141 private int instability ;
140142
143+ @ Override
144+ public String getRecipeNamePrefix () {
145+ return "infusion_matrix_recipe" ;
146+ }
147+
141148 @ RecipeBuilderMethodDescription
142149 public RecipeBuilder mainInput (IIngredient ingredient ) {
143150 this .mainInput = ingredient ;
@@ -204,7 +211,7 @@ protected int getMaxItemInput() {
204211
205212 @ Override
206213 public void validate (GroovyLog .Msg msg ) {
207- validateItems (msg , 1 , 100 , 1 , 1 );
214+ validateItems (msg , 1 , Integer . MAX_VALUE , 1 , 1 );
208215 msg .add (IngredientHelper .isEmpty (mainInput ), () -> "Main Input must not be empty" );
209216 // More than 1 item cannot be placed
210217 validateStackSize (msg , 1 , "mainInput" , mainInput );
@@ -214,6 +221,7 @@ public void validate(GroovyLog.Msg msg) {
214221 if (instability < 0 ) {
215222 instability = 0 ;
216223 }
224+ validateName ();
217225 }
218226
219227 @ Override
@@ -223,7 +231,7 @@ public void validate(GroovyLog.Msg msg) {
223231
224232 Object [] inputs = this .input .stream ().map (IIngredient ::toMcIngredient ).toArray ();
225233 InfusionRecipe recipe = new InfusionRecipe (researchKey , output .get (0 ), instability , aspects , mainInput .toMcIngredient (), inputs );
226- ModSupport .THAUMCRAFT .get ().infusionCrafting .add (RecipeName . generateRl ( "infusion_matrix_recipe" ) , recipe );
234+ ModSupport .THAUMCRAFT .get ().infusionCrafting .add (super . name , recipe );
227235 return recipe ;
228236 }
229237 }
0 commit comments