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

Bot won't spawn in Minecraft #3475

Closed
m1kelgood opened this issue Oct 10, 2024 · 1 comment
Closed

Bot won't spawn in Minecraft #3475

m1kelgood opened this issue Oct 10, 2024 · 1 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

Comments

@m1kelgood
Copy link

I'm in VSCode using Python (3.12.1) to create a bot in my Minecraft (java edition 1.20.4) using Mineflayer (0.0.14) (Node v20.16.0). I've attached the code and error I get when attempting to create the bot. I've tried with different LANs and ensured that the port number is correct, turned off some firewalls in Windows Defender firewall, and a couple of other things, all getting the same result. At this point, I'm lost and don't know why the bot won't spawn. I would greatly appreciate any help.

code:

from javascript import require, On
mineflayer = require('mineflayer')

bot = mineflayer.createBot(
    {
        'host': '127.0.0.1',
        'port': 63595,
        'username': 'python'
    }
)

Error: connect ECONNREFUSED 127.0.0.1:63595 at TCPConnectWrap.afterConnect [as incomplete] (node:net:1607:16) {
erno: -111,
code: ' ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 63595
}

@m1kelgood m1kelgood 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 Oct 10, 2024
@AkagawaTsurunaki
Copy link

mineflayer@0.0.14 is too old (released on Jan 27, 2013) to support Minecraft 1.20.4 (released around 2023).

Newer Minecraft may change the protocol between server and client. So just try out the latest version of mineflayer!

I used Node v20.17.0 to run npm install mineflayer@0.0.14, but too many compiling errors occurred so I failed to reproduce your issue.

But the good news is that the latest mineflayer@4.20.0 is supported Minecraft 1.20.4, even 1.20.6. I test your code and this time everything went well.

@rom1504 rom1504 closed this as completed Oct 25, 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

3 participants