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

Implement MOTION_BLOCKING heightmap. #104

Closed
1 task done
Tracked by #288
rj00a opened this issue Oct 7, 2022 · 2 comments
Closed
1 task done
Tracked by #288

Implement MOTION_BLOCKING heightmap. #104

rj00a opened this issue Oct 7, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@rj00a
Copy link
Member

rj00a commented Oct 7, 2022

If I'm not mistaken, rain uses this heightmap to determine when it should stop falling. Once weather is implemented, the heightmap can be properly tested.

@rj00a rj00a added the enhancement New feature or request label Oct 7, 2022
@rj00a rj00a self-assigned this Oct 7, 2022
@dyc3
Copy link
Collaborator

dyc3 commented Dec 22, 2022

According to this: https://minecraft.fandom.com/wiki/Chunk_format

MOTION_BLOCKING: The highest block that blocks motion or contains a fluid.

There's also

MOTION_BLOCKING_NO_LEAVES: The highest block that blocks motion or contains a fluid and is not in the minecraft:leaves tag.

@rj00a rj00a removed their assignment Feb 12, 2023
@rj00a rj00a mentioned this issue Mar 12, 2023
56 tasks
@rj00a rj00a changed the title Implement MOTION_BLOCKING heightmap in chunk.rs Implement MOTION_BLOCKING heightmap. May 30, 2023
@tim-kt tim-kt mentioned this issue Sep 5, 2023
6 tasks
rj00a added a commit that referenced this issue Sep 17, 2023
# Objective
Aims to implement #104.

# 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:
- [x] Encode (constant) heightmap and send it in the `ChunkDataS2c`
packet
- [x] Build heightmap in `write_init_packets`
- [x] Find out which blocks are "motion-blocking"
- [x] Implement a `blocks_motion` function
- [x] Change `weather.rs` to test the functionality`WORLD_SURFACE`
- [x] Find out why one needs to add 2 to the heightmap

---------

Co-authored-by: Ryan Johnson <[email protected]>
@tim-kt
Copy link
Contributor

tim-kt commented Sep 17, 2023

Implemented by #523, can be closed.

@rj00a rj00a closed this as completed Sep 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants