-
-
Notifications
You must be signed in to change notification settings - Fork 144
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
MOTION_BLOCKING
heightmap
#523
Conversation
Add `encode_heightmap` function to encode the heightmap into the necessary format
…/valence into motion_blocking_heightmap
I think it would be good to update the weather example to show this functionality. |
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.
The way I think we should handle this is by keeping the heightmaps completely contained in the write_init_packets
function. We can rebuild the heightmaps there from scratch whenever the ChunkDataS2c
packet cache needs to be created. This would avoid all the complexity involved in updating the heightmap whenever a block is modified.
We should also figure out which blocks exactly are considered "motion blocking" by the game and extract that information. And also figure out what WORLD_SURFACE
is used for.
It seems like "motion-blocking" blocks are more or less solid and liquid blocks, waterlogged blocks included. One way to check this would be to examine the packets of the vanilla server in |
Helper functions: `world_surface` and `motion_blocking` (currently producing the same heightmap) Add stairway and sign to `weather.rs` example
You'll want to take a look at the So it seems like the main thing we're missing is an |
extractor/src/main/java/rs/valence/extractor/extractors/Blocks.java
Outdated
Show resolved
Hide resolved
Revert changes to `entities.json` and `tags.json` Revert (some) changes to extractor
Co-authored-by: Ryan Johnson <[email protected]>
Objective
Aims to implement #104. This is a draft, I don't necessarily need a review yet.
Solution
The server needs to generate a heightmap when chunks are generated, update them when blocks are changed, and send it in the
ChunkDataS2c
packet.I think the implementation should be done in the following order:
ChunkDataS2c
packetwrite_init_packets
blocks_motion
functionweather.rs
to test the functionalityWORLD_SURFACE