-
Notifications
You must be signed in to change notification settings - Fork 140
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
Fix various world loading problems (Issue #265) #269
Conversation
I spent waaaay to much time on those packed u9 heightmap arrays. Finally everything works, tests are implemented and deserializing a vanilla chunk gives sensible heightmap data. |
Huh, I just can't replicate that clippy warning. Even running explicitely with |
Sorry but I can't replicate this warning locally, so I can only rely on CI to tell me whether I fixed the clippy warning
I swear I ran cargo fmt like a thousand times already but yeah okay
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this is great work!
Thanks for all the comments! I'm sorry there had to be so many. I got a bit sloppy in the end and just wanted to be done with it. This turned into a way bigger thing than I thought it would. |
Alright, so I have actually implemented serde serialization for chunk data in my local working copy now and everything works. I am not sure whether to include it in this PR or put it into a separate one. That would also fix the server panicking when failing to save a chunk and put out a warning instead. |
Nice, thanks for that! I think the new serialization probably belongs in another PR—this PR is pretty much ready to merge. |
Alright, then everything else would be for another PR so this would be ready to merge from my side. |
Great, thank you! |
This PR aims to fix a few issues I encoutered when trying to load a vanilla world. Mainly this fixes the format of heightmaps in chunk data.
This is basically ready to merge, just needs a little polish. Namely:
packed_u9
.(I just can't figure out how to return an error from
serialize
ordeserialize
. I thoughtserde::ser::Error::custom("my error")
would do the trick but rustc says nope.)packed_u9
/Heightmaps::packed_i64_vec
.cargo fmt
and checkcargo clippy
.Resolves #265.