allow interface itemstack handler to accept over sized stacks

This commit is contained in:
PrototypeTrousers
2022-10-12 17:40:25 -03:00
parent 2e9a5dc8ea
commit 4bac5f43db
9 changed files with 124 additions and 16 deletions
@@ -749,7 +749,7 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
// make sure strange things didn't happen...
// TODO: check if OK
final ItemStack canExtract = adaptor.simulateRemove((int) diff, toStore.getDefinition(), null);
if (canExtract.isEmpty() || canExtract.getCount() != diff) {
if (canExtract.isEmpty()) {
changed = true;
throw new GridAccessException();
}
@@ -766,8 +766,6 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
final ItemStack removed = adaptor.removeItems((int) diff, ItemStack.EMPTY, null);
if (removed.isEmpty()) {
throw new IllegalStateException("bad attempt at managing inventory. ( removeItems )");
} else if (removed.getCount() != diff) {
throw new IllegalStateException("bad attempt at managing inventory. ( removeItems )");
}
}
}