From 26af8d805c27e8d46f85cc359f4e61a5591c1c35 Mon Sep 17 00:00:00 2001 From: Duane Robertson Date: Mon, 23 May 2016 05:50:17 -0500 Subject: [PATCH] Clean waterlily code. --- deco_water.lua | 6 ++---- mapgen.lua | 1 + 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/deco_water.lua b/deco_water.lua index 5a39de9..650336d 100644 --- a/deco_water.lua +++ b/deco_water.lua @@ -91,12 +91,10 @@ function fun_caves.decorate_water(data, area, minp, maxp, pos, ivm, biome_in, pn 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 -- I haven't figured out what the decoration manager is -- 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") - end + return node("flowers:waterlily") end end diff --git a/mapgen.lua b/mapgen.lua index f2ca6bd..f9d2d69 100644 --- a/mapgen.lua +++ b/mapgen.lua @@ -101,6 +101,7 @@ local function detect_bull(heightmap, csize) if j == heightmap[i] then k = k + 1 if k > cutoff then + --print("maxp.y: "..maxp.y..", minp.y: "..minp.y..", heightmap stuck at: "..heightmap[i]) return true end else