Equip the not equipment type item to equipment slot and able update bot.inventory. #3515
Open
1 task done
Labels
possible bug
Stage1
just created by someone new to the project, we don't know yet if it deserves an implementation / a f
Versions
Detailed description of a problem
I am using mineflayer control bot's inventory, and I want to swap the item to the equipment slot. i found the methods "bot.equip" and "bot.moveSlotItem", i tried these method to equip equipment and it's worked.
After that I try equip an
Apple
tofeet
by these method, and both worked, thebot.inventory
been updated and the window fired aupdateSlot
event. But it should not be happend. I logout and login server again, theApple
still in my inventory, but not in equipment slot. Thebot.inventory
should be sync to server's.This screenshot shows that i equipped a steak. ( The left and right vertical line is the equipment slot. the bottom is quick bar, middle is storage)
![image](https://private-user-images.githubusercontent.com/27083866/391541115-8781fee5-6276-4518-9fdd-c56e65a98aaa.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5Mzk3MzksIm5iZiI6MTczODkzOTQzOSwicGF0aCI6Ii8yNzA4Mzg2Ni8zOTE1NDExMTUtODc4MWZlZTUtNjI3Ni00NTE4LTlmZGQtYzU2ZTY1YTk4YWFhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA3VDE0NDM1OVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWQ1N2QwNmYwNDFlODliNzE3MzkwNGE4NzYyZjhjYjAxMDg2MmFlZDlkZGJhNTM4ZWY3NTA5MjkzZDQ5N2FjYTAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.A1y5yNu9dAgCHOr5gqWuWYoEhD35Y4WGMU3M3l3Bw1U)
What did you try yet?
I tried to find the same question in issues, but because my bad english did not find the same issue(may be my searched keyword is wrong).
Your current code
I am using python to write this, like the upper picture, the item will updated by
window
'supdateSlot
event.i made a simpe console to eval python code. like code:
print(self.bot.inventory)
,self.bot.equip(self.bot.inventory.slots[9], "feet")
andself.bot.moveSlotItem(9, 8)
.Expected behavior
I think the
bot.inventory
should be sync to server's. should not update and equipApple
to the equipment slot.Additional context
I am using Python to write a mineflayer application.
The text was updated successfully, but these errors were encountered: