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

The example server can not load map to client. #163

Open
laikee99 opened this issue Dec 10, 2021 · 5 comments
Open

The example server can not load map to client. #163

laikee99 opened this issue Dec 10, 2021 · 5 comments

Comments

@laikee99
Copy link

laikee99 commented Dec 10, 2021

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
Copy link
Author

/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
Copy link
Author

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 laikee99 changed the title Error: Cannot find module '../data/1.18.0/protocol.json' The example server can not load map to client. Dec 10, 2021
@laikee99
Copy link
Author

[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.

@extremeheat
Copy link
Member

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

@laikee99
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants