-
Notifications
You must be signed in to change notification settings - Fork 60
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
networkDecodeNoCache super call passes Stream instead of Buffer #182
Comments
It's also worth noting that this line should return as errors thrown inside this super call cannot be caught and the app will crash.
|
This isn't a condition that should generally be hit at all. Feel free to open a PR to fix. |
Really? I'm seeing that condition hit 100% of the time with 1.18.30 level_chunk packet data. Also the presence of border blocks. |
Bedrock 1.18.30 chunks are not currently supported, 1.18.0 chunks are. |
I implemented experimental support for newer chunks and fixed 2 errors I found. I'm not sure how to go about doing a PR though as I don't have write access. Should I create a fork and link to that? |
Yes you can open a PR. You need to fork, push changes to your branch and make a PR to merge your branch into PrismarineJs master |
Only change with bedrock 1.18.10 over .0 I believe was an extra byte in the stream header. Will address this in a PR tomorrow, hopefully Mojang doesn't ship 1.19 before then 😅. |
So what I ended up doing was implement my own ChunkColumn and SubChunk classes because updating prismarine was creating a bit of a blocker for me. I mostly just added a condition for when the sub_chunk_count is -2 to just loadBiomes and ignore the rest of the data. It's still a few days before 1.19 ships! |
mode -2 (added in 1.18.30) appears to just add an extra field to the LevelChunk packet excluding the change with the RequestSubChunk now taking arrays. Could be more changes, needs more investigation. Will address tomorrow if it's just that, no other changes with 1.19 it seems like |
Turns out there were more changes with chunk request procedure. This needs to be handled in bedrock provider tests |
The super call this function makes parses the Stream instead of Buffer, which throws an error since new Stream(stream) doesn't type check that it is a buffer and handle accordingly.
prismarine-chunk/src/bedrock/1.18/ChunkColumn.js
Line 149 in 0f4ec64
The text was updated successfully, but these errors were encountered: