CC: Tweaked

CC: Tweaked

57M Downloads

[MC 1.12.2][CC:T 1.87.0] When using a chest as a peripheral, getItem() and getItemMeta() return an empty table

zuniganoel opened this issue ยท 2 comments

commented

Running list() accurately returns all the items in the chest, indicating the issue is with getItem() and getItemMeta()

Testing Procedure:

Chest hooked up to any side of turtle

Odd slots were filled with different items, tools, and blocks. All were tested as stacks and single items, damaged and undamaged, and both modded and vanilla items were used.

Code was written to iterate over the chest and run both getItem() and getItemMeta() for each slot.

All filled slots returned a table of size 0, empty slots returned nil.

commented

how are you testing the table size? I belive that the table only has nonnumeric keys and that all the size caculators built into lua/CC only count numeric keys

commented

Yup, marking as closed. I completely misunderstood what was being returned. Your comment helped me realize that, thank you!