@@ -49,12 +49,17 @@ protected void apply(Map<ResourceLocation, JsonElement> objectIn, IResourceManag
4949 if (!layersLoaded )
5050 continue ;
5151
52- loadComponents (root , recipe );
52+ // Load Components - If nothing was loaded, skip the recipe
53+ boolean componentsLoaded = loadComponents (root , recipe );
54+ if (!componentsLoaded || recipe .getNumberComponents () == 0 )
55+ continue ;
5356
54- loadCatalyst (recipe , root );
57+ boolean catalystsLoaded = loadCatalyst (recipe , root );
58+ if (!catalystsLoaded )
59+ continue ;
5560
5661 loadOutputs (recipe , root );
57-
62+
5863 MiniaturizationRecipeManager .add (rl , recipe );
5964 }
6065 }
@@ -66,7 +71,19 @@ private boolean loadOutputs(MiniaturizationRecipe recipe, JsonObject root) {
6671 }
6772
6873 JsonArray outputs = root .getAsJsonArray ("outputs" );
69- return false ;
74+ for (JsonElement output : outputs ) {
75+ if (!output .isJsonObject ())
76+ continue ;
77+
78+ JsonObject op = output .getAsJsonObject ();
79+ Optional <ItemStack > oStack = RecipeLoaderUtil .getItemStack (op );
80+ if (!oStack .isPresent ())
81+ continue ;
82+
83+ recipe .addOutput (oStack .get ());
84+ }
85+
86+ return true ;
7087 }
7188
7289 private boolean loadCatalyst (MiniaturizationRecipe recipe , JsonObject root ) {
@@ -112,23 +129,25 @@ private boolean loadLayers(MiniaturizationRecipe recipe, JsonObject root) {
112129 return true ;
113130 }
114131
115- private void loadComponents (JsonObject root , MiniaturizationRecipe recipe ) {
132+ private boolean loadComponents (JsonObject root , MiniaturizationRecipe recipe ) {
116133 JsonObject components = root .get ("components" ).getAsJsonObject ();
117134 if (components .size () == 0 ) {
118135 throw new JsonParseException ("Error: No components defined." );
119136 }
120137
121- components .entrySet (). forEach ( component -> {
138+ for ( Map . Entry < String , JsonElement > component : components .entrySet ()) {
122139 String key = component .getKey ();
123140 Optional <BlockState > state = RecipeLoaderUtil .extractComponentDefinition (key , component .getValue ());
124141
125142 if (key .isEmpty () || !state .isPresent ()) {
126143 CompactCrafting .LOGGER .warn ("Failed to process blockstate for component {}; definition not found." , key );
127- return ;
144+ continue ;
128145 }
129146
130147 recipe .addComponent (key , state .get ());
131- });
148+ }
149+
150+ return true ;
132151 }
133152
134153}
0 commit comments