Skip to content

Commit

Permalink
Fix #935: Machine output slots getting stuck in an invisible locked s…
Browse files Browse the repository at this point in the history
…tate (#966)
  • Loading branch information
Technici4n authored Dec 19, 2024
1 parent 81a7182 commit 45e1155
Showing 1 changed file with 11 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -523,18 +523,19 @@ protected boolean putItemOutputs(MachineRecipe recipe, boolean simulate, boolean
? (int) stack.getRemainingCapacityFor(output.variant())
: output.variant().getMaxStackSize() - (int) stack.getAmount();
int ins = Math.min(remainingAmount, remainingCapacity);
if (key.isBlank()) {
if ((stack.isMachineLocked() || stack.isPlayerLocked() || loopRun == 1) && stack.isValid(output.getStack())) {
stack.setAmount(ins);
stack.setKey(output.variant());
if (ins > 0) {
if (key.isBlank()) {
if ((stack.isMachineLocked() || stack.isPlayerLocked() || loopRun == 1) && stack.isValid(output.getStack())) {
stack.setAmount(ins);
stack.setKey(output.variant());
} else {
ins = 0;
}
} else {
ins = 0;
stack.increment(ins);
}
} else {
stack.increment(ins);
}
remainingAmount -= ins;
if (ins > 0) {
remainingAmount -= ins;

locksToToggle.add(stackId - 1);
lockItems.add(output.variant().getItem());
if (!simulate) {
Expand Down

0 comments on commit 45e1155

Please sign in to comment.