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

help #3413

Closed
Kaleert opened this issue Jul 2, 2024 · 1 comment
Closed

help #3413

Kaleert opened this issue Jul 2, 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

@Kaleert
Copy link

Kaleert commented Jul 2, 2024

mineflayer - lastest
MC: 1 20 6 with ViaBackwards and ViaVersion
node: 20

error:
C:\Users\Kaleert\Desktop>node bot.js
C:\Users\Kaleert\Desktop\node_modules\minecraft-protocol\src\transforms\framing.js:67
} else { throw e }
^

TypeError: Cannot read properties of undefined (reading 'overworld')
at handleRespawnPacketData (C:\Users\Kaleert\Desktop\node_modules\mineflayer\lib\plugins\game.js:46:63)
at Client. (C:\Users\Kaleert\Desktop\node_modules\mineflayer\lib\plugins\game.js:80:5)
at Client.emit (node:events:531:35)
at emitPacket (C:\Users\Kaleert\Desktop\node_modules\minecraft-protocol\src\client.js:83:12)
at FullPacketParser. (C:\Users\Kaleert\Desktop\node_modules\minecraft-protocol\src\client.js:112:9)
at FullPacketParser.emit (node:events:519:28)
at addChunk (C:\Users\Kaleert\Desktop\node_modules\protodef\node_modules\readable-stream\lib_stream_readable.js:279:12)
at readableAddChunk (C:\Users\Kaleert\Desktop\node_modules\protodef\node_modules\readable-stream\lib_stream_readable.js:262:11)
at Readable.push (C:\Users\Kaleert\Desktop\node_modules\protodef\node_modules\readable-stream\lib_stream_readable.js:228:10)
at Transform.push (C:\Users\Kaleert\Desktop\node_modules\protodef\node_modules\readable-stream\lib_stream_transform.js:132:32)

file:
const mineflayer = require('mineflayer')

const bot = mineflayer.createBot({
host: 'localhost', // айпи майнкрафт сервера
username: 'kaleert1', // ник бота
auth: 'offline' // для пираток нужно заменить на 'offline'
// port: 25565, // прописывайте, если порт не 25565
// version: false, // прописывайте, если нужна конкретная версия или снапшот (например: "1.8.9" или "1.16.5"), иначе версия будет выбрана автоматически
// password: '12345678' // прописывайте, если хотите использовать аутентификацию через пароль (может быть ненадёжно)
})

bot.on('chat', (username, message) => {
if (username === bot.username) return
bot.chat(message)
})

// Логирование ошибок и причин отключения от сервера:
bot.on('kicked', console.log)
bot.on('error', console.log)
// end file

@Kaleert Kaleert 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 Jul 2, 2024
@rom1504
Copy link
Member

rom1504 commented Jul 2, 2024

Duplicate of #3406

@rom1504 rom1504 marked this as a duplicate of #3406 Jul 2, 2024
@rom1504 rom1504 closed this as completed Jul 2, 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

2 participants