feather-rs / feather

A Minecraft server implementation in Rust
Apache License 2.0
2.58k stars 143 forks source link

Modify block placement code in chunk.rs to update heightmaps. #482

Open Miro-Andrin opened 2 years ago

Miro-Andrin commented 2 years ago

This issue: #451 was determined to be caused by the server not doing any light updates correctly. To implement lighting, and solve it we would have to work on the chunk code some more. https://github.com/feather-rs/feather/blob/main/feather/base/src/chunk.rs Me and some others have looked into adding lighting, but there is one thing that looks like it might be a self contained issue.

To do efficient skylight updates it would be excellent to have assess to a up to date heightmap, but as it stands one would have to call the recalculate height-map function before every skylight update. This is probably bad. It would be nice if the heightmap was kept up to date, when the chunk was modified, or at least a flag was set if it was potentially made out of date.