@@ -126,6 +126,8 @@ private record CatalystData(ItemPredicate predicate, List<ItemStack> items) {}
126126 RecipeHolder ::new
127127 );
128128
129+
130+
129131 public static MiniaturizationRecipe fromCodec (int craftTime , int recipeSize , List <IRecipeLayer > layers ,
130132 MiniaturizationRecipeComponents components , List <ItemStack > outputs ,
131133 CatalystData catalystData ) {
@@ -186,11 +188,7 @@ public static MiniaturizationRecipe fromCodec(int craftTime, int recipeSize, Lis
186188 recipeDims = new AABB (Vec3 .ZERO , new Vec3 (x , height , z ));
187189 }
188190
189- final AABB footprint = BlockSpaceUtil .getLayerBounds (recipeDims , 0 );
190- layers1 .values ()
191- .stream ()
192- .filter (l -> l instanceof IDynamicSizedRecipeLayer )
193- .forEach (dl -> ((IDynamicSizedRecipeLayer ) dl ).setRecipeDimensions (footprint ));
191+ updateFluidLayerDimensions (layers1 , recipeDims );
194192
195193 HashMap <String , Integer > componentTotals = new HashMap <>();
196194 components .getAllComponents ().keySet ().forEach (comp -> {
@@ -205,10 +203,9 @@ public static MiniaturizationRecipe fromCodec(int craftTime, int recipeSize, Lis
205203 return recipe ;
206204 }
207205
208- private void updateFluidLayerDimensions () {
209- // Update all the dynamic recipe layers
206+ private static void updateFluidLayerDimensions (TreeMap <Integer , IRecipeLayer > layers , AABB dimensions ) {
210207 final AABB footprint = BlockSpaceUtil .getLayerBounds (dimensions , 0 );
211- this . layers .values ()
208+ layers .values ()
212209 .stream ()
213210 .filter (l -> l instanceof IDynamicSizedRecipeLayer )
214211 .forEach (dl -> ((IDynamicSizedRecipeLayer ) dl ).setRecipeDimensions (footprint ));
0 commit comments