bedrock-protocol icon indicating copy to clipboard operation
bedrock-protocol copied to clipboard

The example server can not load map to client.

Open laikee99 opened this issue 2 years ago • 5 comments

The example server can not use the map changed by the tools/dumpPacket.js, and after re download the world, the example server read 0 chunks. So the player can't get the world map.

laikee99 avatar Dec 10 '21 09:12 laikee99

/bedrock-protocol-master/node_modules/bedrock-provider/js/SubChunk.js:66
            throw new Error(`Invalid palette size: ${paletteSize}`);
                  ^

Error: Invalid palette size: 1342178568
    at SubChunk.loadPalettedBlocks (/bedrock-protocol-master/node_modules/bedrock-provider/js/SubChunk.js:66:19)
    at SubChunk.decode (/bedrock-protocol-master/node_modules/bedrock-provider/js/SubChunk.js:56:24)
    at WorldProvider.readSubChunks (/bedrock-protocol-master/node_modules/bedrock-provider/js/WorldProvider.js:53:32)
    at async WorldProvider.load (/bedrock-protocol-master/node_modules/bedrock-provider/js/WorldProvider.js:143:28)
    at async Object.requestChunks (/bedrock-protocol-master/examples/server/serverChunks.js:22:20)
    at async startServer (/bedrock-protocol-master/examples/server/server.js:42:18)

Run node example/server/server.js 1.18.0 Got errors, and before that, I can not see any block in the world.

laikee99 avatar Dec 10 '21 10:12 laikee99

image After redownload the server zip, the server can run now, but the world running by server.js is empty :( Could you please tell me how can I get the packets.

laikee99 avatar Dec 10 '21 10:12 laikee99

[root@localhost server]# node server.js
Unknown bind__() error -1; port 19181.
Started server
Loading world at path /bedrock-protocol-master/tools/bds-1.18.0/worlds/Bedrock level/db
  minecraft-protocol Listening on 0.0.0.0 19181 1.18.0 +0ms
Assertion failed
/bedrock-protocol-master/node_modules/bedrock-provider/js/SubChunk.js:88
                        throw Error('bad palette');
                              ^

Error: bad palette
    at SubChunk.loadPalettedBlocks (/bedrock-protocol-master/node_modules/bedrock-provider/js/SubChunk.js:88:31)
    at async SubChunk.decode (/bedrock-protocol-master/node_modules/bedrock-provider/js/SubChunk.js:56:13)
    at async WorldProvider.readSubChunks (/bedrock-protocol-master/node_modules/bedrock-provider/js/WorldProvider.js:53:17)
    at async WorldProvider.load (/bedrock-protocol-master/node_modules/bedrock-provider/js/WorldProvider.js:143:28)
    at async Object.requestChunks (/bedrock-protocol-master/examples/server/serverChunks.js:22:20)
    at async startServer (/bedrock-protocol-master/examples/server/server.js:43:18)

use tools/dumpPacket.js and connect the mc server, then run node server.js 1.18.0 get such error.

laikee99 avatar Dec 10 '21 10:12 laikee99

Run npm test to get dumped packets , chunk loading issue is dupe of #158

extremeheat avatar Dec 10 '21 10:12 extremeheat

T

Run npm test to get dumped packets , chunk loading issue is dupe of #158

Thanks for quick reply. So I think I can't get the packets in 1.18, I tried example/relay.js, I will lost connection the moment I enter the server. Shoud the player acccount same as the relay account? Thanks.

laikee99 avatar Dec 10 '21 10:12 laikee99