1
0
Fork 0

get water level from mapgen params

mineclone_compatibility
FaceDeer 2017-01-26 22:07:09 -07:00
parent 2fd5ed6892
commit 32b11a29d1
1 changed files with 3 additions and 2 deletions

View File

@ -132,7 +132,8 @@ minetest.register_node("dynamic_liquid:clay", clay_def)
if springs then
local c_clay = minetest.get_content_id("default:clay")
local c_spring_clay = minetest.get_content_id("dynamic_liquid:clay")
local water_level = minetest.get_mapgen_params().water_level
-- Turn mapgen clay into spring clay
minetest.register_on_generated(function(minp, maxp, seed)
if minp.y >= 0 or maxp.y <= -15 then
@ -159,7 +160,7 @@ if springs then
action = function(pos,node)
local check_node
local check_node_name
while pos.y <= 0 do -- TODO: find mapgen water level for this check
while pos.y < water_level do
pos.y = pos.y + 1
check_node = get_node(pos)
check_node_name = check_node.name