mirror of
https://github.com/Ellpeck/PrettyPipes.git
synced 2024-12-22 15:39:22 +01:00
fixed inventories with max stack sizes over 64 not being seen by terminals correctly
This commit is contained in:
parent
ff5368b108
commit
5cda7beca7
1 changed files with 4 additions and 3 deletions
|
@ -55,12 +55,13 @@ public class NetworkLocation implements INBTSerializable<CompoundNBT> {
|
|||
IItemHandler handler = this.getItemHandler(world);
|
||||
if (handler != null) {
|
||||
for (int i = 0; i < handler.getSlots(); i++) {
|
||||
ItemStack found = handler.extractItem(i, Integer.MAX_VALUE, true);
|
||||
if (found.isEmpty())
|
||||
// check if the slot is accessible to us
|
||||
if (handler.extractItem(i, 1, true).isEmpty())
|
||||
continue;
|
||||
if (this.itemCache == null)
|
||||
this.itemCache = new HashMap<>();
|
||||
this.itemCache.put(i, found);
|
||||
// use getStackInSlot since there might be more than 64 items in there
|
||||
this.itemCache.put(i, handler.getStackInSlot(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue