Terminal: Fix multiple stacks being extracted on a single shift-click
This commit is contained in:
parent
654baa81a1
commit
2ec294d427
|
@ -8,7 +8,7 @@ import net.minecraft.entity.player.PlayerInventory
|
|||
import net.minecraft.item.ItemStack
|
||||
import net.minecraft.util.Identifier
|
||||
import net.shadowfacts.phycon.PhysicalConnectivity
|
||||
import kotlin.math.max
|
||||
import kotlin.math.min
|
||||
|
||||
/**
|
||||
* @author shadowfacts
|
||||
|
@ -63,7 +63,7 @@ class TerminalContainer(syncId: Int, playerInv: PlayerInventory, val terminal: T
|
|||
val slot = slotList[slotId]
|
||||
val stack = slotList[slotId].stack
|
||||
if (!stack.isEmpty && !player.world.isClient) {
|
||||
terminal.requestItem(stack, max(stack.count, stack.maxCount))
|
||||
terminal.requestItem(stack, min(stack.count, stack.maxCount))
|
||||
}
|
||||
return ItemStack.EMPTY
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue