I am testing at a bot on a 1.12.2 server. The bot joins the server and executes a command to get to his home. After arriving at the home point it crashes with the error below.
I saw there was an almost similar error at the version 1.8 which is now fixed.
RangeError [ERR_OUT_OF_RANGE]: The value of "value" is out of range. It must be >= 0 and <= 65535. Received -1
at checkInt (internal/buffer.js:35:11)
at writeU_Int16LE (internal/buffer.js:539:3)
at Buffer.writeUInt16LE (internal/buffer.js:547:10)
at Chunk.eatPackedBlockLongs (C:\Users\abc\Documents\Coding\JavaScript\projects\bot\node_modules\prismarine-chunk\src\pc\1.9\chunk.js:431:23)
at Chunk.unpackChunkData (C:\Users\abc\Documents\Coding\JavaScript\projects\bot\node_modules\prismarine-chunk\src\pc\1.9\chunk.js:360:31)
at Chunk.load (C:\Users\abc\Documents\Coding\JavaScript\projects\bot\node_modules\prismarine-chunk\src\pc\1.9\chunk.js:332:31)
at addColumn (C:\Users\abc\Documents\Coding\JavaScript\projects\bot\node_modules\mineflayer\lib\plugins\blocks.js:91:14)
at Client.bot._client.on (C:\Users\abc\Documents\Coding\JavaScript\projects\bot\node_modules\mineflayer\lib\plugins\blocks.js:225:5)
at Client.emit (events.js:189:13)
at FullPacketParser.deserializer.on (C:\Users\abc\Documents\Coding\JavaScript\projects\bot\node_modules\minecraft-protocol\src\client.js:87:12)
Expected behavior
The error is caused by prismarine-chunk so I suppose it's caused by a incorrectly loaded chunk.
Versions
Detailed description of a problem
I am testing at a bot on a 1.12.2 server. The bot joins the server and executes a command to get to his home. After arriving at the home point it crashes with the error below. I saw there was an almost similar error at the version 1.8 which is now fixed.
Current code
Expected behavior
The error is caused by prismarine-chunk so I suppose it's caused by a incorrectly loaded chunk.