Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Equip the not equipment type item to equipment slot and able update bot.inventory. #3515

Open
1 task done
SmileYik opened this issue Dec 2, 2024 · 0 comments
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

Comments

@SmileYik
Copy link

SmileYik commented Dec 2, 2024

  • The FAQ doesn't contain a resolution to my issue

Versions

  • mineflayer: lasted
  • server: vanilla 1.12.2
  • node: lasted

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 to feet by these method, and both worked, the bot.inventory been updated and the window fired a updateSlot event. But it should not be happend. I logout and login server again, the Apple still in my inventory, but not in equipment slot. The bot.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

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's updateSlot 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") and self.bot.moveSlotItem(9, 8).

Expected behavior

I think the bot.inventory should be sync to server's. should not update and equip Apple to the equipment slot.

Additional context

I am using Python to write a mineflayer application.

@SmileYik SmileYik added possible bug Stage1 just created by someone new to the project, we don't know yet if it deserves an implementation / a f labels Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
possible bug Stage1 just created by someone new to the project, we don't know yet if it deserves an implementation / a f
Projects
None yet
Development

No branches or pull requests

1 participant