PrismarineJS/prismarine-windows

Shield slot not handled

duralakun opened this issue · 2 comments

When using the clickWindow function. You can select items and place them everywhere except for
the shield slot. When trying to click the shield slot, it will work (i think) but not update the information for your bot. So you get no response, the bot thinks it dident click on the slot, wich will cause errors if you call clickWindow again. (and drop your item)

The shield slot is the last slot in the inventory. To fix this increase link

var INVENTORY_SLOT_COUNT = 36;

by 1, to

var INVENTORY_SLOT_COUNT = 37;

I am again not sure if this breaks something else, so far it works fine for me. If it causes any problem i will come back and report.

why did you close it ?

That seems like something to do indeed.

its not as easy to fix as i thought.

Here is an image that shows the different slot numbers.
Slot 45 (the last slot) is the shield slot.
But when you open a chest the shield slot disappears. So the last slot will be the last in the quick menu (slot 44 in the image)