Fixed Flanks pocket storage inserting too much

This commit is contained in:
Buuz135 2022-06-06 22:45:14 +02:00
parent 1cae6d8bce
commit db7a283c8e

View File

@ -49,7 +49,7 @@ public abstract class BigInventoryHandler implements IItemHandler, INBTSerializa
BigStack bigStack = this.storedStacks.get(slot);
int inserted = Math.min(getSlotLimit(slot) - bigStack.getAmount(), stack.getCount());
if (!simulate){
if (bigStack.getStack().isEmpty()) bigStack.setStack(stack);
if (bigStack.getStack().isEmpty()) bigStack.setStack(ItemHandlerHelper.copyStackWithSize(stack, 64));
bigStack.setAmount(Math.min(bigStack.getAmount() + inserted, getSlotLimit(slot)));
onChange();
}