Skip to content

Commit

Permalink
Stop chanced outputs from force-increasing slot capacity
Browse files Browse the repository at this point in the history
  • Loading branch information
Technici4n committed May 21, 2023
1 parent 4211313 commit 50fb65b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down

0 comments on commit 50fb65b

Please sign in to comment.