From 50fb65bfc88b2c771118860c7feda419d2e3d637 Mon Sep 17 00:00:00 2001 From: Technici4n <13494793+Technici4n@users.noreply.github.com> Date: Sun, 21 May 2023 20:49:45 +0200 Subject: [PATCH] Stop chanced outputs from force-increasing slot capacity --- .../machines/components/CrafterComponent.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/aztech/modern_industrialization/machines/components/CrafterComponent.java b/src/main/java/aztech/modern_industrialization/machines/components/CrafterComponent.java index 3ee29c399..e52e5114d 100644 --- a/src/main/java/aztech/modern_industrialization/machines/components/CrafterComponent.java +++ b/src/main/java/aztech/modern_industrialization/machines/components/CrafterComponent.java @@ -483,10 +483,10 @@ protected boolean putItemOutputs(MachineRecipe recipe, boolean simulate, boolean stackId++; ItemVariant key = stack.getResource(); if (key.getItem() == output.item || key.isBlank()) { - // If simulating, respect the adjusted capacity. + // If simulating or chanced output, respect the adjusted capacity. // If putting the output, don't respect the adjusted capacity in case it was // reduced during the processing. - int remainingCapacity = simulate ? (int) stack.getRemainingCapacityFor(ItemVariant.of(output.item)) + int remainingCapacity = simulate || output.probability < 1 ? (int) stack.getRemainingCapacityFor(ItemVariant.of(output.item)) : output.item.getMaxStackSize() - (int) stack.getAmount(); int ins = Math.min(remainingAmount, remainingCapacity); if (key.isBlank()) {