Fixed Flanks pocket storage inserting too much
This commit is contained in:
parent
1cae6d8bce
commit
db7a283c8e
|
@ -49,7 +49,7 @@ public abstract class BigInventoryHandler implements IItemHandler, INBTSerializa
|
||||||
BigStack bigStack = this.storedStacks.get(slot);
|
BigStack bigStack = this.storedStacks.get(slot);
|
||||||
int inserted = Math.min(getSlotLimit(slot) - bigStack.getAmount(), stack.getCount());
|
int inserted = Math.min(getSlotLimit(slot) - bigStack.getAmount(), stack.getCount());
|
||||||
if (!simulate){
|
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)));
|
bigStack.setAmount(Math.min(bigStack.getAmount() + inserted, getSlotLimit(slot)));
|
||||||
onChange();
|
onChange();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user