Ender IO Zoo

Ender IO Zoo

961k Downloads

Existing Item Filter snapshot fails with stack sizes > 127

CD4017BE opened this issue ยท 1 comments

commented

Issue Description:

The Existing Item Filter doesn't list items in its snapshot of a connected inventory if the stack size of that item exceeds 127.

The tested inventory (a Item Buffer from Inductive Logistics):
inventory
The resulting snapshot:
snapshot

see also CD4017BE/InductiveLogistics#24

Steps to reproduce:

  1. connect a Item Pipe to an inventory that is capable of providing over sized item stacks via its ItemHandler capability (for example: Item Buffers from the mod InductiveLogistics or a Basic Storage Drawer from the mod StorageDrawers)
  2. put more than 127 of the same item into a single slot of said inventory.
  3. let the Item Filter take the snapshot.
    -> The item won't be listed.

Possible cause of the problem:

The filter probably directly stores the ItemStack gotten from the inventory in its NBT data. But minecrafts default method of storing ItemStacks only uses 8-bit resolution for the stacksize, so it overflows above 127.

How to fix it:

Set the stack size of the retrieved item to 1 (eventually copying necessary) before storing it in the snapshot since the stack size is probably not used by the filter anyway.


Affected Versions:

  • EnderIO: 5.0.24
  • EnderCore: 0.5.22
  • Minecraft: 1.12.2
  • Forge: 14.23.3.2655
commented

nice to learn that ItemStack's nbt methods have their own limitations that don't match ItemStack's...