1
0
Fork 0

Add lots of water lakes to mangrove swamps

mobs-redo
cora 2022-08-10 13:52:19 +02:00
parent b7f26e2ddc
commit 0bcbea4ce3
1 changed files with 23 additions and 2 deletions

View File

@ -29,7 +29,7 @@ local function airtower(pos,tbl,h)
end
end
local function makelake(pos,size,liquid,placein,border,pr)
local function makelake(pos,size,liquid,placein,border,pr,noair)
local node_under = minetest.get_node(vector.offset(pos,0,-1,0))
local p1 = vector.offset(pos,-size,-1,-size)
local p2 = vector.offset(pos,size,-1,size)
@ -70,7 +70,7 @@ local function makelake(pos,size,liquid,placein,border,pr)
end
if border == nil or border == "mcl_core:dirt" then border = "mcl_core:dirt_with_grass" end
end
if an.name ~= liquid then
if not noair and an.name ~= liquid then
table.insert(br,pp)
if un.name ~= liquid then
airtower(pp,air,55)
@ -209,6 +209,27 @@ mcl_structures.register_structure("water_lake",{
end
})
mcl_structures.register_structure("water_lake_mangrove_swamp",{
place_on = {"mcl_mud:mud"},
biomes = { "MangroveSwamp" },
terrain_feature = true,
noise_params = {
offset = 0,
scale = 0.0032,
spread = {x = 250, y = 250, z = 250},
seed = 6343241353,
octaves = 3,
persist = 0.001,
flags = "absvalue",
},
flags = "place_center_x, place_center_z, force_placement",
y_max = mcl_vars.mg_overworld_max,
y_min = minetest.get_mapgen_setting("water_level"),
place_func = function(pos,def,pr)
return makelake(pos,3,"mcl_core:water_source",{"group:material_stone", "group:sand", "group:dirt","group:grass_block","mcl_mud:mud"},"mcl_mud:mud",pr,true)
end
})
local pool_adjacents = {
vector.new(1,0,0),
vector.new(-1,0,0),