Fixed Constructor being able to drop more than the maximum stack size for an item. Fixes #3455
This commit is contained in:
@@ -134,7 +134,8 @@ public class ConstructorNetworkNode extends NetworkNode implements IComparable,
|
||||
}
|
||||
|
||||
private void extractAndDropItem(ItemStack stack) {
|
||||
ItemStack took = network.extractItem(stack, upgrades.getStackInteractCount(), compare, Action.PERFORM);
|
||||
int dropCount = Math.min(upgrades.getStackInteractCount(), stack.getMaxStackSize());
|
||||
ItemStack took = network.extractItem(stack, dropCount, compare, Action.PERFORM);
|
||||
|
||||
if (!took.isEmpty()) {
|
||||
DefaultDispenseItemBehavior.spawnItem(level, took, 6, getDirection(), new PositionImpl(getDispensePositionX(), getDispensePositionY(), getDispensePositionZ()));
|
||||
|
||||
Reference in New Issue
Block a user