PrismarineJS / bedrock-protocol

Minecraft Bedrock protocol library, with authentication and encryption
https://prismarinejs.github.io/minecraft-data/?v=bedrock_1.17.10&d=protocol
MIT License
288 stars 68 forks source link

port changing #495

Closed Lore228295 closed 2 months ago

Lore228295 commented 2 months ago

when i put a IP(not domain) it chnges to 19132. when i tried to change the port "19132" on the packages, it still shows up 19132 somehow. even if i changed the number 19132 in any packages, anyway it dont work

extremeheat commented 2 months ago

If you mean createClient is connecting on 19132 while you are putting a different port in the options, then it's probably because the server is advertising the incorrect port in its PONG message. This could be a bug in the server software, and you can check by doing

const { ping } = require('bedrock-protocol')
ping({ host: 'localhost', port: 12345 }).then(console.log)

To checkout the port that the server is returning.

Lore228295 commented 2 months ago

yes but the bot wont join with 19132. works only with the real port

If you mean createClient is connecting on 19132 while you are putting a different port in the options, then it's probably because the server is advertising the incorrect port in its PONG message. This could be a bug in the server software, and you can check by doing

const { ping } = require('bedrock-protocol')
ping({ host: 'localhost', port: 12345 }).then(console.log)

To checkout the port that the server is returning.

Lore228295 commented 2 months ago

If you mean createClient is connecting on 19132 while you are putting a different port in the options, then it's probably because the server is advertising the incorrect port in its PONG message. This could be a bug in the server software, and you can check by doing

const { ping } = require('bedrock-protocol')
ping({ host: 'localhost', port: 12345 }).then(console.log)

To checkout the port that the server is returning.

also its a realm, i just got the ipwith some mod. how do i make the bot join a realm?

extremeheat commented 2 months ago

how do i make the bot join a realm?

See the README