Skip to content

Commit 1ae9497

Browse files
fix required blocks calculations
1 parent eeb498e commit 1ae9497

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

neoforge-main/src/main/java/dev/compactmods/crafting/recipes/MiniaturizationRecipe.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,12 @@ public static MiniaturizationRecipe fromCodec(int craftTime, int recipeSize, Lis
186186
recipeDims = new AABB(Vec3.ZERO, new Vec3(x, height, z));
187187
}
188188

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));
194+
189195
HashMap<String, Integer> componentTotals = new HashMap<>();
190196
components.getAllComponents().keySet().forEach(comp -> {
191197
int count = getComponentRequiredCount(comp, components, layers1);
@@ -196,7 +202,6 @@ public static MiniaturizationRecipe fromCodec(int craftTime, int recipeSize, Lis
196202
recipeDims, craftTime, hasFixedFootprint,
197203
componentTotals, components);
198204

199-
recipe.updateFluidLayerDimensions();
200205
return recipe;
201206
}
202207

0 commit comments

Comments
 (0)