1
0
Fork 0

use noise instead of fill_ratio for distribution

This commit is contained in:
cora 2022-06-13 11:59:15 +02:00
parent 9c6aafa3c1
commit 726d1f07fa
4 changed files with 41 additions and 9 deletions

View File

@ -51,7 +51,7 @@ local function makegeode(pos,pr)
for _,v in pairs(calcite) do for _,v in pairs(calcite) do
for _,vv in pairs(minetest.find_nodes_in_area(vector.offset(v,-1,-1,-1),vector.offset(v,1,1,1),{"group:material_stone"})) do for _,vv in pairs(minetest.find_nodes_in_area(vector.offset(v,-1,-1,-1),vector.offset(v,1,1,1),{"group:material_stone"})) do
set_node_no_bedrock(vv,{name="mcl_deepslate:deepslate"}) --Replace with smooth basalt when available set_node_no_bedrock(vv,{name="mcl_blackstone:basalt_smooth"})
end end
end end
@ -66,7 +66,15 @@ end
mcl_structures.register_structure("geode",{ mcl_structures.register_structure("geode",{
place_on = {"mcl_core:stone"}, place_on = {"mcl_core:stone"},
fill_ratio = 0.0001, noise_params = {
offset = 0,
scale = 0.00022,
spread = {x = 250, y = 250, z = 250},
seed = 7894353,
octaves = 3,
persist = 0.001,
flags = "absvalue",
},
flags = "place_center_x, place_center_z, force_placement", flags = "place_center_x, place_center_z, force_placement",
biomes = ocean_biomes, biomes = ocean_biomes,
y_max = -24, y_max = -24,
@ -75,6 +83,6 @@ mcl_structures.register_structure("geode",{
y_offset = function(pr) return pr:next(-4,-2) end, y_offset = function(pr) return pr:next(-4,-2) end,
place_func = function(pos,def,pr) place_func = function(pos,def,pr)
local p = vector.new(pos.x + pr:next(-30,30),pos.y,pos.z + pr:next(-30,30)) local p = vector.new(pos.x + pr:next(-30,30),pos.y,pos.z + pr:next(-30,30))
return makegeode(pos,pr) return makegeode(p,pr)
end end
}) })

View File

@ -158,8 +158,16 @@ mcl_structures.register_structure("shipwreck",{
place_on = {"group:sand","mcl_core:gravel"}, place_on = {"group:sand","mcl_core:gravel"},
spawn_by = {"group:water"}, spawn_by = {"group:water"},
num_spawn_by = 4, num_spawn_by = 4,
fill_ratio = 0.00002, noise_params = {
flags = "place_center_x, place_center_z, force_placement", offset = 0,
scale = 0.000022,
spread = {x = 250, y = 250, z = 250},
seed = 3,
octaves = 3,
persist = 0.001,
flags = "absvalue",
},
flags = "force_placement",
biomes = ocean_biomes, biomes = ocean_biomes,
y_max = water_level-4, y_max = water_level-4,
y_min = mcl_vars.mg_overworld_min, y_min = mcl_vars.mg_overworld_min,

View File

@ -43,7 +43,7 @@ function mcl_structures.register_structure(name,def,nospawn) --nospawn means it
num_spawn_by = def.num_spawn_by, num_spawn_by = def.num_spawn_by,
sidelen = 80, sidelen = 80,
fill_ratio = def.fill_ratio, fill_ratio = def.fill_ratio,
noise = def.noise, noise_params = def.noise_params,
flags = flags, flags = flags,
biomes = def.biomes, biomes = def.biomes,
y_max = def.y_max, y_max = def.y_max,

View File

@ -17,7 +17,7 @@ local function set_node_no_bedrock(pos,node)
end end
local function airtower(pos) local function airtower(pos)
for i=0,35 do for i=0,55 do
set_node_no_bedrock(vector.offset(pos,0,i,0),{name="air"}) set_node_no_bedrock(vector.offset(pos,0,i,0),{name="air"})
end end
end end
@ -69,7 +69,15 @@ end
mcl_structures.register_structure("lavapool",{ mcl_structures.register_structure("lavapool",{
place_on = {"group:sand", "group:dirt", "group:stone"}, place_on = {"group:sand", "group:dirt", "group:stone"},
fill_ratio = 0.000015, noise_params = {
offset = 0,
scale = 0.0000022,
spread = {x = 250, y = 250, z = 250},
seed = 78375213,
octaves = 3,
persist = 0.001,
flags = "absvalue",
},
flags = "place_center_x, place_center_z, force_placement", flags = "place_center_x, place_center_z, force_placement",
y_max = mcl_vars.mg_overworld_max, y_max = mcl_vars.mg_overworld_max,
y_min = minetest.get_mapgen_setting("water_level"), y_min = minetest.get_mapgen_setting("water_level"),
@ -80,7 +88,15 @@ mcl_structures.register_structure("lavapool",{
mcl_structures.register_structure("water_lake",{ mcl_structures.register_structure("water_lake",{
place_on = {"group:dirt","group:stone"}, place_on = {"group:dirt","group:stone"},
fill_ratio = 0.000052, noise_params = {
offset = 0,
scale = 0.000032,
spread = {x = 250, y = 250, z = 250},
seed = 734341353,
octaves = 3,
persist = 0.001,
flags = "absvalue",
},
flags = "place_center_x, place_center_z, force_placement", flags = "place_center_x, place_center_z, force_placement",
y_max = mcl_vars.mg_overworld_max, y_max = mcl_vars.mg_overworld_max,
y_min = minetest.get_mapgen_setting("water_level"), y_min = minetest.get_mapgen_setting("water_level"),