Fix not properly handling attempting to send large amounts of items at once
@@ -95,9 +95,15 @@ public class TransporterManager {
//Note: Because we check the size of the stack against the max stack size
// even if there are multiple slots that need this, we only end up copying
// our stack a single time to resize it
+ if (count > maxStackSize) {
+ //Note: If we have more we are trying to insert than the max stack size, just take the number we are trying to insert
+ // so that we have an accurate amount for checking the real slot stack size
+ stack = StackUtils.size(stack, count);
+ } else {
stack = StackUtils.size(stack, maxStackSize + 1);
}
}
+ }
} else {
// If the item stack is empty, we need to do a simulated insert since we can't tell if the stack
// in question would be allowed in this slot. Otherwise, we depend on areItemsStackable to keep us
