fix interface dropping stacks over the stack limit. fix potential dupes
fixes #328
This commit is contained in:
@@ -1203,6 +1203,13 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
|
||||
|
||||
for (final ItemStack is : this.storage) {
|
||||
if (!is.isEmpty()) {
|
||||
int maxStackSize = is.getMaxStackSize();
|
||||
while (is.getCount() > maxStackSize) {
|
||||
ItemStack portionedStack = is.copy();
|
||||
portionedStack.setCount(maxStackSize);
|
||||
is.shrink(maxStackSize);
|
||||
drops.add(portionedStack);
|
||||
}
|
||||
drops.add(is);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user