chunky
chunky copied to clipboard
Refactor octree finalization, make water level independent of block solid property, fix water level below submerged blocks.
This PR uses the previously introduced FinalizationState
abstraction for the octree finalizer so that chunk and octree finalization (eg. blocks in the chunks and blocks at the edge of chunks) can use the same code. It also fixes the water level of water blocks that are underwater but have no water on top of them (image 1 below).
Water still doesn't behave exactly as in Minecraft (per-corner water levels), but it's close enough imho.
Fixes #1236
TODO:
- [ ] Check lava
- [ ] Cleanup (maybe get rid of the water methods in
FinalizationState
?) - [ ] Check if legacy block finalization still works
- [ ] Look into #1247 by figuring out whether we are at the edge of the selected chunks in
FinalizationState
Preview:
Haven't yet looked carefully through the changes in logic, but I like the idea. Anything that moves code out of Scene
is great
Not ready for merge yet, but I'll finish this in two weeks.