Fix crash when shift-clicking stack into terminal buffer but no slots available
This commit is contained in:
parent
7447c89394
commit
5eb948802c
|
@ -205,7 +205,7 @@ abstract class AbstractTerminalScreenHandler<T: AbstractTerminalBlockEntity>(
|
|||
} else if (isPlayerSlot(slotId)) {
|
||||
val slotsInsertedInto = tryInsertItem(slot.stack, bufferSlotsStart until playerSlotsStart) { terminal.internalBuffer.getMode(it - bufferSlotsStart) != TerminalBufferInventory.Mode.FROM_NETWORK }
|
||||
slotsInsertedInto.forEach { terminal.internalBuffer.markSlot(it - bufferSlotsStart, TerminalBufferInventory.Mode.TO_NETWORK) }
|
||||
if (slot.stack.isEmpty) {
|
||||
if (slotsInsertedInto.isEmpty()) {
|
||||
return ItemStack.EMPTY
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue