mirror of
https://github.com/Ellpeck/PrettyPipes.git
synced 2024-12-25 16:29:23 +01:00
avoid unnecessarily copying stacks in getAvailableDestination
This commit is contained in:
parent
7c14c7f175
commit
c720a1b92e
1 changed files with 1 additions and 1 deletions
|
@ -240,8 +240,8 @@ public class PipeBlockEntity extends BlockEntity implements MenuProvider, IPipeC
|
||||||
}
|
}
|
||||||
// totalSpace will be the amount of items that fit into the attached container
|
// totalSpace will be the amount of items that fit into the attached container
|
||||||
var totalSpace = 0;
|
var totalSpace = 0;
|
||||||
|
var copy = stack.copy();
|
||||||
for (var i = startSlot; i < slotAmount; i++) {
|
for (var i = startSlot; i < slotAmount; i++) {
|
||||||
var copy = stack.copy();
|
|
||||||
var maxStackSize = copy.getMaxStackSize();
|
var maxStackSize = copy.getMaxStackSize();
|
||||||
// if the container can store more than 64 items in this slot, then it's likely
|
// if the container can store more than 64 items in this slot, then it's likely
|
||||||
// a barrel or similar, meaning that the slot limit matters more than the max stack size
|
// a barrel or similar, meaning that the slot limit matters more than the max stack size
|
||||||
|
|
Loading…
Reference in a new issue