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
3
votes
0 answers

Unexpected token with mineflyer on python via a bridge in a docker continer

I am creating a ubuntu:20.04 docker container and installing python 3.9 and node 16.x along with npm. I am then running a js library with a javascript to python bridge. The library is mineflyer and I am using it to create a discord.py bot. Running…
1
vote
0 answers

Mineflayer bot for Python, logging out of the server using a third-party file

I am writing a mineflayer bot via Python: mineflayer = require('mineflayer') bot_minecraft = mineflayer.createBot({ 'host': host, 'username': username, 'version': False }) @On(bot_minecraft, 'login') …
PyChel
  • 11
  • 1
1
vote
1 answer

Get list of all positiones between two Vector3

So I want a list of all positions if I give two positions(Vector3) in Javascript. The Image is an example. I have two positions, p1 and p2. Now I need an algorith that gives me the positions of all cubes in that space. The numbers do not need to be…
iHouqLF
  • 13
  • 3
0
votes
0 answers

Mineflayer Webpanel is not working, what can i do?

I am making a bot for my minecraft server and I'm trying to use a plugin called minefaler-webpanel, but whatever I do, it doesn't work. I am currently using this for the plugin. const webpanel = require('mineflayer-webpanel') // other…
morisok
  • 1
  • 1
0
votes
1 answer

How to correctly transfer an object created by a module in another js file to a class

I have an object that is created based on modules const mineflayer = require('mineflayer'); const {pathfinder, Movements, goals : {GoalNear, GoalFollow}} = require('mineflayer-pathfinder'); const bot = mineflayer.createBot({ host: '127.0.0.1',…
Vyakoo
  • 1
0
votes
0 answers

cannot read properties of undefined (reading 'position') Minecraft mineflayer

I'm programming a Minecraft bot to follow me, I used this code in lot of projects before 8 months and it worked. But now I have a problem that NodeJS is saying he cannot read 'position'. Code : const mineflayer = require("mineflayer") const {…
Ahmed WG
  • 25
  • 5
0
votes
1 answer

Minecraft ERRCONNECT MINEFLAYER ERROR Error: connect ECONNREFUSED ::1:25595

I am Recieving this errror when i run this simple code snippet import mineflayer from 'mineflayer'; const bot = mineflayer.createBot({ host: 'localhost', port: 25595, username: 'Maaz_Bot', // minecraft username password:'' }) I was…
0
votes
1 answer

Server rejected transaction for clicking on slot ${slot}, on window with id ${window?.id}

I am trying to click on the window in the minecraft server menu, but when I try to do this I get an error: throw new Error(`Server rejected transaction for clicking on slot ${slot}, on window with id ${window?.id}.`) I think this is due to the fact…
kostya
  • 38
  • 5
0
votes
0 answers

How can I detect the distance between 2 entities, in mineflayer?

I am trying to make the bot attack everything it sees, but it gets kicked for trying to hit something out of it's reach, here is my code var settings = { username: 'testingbot', host: 'localhost', port: 25565, }; const bot =…
RGB_CATT
  • 37
  • 8
0
votes
0 answers

async function wont break node.js (.mjs)

I'm trying to pause this function using the breakTheLoop var but it wont work. This is the code if anyone could help me out ` async afk(message) { var breakTheLoop = false; while (!breakTheLoop) { await new…
0
votes
1 answer

Error in mineflayer: Unsupported brand channel name

I'm trying to make a mineflayer bot but it seems to keep sending the same error. Here is the code: const mineflayer = require('mineflayer') const bot = mineflayer.createBot({ host: 'localhost', port: , username: 'Test_Bot' }) And here is the…
0
votes
1 answer

Mineflayer bot.look at a direction

Ok so im making a minecraft bot app and im using mineflayer but I cant seem to figure out on how do I make the bot look at a direction such a north or south I tried doing bot.lookAt(north) but that didnt work I searched the api documentation but…
MrFiend
  • 58
  • 4
0
votes
0 answers

How to make the mineflayer bot not break blocks endlessly on a specific minecraft server?

I want my bot not to dig blocks endlessly on the mc.mstnw.net Minecraft server. I expected that the bot will dig blocks like in the local world, but after he breaks 2-3 blocks normally, he starts digging them endlessly, after that it is kicked by…
Arothron
  • 1
  • 2
0
votes
1 answer

How do I make my mineflayer sprint while he following me?

I'm making mineflayer bot he follow me and try to kill me so when I go far from him he stop from following me, And he has other problems like while he bridge he fall as stupid so how I can make him sprint while he follow me My code : const {…
Ahmed WG
  • 25
  • 5
0
votes
0 answers

movement.entities.reduce is not a function or its return value is not iterable

So I have no idea what is going on, I got this code from a friend and I'm slowly learning how it works. This code is supposed to generate a random "movement" action inside a video game. It used to work smoothly, but after a couple of updates and…
1
2