Add basalt columns & lava pools

This commit is contained in:
cora 2022-06-17 03:09:40 +02:00
parent 3c79685c48
commit 8efbd89b6a
5 changed files with 113 additions and 7 deletions

@ -189,6 +189,9 @@ local list_of_all_biomes = {
"MesaBryce",
"JungleEdge",
"SavannaM",
"Nether",
"WarpedForest",
"SoulsandValley"
}
-- count how many mobs are in an area

@ -751,6 +751,8 @@ mcl_mobs:spawn_specific(
"JungleM_underground",
"ExtremeHillsM_underground",
"JungleEdgeM_underground",
"Nether",
"WarpedForest"
},
0,
7,

@ -286,6 +286,8 @@ mcl_mobs:spawn_specific(
"JungleM_underground",
"ExtremeHillsM_underground",
"JungleEdgeM_underground",
"Nether",
"SoulsandValley"
},
0,
7,

@ -4083,6 +4083,17 @@ local function register_dimension_decorations()
max_height = 5,
decoration = "mcl_crimson:twisting_vines",
})
minetest.register_decoration({
deco_type = "simple",
place_on = {"mcl_crimson:warped_nylium"},
sidelen = 16,
fill_ratio = 0.0812,
biomes = {"WarpedForest"},
y_min = mcl_vars.mg_lava_nether_max + 1,
flags = "all_floors",
max_height = 5,
decoration = "mcl_crimson:warped_roots",
})
-- CRIMSON FOREST
minetest.register_decoration({
deco_type = "simple",
@ -4110,19 +4121,30 @@ local function register_dimension_decorations()
deco_type = "simple",
place_on = {"mcl_crimson:crimson_nylium"},
sidelen = 16,
fill_ratio = 0.012,
fill_ratio = 0.082,
biomes = {"CrimsonForest"},
y_min = mcl_vars.mg_lava_nether_max + 1,
flags = "all_floors",
max_height = 5,
decoration = "mcl_crimson:crimson_roots",
})
minetest.register_decoration({
deco_type = "simple",
place_on = {"mcl_crimson:crimson_nylium"},
sidelen = 16,
fill_ratio = 0.052,
biomes = {"CrimsonForest"},
y_min = mcl_vars.mg_lava_nether_max + 1,
flags = "all_floors",
decoration = "mcl_crimson:nether_sprouts",
})
--SOULSAND VALLEY
minetest.register_decoration({
deco_type = "simple",
place_on = {"mcl_blackstone:soul_soil","mcl_nether:soulsand"},
sidelen = 16,
fill_ratio = 0.012,
fill_ratio = 0.082,
biomes = {"SoulsandValley"},
y_min = mcl_vars.mg_lava_nether_max + 1,
flags = "all_floors",

@ -22,13 +22,13 @@ local function airtower(pos)
end
end
local function makelake(pos,size,liquid,border,pr)
local function makelake(pos,size,liquid,placein,border,pr)
local node_under = minetest.get_node(vector.offset(pos,0,1,0))
local p1 = vector.offset(pos,-size,-size,-size)
local p2 = vector.offset(pos,size,size,size)
local nn = minetest.find_nodes_in_area(p1,p2,{"group:material_stone", "group:sand", "group:dirt"})
local nn = minetest.find_nodes_in_area(p1,p2,placein)
table.sort(nn,function(a, b)
return vector.distance(pos, a) < vector.distance(pos, b)
return vector.distance(vector.new(pos.x,0,pos.z), a) < vector.distance(vector.new(pos.x,0,pos.z), b)
end)
if not nn[1] then return end
local y = pos.y + 1
@ -82,7 +82,7 @@ mcl_structures.register_structure("lavapool",{
y_max = mcl_vars.mg_overworld_max,
y_min = minetest.get_mapgen_setting("water_level"),
place_func = function(pos,def,pr)
return makelake(pos,5,"mcl_core:lava_source","mcl_core:stone",pr)
return makelake(pos,5,"mcl_core:lava_source","mcl_core:stone",{"group:material_stone", "group:sand", "group:dirt"},pr)
end
})
@ -101,6 +101,83 @@ mcl_structures.register_structure("water_lake",{
y_max = mcl_vars.mg_overworld_max,
y_min = minetest.get_mapgen_setting("water_level"),
place_func = function(pos,def,pr)
return makelake(pos,5,"mcl_core:water_source",nil,pr)
return makelake(pos,5,"mcl_core:water_source",{"group:material_stone", "group:sand", "group:dirt"},nil,pr)
end
})
mcl_structures.register_structure("basalt_column",{
place_on = {"mcl_blackstone:blackstone","mcl_blackstone:basalt"},
spawn_by = {"air"},
num_spawn_by = 2,
noise_params = {
offset = 0,
scale = 0.01,
spread = {x = 250, y = 250, z = 250},
seed = 78375213,
octaves = 5,
persist = 0.1,
flags = "absvalue",
},
flags = "all_floors",
y_max = mcl_vars.mg_nether_max,
y_min = mcl_vars.mg_lava_nether_max + 1,
biomes = { "BasaltDelta" },
place_func = function(pos,def,pr)
local nn = minetest.find_nodes_in_area(vector.offset(pos,-5,-1,-5),vector.offset(pos,5,-1,5),{"air","mcl_blackstone:basalt","mcl_blackstone:blackstone"})
table.sort(nn,function(a, b)
return vector.distance(vector.new(pos.x,0,pos.z), a) < vector.distance(vector.new(pos.x,0,pos.z), b)
end)
if #nn < 1 then return false end
for i=1,pr:next(1,#nn) do
local dst=vector.distance(pos,nn[i])
for ii=0,pr:next(1,15)-dst do
set_node_no_bedrock(vector.new(nn[i].x,nn[i].y + ii,nn[i].z),{name="mcl_blackstone:basalt"})
end
end
return true
end
})
mcl_structures.register_structure("netherlavapool",{
place_on = {"mcl_blackstone:blackstone","mcl_blackstone:basalt"},
spawn_by = {"mcl_blackstone:basalt","mcl_blackstone:blackstone"},
num_spawn_by = 2,
noise_params = {
offset = 0,
scale = 0.01,
spread = {x = 250, y = 250, z = 250},
seed = 78375213,
octaves = 5,
persist = 0.1,
flags = "absvalue",
},
flags = "all_floors",
y_max = mcl_vars.mg_nether_max,
y_min = mcl_vars.mg_lava_nether_max + 1,
biomes = { "BasaltDelta" },
place_func = function(pos,def,pr)
local nn = minetest.find_nodes_in_area(vector.offset(pos,-15,-1,-15),vector.offset(pos,15,-1,15),{"mcl_blackstone:basalt","mcl_blackstone:blackstone"})
table.sort(nn,function(a, b)
return vector.distance(vector.new(pos.x,0,pos.z), a) < vector.distance(vector.new(pos.x,0,pos.z), b)
end)
if #nn < 1 then return false end
local lava = {}
for i=1,pr:next(1,#nn) do
set_node_no_bedrock(nn[i],{name="mcl_nether:nether_lava_source"})
table.insert(lava,nn[i])
end
for _,v in pairs(lava) do
for _,vv in pairs(adjacents) do
local p = vector.add(v,vv)
if minetest.get_node(p).name ~= "mcl_nether:nether_lava_source" then
set_node_no_bedrock(p,{name="mcl_blackstone:basalt"})
end
end
if math.random(3) == 1 then
set_node_no_bedrock(v,{name="mcl_nether:magma"})
end
end
return true
end
})