mindcraft
mindcraft copied to clipboard
Immediate crash after logging in
Note, I tried to increase the resolve time in the agent.js script by modifying the line " // wait for a bit so stats are not undefined await new Promise((resolve) => setTimeout(resolve, 20000)); " but it didn't solve the issue. Retracing the error, it seems like the error is occurring at this line itself. Here is the the full error description
Using chat settings: { model: 'gpt-4o-mini', api: 'openai' }
Using embedding settings: { api: 'openai' }
Logging in...
/home/ayushmaniar70/mindcraft/node_modules/mineflayer/lib/plugins/breath.js:14
bot.oxygenLevel = Math.round(packet.metadata[1].value / 15)
^
TypeError: Cannot read properties of undefined (reading 'value')
at Client.<anonymous> (/home/ayushmaniar70/mindcraft/node_modules/mineflayer/lib/plugins/breath.js:14:57)
at Client.emit (node:events:529:35)
at emitPacket (/home/ayushmaniar70/mindcraft/node_modules/minecraft-protocol/src/client.js:83:12)
at FullPacketParser.<anonymous> (/home/ayushmaniar70/mindcraft/node_modules/minecraft-protocol/src/client.js:112:9)
at FullPacketParser.emit (node:events:517:28)
at addChunk (/home/ayushmaniar70/mindcraft/node_modules/readable-stream/lib/internal/streams/readable.js:321:12)
at readableAddChunk (/home/ayushmaniar70/mindcraft/node_modules/readable-stream/lib/internal/streams/readable.js:298:9)
at Readable.push (/home/ayushmaniar70/mindcraft/node_modules/readable-stream/lib/internal/streams/readable.js:244:10)
at FullPacketParser._transform (/home/ayushmaniar70/mindcraft/node_modules/protodef/src/serializer.js:89:10)
at Transform._write (/home/ayushmaniar70/mindcraft/node_modules/readable-stream/lib/internal/streams/transform.js:153:8)
Node.js v18.18.2
Agent process exited with code 1 and signal null
Agent process ./andy.json exited too quickly and will not be restarted. All agent processes have ended. Exiting.