PrismarineJS/prismarine-windows

containerItems is not a function

Naomi-alt opened this issue · 3 comments

It seems that containerItems() isn't a existing function, while it does say it is in the readme? Is the readme not updated or is something else happening here?

I removed it in this PR #7 and didn't update the api (my bad)
The idea was to simplify the code by having a single class representing all windows (and not all windows are containers).
The new generic itemsRange(start, end) can be used to retrieve all items between 2 slots. So, this code: https://github.com/PrismarineJS/mineflayer/blob/master/lib/chest.js#L31 is equivalent to the old containerItems() function. We could add it back if you think that's useful, or edit the api doc.

itemsRange should be enough. So we just need to make sure containerItems is removed from the readme, so future people won't think it is an existing function.

We should update the API.