Questions tagged [mineflayer]

Mineflayer is a JavaScript API for creating Minecraft bots.

Create Minecraft bots with a powerful, stable, and high level JavaScript API.

https://github.com/PrismarineJS/mineflayer

25 questions
0
votes
1 answer

I am trying to make this mineflayer bot attack specific players mentioned in chat

Is there a way to give the bot a command, and type someone's username in chat with the command, for example, "attack (username)", and have it attack that player?
0
votes
1 answer

Mineflayer-pathfinder goto coordinates

I want to program that I can enter coordinates in the Minecraft chat and the bot will go to them. But I don't know how to program something like that? Can anyone help? I am new to this field and would like to test something simple, but I just can't…
Pianonic
  • 1
  • 1
0
votes
1 answer

How to make my bot to not respond to itself

I made a bot that says a question when a certain chat message is recognized and thinks whether the following another chat message is the correct answer or not. But the bot thinks that the question he said is the incorrect answer and says it's not…
Helowor1d
  • 1
  • 1
0
votes
1 answer

Cant access mineflayer pathfinder inside an object

Here is all the code in nodejs const mineflayer = require('mineflayer') const { pathfinder, Movements, goals } = require('mineflayer-pathfinder'); const GoalFollow = goals.GoalFollow function getRandomInt(min, max) { return…
0
votes
1 answer

Mineflayer (minecraft-data;pathfinder): Cannot read properties of undefined

So I´ve been trying to make a bot that followes my Minecraft character (playerCI = bot.players["Cyberyes"]), but when I try to start it, I get this…
spjdev
  • 5
  • 1
0
votes
0 answers

I am making a mineflayer pvp bot but it only attacks once

I am trying to make a pvp minecraft bot using mineflayer in javascript. This is my function for if the bot is requested to pvp: bot.loadPlugin(pvp) bot.on('chat', (username, message) =>{ if (message === 'fight me') { const player =…
0
votes
1 answer

How do you get the bot to move in node-minecraft-protocol?

I am trying to build a JavaScript Minecraft bot. I tried Mineflayer, but they do not support version 1.17.1. That's when I found out about node-minecraft-protocol, the library which mineflayer is based out of. They support version 1.17.1! I have…
Zo-Bro-23
  • 145
  • 7
0
votes
2 answers

Why doesn't my code wait for the callback

I'm programming a minecraft bot with mineflayer. I have a function that locates a block and goes to it with the help of the mineflayer-pathfinder module. Now my problem, after my bot is at his location I want to execute more code, depending on his…
0
votes
2 answers

My Mineflayer bot doesn't respond to my message

I'm using MineFlayer JS to make a basic bot that responds to a user's message. Here is the source code. The issue I'm having is that it doesn't respond to my chat message when I type /msg bot test in chat. // Importing the necessary modules const…
Supelion
  • 1
  • 1
  • 1
-1
votes
1 answer

Mineflayer bot crashes before starting digging

const mineflayer = require('mineflayer') const pathfinder = require('mineflayer-pathfinder').pathfinder const Movements = require('mineflayer-pathfinder').Movements const { GoalNear } = require('mineflayer-pathfinder').goals const inventoryViewer =…
KxAy
  • 13
  • 2
1
2