chunky icon indicating copy to clipboard operation
chunky copied to clipboard

Refactor octree finalization, make water level independent of block solid property, fix water level below submerged blocks.

Open leMaik opened this issue 2 years ago • 2 comments

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: image image image

leMaik avatar Jun 06 '22 17:06 leMaik

Haven't yet looked carefully through the changes in logic, but I like the idea. Anything that moves code out of Scene is great

NotStirred avatar Jul 12 '22 20:07 NotStirred

Not ready for merge yet, but I'll finish this in two weeks.

leMaik avatar Jul 13 '22 05:07 leMaik