Measure the surface water condition against the column's own water
The water condition asked "is this block at or above sea level", which is only the same question as vanilla's in an ocean. Vanilla asks how far the block sits below the water directly above it, and there is now water that is nowhere near y=63: the aquifer puts pools at their own levels, deep underground and up in the hills. Against sea level every one of those read as dry stone, and the stone above them read as lakebed. waterHeight is already tracked down the column, so the condition becomes the vanilla one: pass when there is no water above at all, otherwise when blockY (+ stoneDepthAbove where the rule asks for it) clears waterHeight + offset + surfaceDepth * multiplier. add_stone_depth was parsed and then ignored; three rules in the overworld tree set it. NoWaterAbove replaces a bare math.MinInt so a hand-built context cannot default to "water at y=0" by leaving the field unset.
This commit is contained in:
parent
21a10ab65e
commit
c10719cb78
4 changed files with 98 additions and 18 deletions
|
|
@ -273,18 +273,18 @@ func applySurfaceRule(out *[WorldHeight]uint16, wx, wz, seaLevel, minY int, biom
|
|||
Rng: colRng,
|
||||
}
|
||||
stoneDepthAbove := 0
|
||||
waterHeight := math.MinInt
|
||||
waterHeight := worldgen.NoWaterAbove
|
||||
nextCeilingStoneY := math.MaxInt
|
||||
for i := top; i >= 0; i-- {
|
||||
y := minY + i
|
||||
old := out[i]
|
||||
if old == StateAir {
|
||||
stoneDepthAbove = 0
|
||||
waterHeight = math.MinInt
|
||||
waterHeight = worldgen.NoWaterAbove
|
||||
continue
|
||||
}
|
||||
if isFluidState(old) {
|
||||
if waterHeight == math.MinInt {
|
||||
if waterHeight == worldgen.NoWaterAbove {
|
||||
waterHeight = y + 1
|
||||
}
|
||||
continue
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue