Compare commits

..

2 commits

Author SHA1 Message Date
Ell
685115a595 1.12.8 2022-10-25 11:58:00 +02:00
Ell
c720a1b92e avoid unnecessarily copying stacks in getAvailableDestination 2022-10-25 11:57:33 +02:00
2 changed files with 2 additions and 2 deletions

View file

@ -13,7 +13,7 @@ apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'eclipse'
apply plugin: 'maven-publish'
version = '1.12.7'
version = '1.12.8'
group = 'de.ellpeck.prettypipes' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = 'PrettyPipes'

View file

@ -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
var totalSpace = 0;
for (var i = startSlot; i < slotAmount; i++) {
var copy = stack.copy();
for (var i = startSlot; i < slotAmount; i++) {
var maxStackSize = copy.getMaxStackSize();
// 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