Merge branch 'master' into dev

This commit is contained in:
Martin Robertz committed 2026-05-07 19:41:19 +02:00
commit 22401bc244
2 files changed
+8 -5

No files matched your search

@@ -101,12 +101,14 @@ public class PatternShaperChestContainer extends Container {
}
// special for shift click the output pattern
if (slotId == 1) {
this.inventorySlots.get(0).decrStackSize(1);
Slot blankPatternSlot = this.inventorySlots.get(0);
// special for shift click the output pattern
blankPatternSlot.decrStackSize(1);
// if there still have blank pattern
if (this.inventorySlots.get(0).getStack().stackSize != 0) {
if (blankPatternSlot.getHasStack() && blankPatternSlot.getStack().stackSize != 0) {
ItemStack stackCopy = stack.copy();
stackCopy.stackSize = 1;
this.inventorySlots.get(1).putStack(stackCopy);
this.inventorySlots.get(1).putStack(stack.copy());
}
}
} else {
@@ -81,10 +81,11 @@ public class PatternShaperContainer extends Container {
return null;
}
if (stack.getItem() instanceof IPattern && slotId == 1) {
Slot blankPatternSlot = this.inventorySlots.get(0);
// special for shift click the output pattern
this.inventorySlots.get(0).decrStackSize(1);
blankPatternSlot.decrStackSize(1);
// if there still have blank pattern
if (this.inventorySlots.get(0).getStack().stackSize != 0) {
if (blankPatternSlot.getHasStack() && blankPatternSlot.getStack().stackSize != 0) {
ItemStack stackCopy = stack.copy();
stackCopy.stackSize = 1;
this.inventorySlots.get(1).putStack(stack.copy());