mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-18 19:56:17 -04:00
parent
ac67d8ba37
commit
088964b168
@ -66,13 +66,13 @@ abstract class Player(val playerInventory: InventoryPlayer, val otherInventory:
|
||||
|
||||
// for ghost slots we don't care about stack size
|
||||
val fromStack = from.getStack
|
||||
val toStack = if (to.getHasStack) to.getStack else null
|
||||
val toStack = if (to.getHasStack) to.getStack else ItemStack.EMPTY
|
||||
val toStackSize = if (!toStack.isEmpty) toStack.getCount else 0
|
||||
|
||||
val maxStackSize = math.min(fromStack.getMaxStackSize, to.getSlotStackLimit)
|
||||
val itemsMoved = math.min(maxStackSize - toStackSize, fromStack.getCount)
|
||||
|
||||
if (toStack != null) {
|
||||
if (!toStack.isEmpty) {
|
||||
if (toStackSize < maxStackSize &&
|
||||
fromStack.isItemEqual(toStack) &&
|
||||
ItemStack.areItemStackTagsEqual(fromStack, toStack) &&
|
||||
|
Loading…
x
Reference in New Issue
Block a user