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

How to use enderearl in mineflayer #3227

Open
Maaz4f opened this issue Nov 6, 2023 · 2 comments
Open

How to use enderearl in mineflayer #3227

Maaz4f opened this issue Nov 6, 2023 · 2 comments
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

@Maaz4f
Copy link

Maaz4f commented Nov 6, 2023

I tried this code
async function useEnderPearl() {
// Check if the bot has an ender pearl
const enderPearl = bot.inventory
.items()
.find((item) => item.name === "ender_pearl");

if (enderPearl) {
  // Equip and use the ender pearl
  bot.equip(enderPearl, "hand", () => {
    bot.activateItem();

    bot.lookAt(bot.position.add(bot.direction));
    setTimeout(() => {
      bot.activateItem();
    }, 500);
  });
}

}
useEnderPearl();
The bot picks the pearl in hand but it does not use it

@Maaz4f Maaz4f 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 Nov 6, 2023
@sefirosweb
Copy link
Contributor

@Br0xx
Copy link

Br0xx commented Nov 22, 2024

so did u figure this out?

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

3 participants