1
0
Fork 0

Tweak basalt delta code

This commit is contained in:
cora 2022-06-23 01:42:20 +02:00
parent 0b3a4c18d7
commit d8697cb59c
3 changed files with 97 additions and 11 deletions

View File

@ -4574,6 +4574,72 @@ local function register_dimension_decorations()
size = {x = 5, y = 8, z = 5}, size = {x = 5, y = 8, z = 5},
rotation = "random", rotation = "random",
}) })
--BASALT DELTA
minetest.register_decoration({
deco_type = "simple",
decoration = "mcl_blackstone:basalt",
place_on = {"mcl_blackstone:basalt","mcl_nether:netherrack","mcl_blackstone:blackstone"},
sidelen = 80,
height_max = 55,
noise_params={
offset = -0.0085,
scale = 0.002,
spread = {x = 25, y = 120, z = 25},
seed = 2325,
octaves = 5,
persist = 2,
lacunarity = 3.5,
flags = "absvalue"
},
biomes = {"BasaltDelta"},
y_min = mcl_vars.mg_lava_nether_max + 1,
flags = "all_floors, all ceilings",
})
minetest.register_decoration({
deco_type = "simple",
decoration = "mcl_blackstone:basalt",
place_on = {"mcl_blackstone:basalt","mcl_nether:netherrack","mcl_blackstone:blackstone"},
sidelen = 80,
height_max = 15,
noise_params={
offset = -0.0085,
scale = 0.004,
spread = {x = 25, y = 120, z = 25},
seed = 235,
octaves = 5,
persist = 2.5,
lacunarity = 3.5,
flags = "absvalue"
},
biomes = {"BasaltDelta"},
y_min = mcl_vars.mg_lava_nether_max + 1,
flags = "all_floors, all ceilings",
})
minetest.register_decoration({
deco_type = "simple",
decoration = "mcl_nether:magma",
place_on = {"mcl_blackstone:basalt","mcl_nether:netherrack","mcl_blackstone:blackstone"},
sidelen = 80,
fill_ratio = 0.082323,
biomes = {"BasaltDelta"},
place_offset_y = -1,
y_min = mcl_vars.mg_lava_nether_max + 1,
flags = "all_floors, all ceilings",
})
minetest.register_decoration({
deco_type = "simple",
decoration = "mcl_nether:nether_lava_source",
place_on = {"mcl_blackstone:basalt","mcl_nether:netherrack","mcl_blackstone:blackstone"},
spawn_by = {"mcl_blackstone:basalt","mcl_blackstone:blackstone"},
num_spawn_by = 14,
sidelen = 80,
fill_ratio = 4,
biomes = {"BasaltDelta"},
place_offset_y = -1,
y_min = mcl_vars.mg_lava_nether_max + 1,
y_max = mcl_vars.mg_nether_max - 5,
flags = "all_floors, force_placement",
})
--[[ THE END ]] --[[ THE END ]]

View File

