Clean waterlily code.
This commit is contained in:
parent
061576fcc3
commit
26af8d805c
2 changed files with 3 additions and 4 deletions
|
@ -91,12 +91,10 @@ function fun_caves.decorate_water(data, area, minp, maxp, pos, ivm, biome_in, pn
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
elseif pos.y > minp.y and node_below == node("default:river_water_source") and data[ivm] == node("air") then
|
elseif pos.y > minp.y and node_below == node("default:river_water_source") and data[ivm] == node("air") and water_lily_biomes[biome] and pn > 0.5 and math.random(15) == 1 then
|
||||||
-- on top of the water
|
-- on top of the water
|
||||||
-- I haven't figured out what the decoration manager is
|
-- I haven't figured out what the decoration manager is
|
||||||
-- doing with the noise functions, but this works ok.
|
-- doing with the noise functions, but this works ok.
|
||||||
if water_lily_biomes[biome] and pn > 0.5 and math.random(15) == 1 then
|
|
||||||
return node("flowers:waterlily")
|
return node("flowers:waterlily")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
|
@ -101,6 +101,7 @@ local function detect_bull(heightmap, csize)
|
||||||
if j == heightmap[i] then
|
if j == heightmap[i] then
|
||||||
k = k + 1
|
k = k + 1
|
||||||
if k > cutoff then
|
if k > cutoff then
|
||||||
|
--print("maxp.y: "..maxp.y..", minp.y: "..minp.y..", heightmap stuck at: "..heightmap[i])
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue