Fixed Constructor being able to drop more than the maximum stack size for an item. Fixes #3455

This commit is contained in:
raoulvdberge
2023-02-12 10:16:36 +01:00
parent 4836c6fa9d
commit 036e680795
2 changed files with 4 additions and 2 deletions

View File

@@ -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()));