Open CordasMC opened 1 year ago
how did you solve it?
how did you solve it?
I didn't
I had fixed it a while ago, I modified a file in the npm manually. if you are interested I am looking for my old bot and I will send you the file.
Can anyone confirm if this is still a problem after running npm update --depth 9999
?
Versions
Detailed description of a problem
Im building a bot that connects to a server, sneaks and reconnects every 31 seconds until it menaged to do so when the kick or end event is called. On running this, before the spawn event is even called( I think this is an important piece to solving the puzzle) I get the error: "TypeError: Cannot read properties of undefined (reading 'setBlockEntity') at Client. (/root/node_modules/mineflayer/lib/plugins/blocks.js:417:14)
at Client.emit (node:events:512:28)
at emitPacket (/root/node_modules/minecraft-protocol/src/client.js:83:12)
at FullPacketParser. (/root/node_modules/minecraft-protocol/src/client.js:106:9)
at FullPacketParser.emit (node:events:512:28)
at addChunk (/root/node_modules/protodef/node_modules/readable-stream/lib/_stream_readable.js:279:12)
at readableAddChunk (/root/node_modules/protodef/node_modules/readable-stream/lib/_stream_readable.js:262:11)
at Readable.push (/root/node_modules/protodef/node_modules/readable-stream/lib/_stream_readable.js:228:10)
at Transform.push (/root/node_modules/protodef/node_modules/readable-stream/lib/_stream_transform.js:132:32)
at FullPacketParser._transform (/root/node_modules/protodef/src/serializer.js:89:10)
"
What did you try yet?
I have:
Your current code
Expected behavior
Once the spawn event is called, wait 5 seconds and start sneaking. Once the end or kick event is called, try to reconnect every 31 seconds until the reconnect was succesful.
Additional context
none