@ -16,7 +16,7 @@ mcl_structures.register_structure("nether_outpost",{
biomes = {"Nether","SoulsandValley","WarpedForest","CrimsonForest","BasaltDelta"}, biomes = {"Nether","SoulsandValley","WarpedForest","CrimsonForest","BasaltDelta"},
sidelen = 15, sidelen = 15,
solid_ground = true, solid_ground = true,
y_min = mcl_vars.mg_lava_nether_max, y_min = mcl_vars.mg_lava_nether_max - 1,
y_max = mcl_vars.mg_nether_max - 30, y_max = mcl_vars.mg_nether_max - 30,
filenames = { modpath.."/schematics/nether_outpost.mts" }, filenames = { modpath.."/schematics/nether_outpost.mts" },
y_offset = 0, y_offset = 0,

View File

@ -118,6 +118,13 @@ mcl_structures.register_structure("water_lake",{
end end
}) })
local pool_adjacents = {
vector.new(1,0,0),
vector.new(-1,0,0),
vector.new(0,-1,0),
vector.new(0,0,1),
vector.new(0,0,-1),
}
mcl_structures.register_structure("basalt_column",{ mcl_structures.register_structure("basalt_column",{
place_on = {"mcl_blackstone:blackstone","mcl_blackstone:basalt"}, place_on = {"mcl_blackstone:blackstone","mcl_blackstone:basalt"},
@ -126,15 +133,15 @@ mcl_structures.register_structure("basalt_column",{
num_spawn_by = 2, num_spawn_by = 2,
noise_params = { noise_params = {
offset = 0, offset = 0,
scale = 0.02, scale = 0.003,
spread = {x = 250, y = 250, z = 250}, spread = {x = 250, y = 250, z = 250},
seed = 7225213, seed = 72235213,
octaves = 5, octaves = 5,
persist = 0.1, persist = 0.3,
flags = "absvalue", flags = "absvalue",
}, },
flags = "all_floors", flags = "all_floors",
y_max = mcl_vars.mg_nether_max, y_max = mcl_vars.mg_nether_max - 20,
y_min = mcl_vars.mg_lava_nether_max + 1, y_min = mcl_vars.mg_lava_nether_max + 1,
biomes = { "BasaltDelta" }, biomes = { "BasaltDelta" },
place_func = function(pos,def,pr) place_func = function(pos,def,pr)
@ -144,14 +151,21 @@ mcl_structures.register_structure("basalt_column",{
end) end)
if #nn < 1 then return false end if #nn < 1 then return false end
local basalt = {} local basalt = {}
local magma = {}
for i=1,pr:next(1,#nn) do for i=1,pr:next(1,#nn) do
if minetest.get_node(vector.offset(nn[i],0,-1,0)).name ~= "air" then if minetest.get_node(vector.offset(nn[i],0,-1,0)).name ~= "air" then
local dst=vector.distance(pos,nn[i]) local dst=vector.distance(pos,nn[i])
for ii=0,pr:next(2,14)-dst do local r = pr:next(1,14)-dst
table.insert(basalt,vector.new(nn[i].x,nn[i].y + ii,nn[i].z)) for ii=0,r do
if pr:next(1,25) == 1 then
table.insert(magma,vector.new(nn[i].x,nn[i].y + ii,nn[i].z))
else
table.insert(basalt,vector.new(nn[i].x,nn[i].y + ii,nn[i].z))
end
end end
end end
end end
minetest.bulk_set_node(magma,{name="mcl_nether:magma"})
minetest.bulk_set_node(basalt,{name="mcl_blackstone:basalt"}) minetest.bulk_set_node(basalt,{name="mcl_blackstone:basalt"})
return true return true
end end
@ -163,13 +177,13 @@ mcl_structures.register_structure("basalt_pillar",{
offset = 0, offset = 0,
scale = 0.001, scale = 0.001,
spread = {x = 250, y = 250, z = 250}, spread = {x = 250, y = 250, z = 250},
seed = 783213, seed = 7113,
octaves = 5, octaves = 5,
persist = 0.1, persist = 0.1,
flags = "absvalue", flags = "absvalue",
}, },
flags = "all_floors", flags = "all_floors",
y_max = mcl_vars.mg_nether_max, y_max = mcl_vars.mg_nether_max-40,
y_min = mcl_vars.mg_lava_nether_max + 1, y_min = mcl_vars.mg_lava_nether_max + 1,
biomes = { "BasaltDelta" }, biomes = { "BasaltDelta" },
place_func = function(pos,def,pr) place_func = function(pos,def,pr)
@ -179,15 +193,21 @@ mcl_structures.register_structure("basalt_pillar",{
end) end)
if #nn < 1 then return false end if #nn < 1 then return false end
local basalt = {} local basalt = {}
local magma = {}
for i=1,pr:next(1,#nn) do for i=1,pr:next(1,#nn) do
if minetest.get_node(vector.offset(nn[i],0,-1,0)).name ~= "air" then if minetest.get_node(vector.offset(nn[i],0,-1,0)).name ~= "air" then
local dst=vector.distance(pos,nn[i]) local dst=vector.distance(pos,nn[i])
for ii=0,pr:next(19,34)-dst do for ii=0,pr:next(19,35)-dst do
table.insert(basalt,vector.new(nn[i].x,nn[i].y + ii,nn[i].z)) if pr:next(1,20) == 1 then
table.insert(magma,vector.new(nn[i].x,nn[i].y + ii,nn[i].z))
else
table.insert(basalt,vector.new(nn[i].x,nn[i].y + ii,nn[i].z))
end
end end
end end
end end
minetest.bulk_set_node(basalt,{name="mcl_blackstone:basalt"}) minetest.bulk_set_node(basalt,{name="mcl_blackstone:basalt"})
minetest.bulk_set_node(magma,{name="mcl_nether:magma"})
return true return true
end end
}) })