From d8697cb59cae2d2803efd6f6e8cbab9bddeed53b Mon Sep 17 00:00:00 2001 From: cora Date: Thu, 23 Jun 2022 01:42:20 +0200 Subject: [PATCH] Tweak basalt delta code --- mods/MAPGEN/mcl_biomes/init.lua | 66 ++++++++++++++++++++++ mods/MAPGEN/mcl_nether_fortresses/init.lua | 2 +- mods/MAPGEN/mcl_terrain_features/init.lua | 40 +++++++++---- 3 files changed, 97 insertions(+), 11 deletions(-) diff --git a/mods/MAPGEN/mcl_biomes/init.lua b/mods/MAPGEN/mcl_biomes/init.lua index f2fb33184..f538d97aa 100644 --- a/mods/MAPGEN/mcl_biomes/init.lua +++ b/mods/MAPGEN/mcl_biomes/init.lua @@ -4574,6 +4574,72 @@ local function register_dimension_decorations() size = {x = 5, y = 8, z = 5}, 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 ]] diff --git a/mods/MAPGEN/mcl_nether_fortresses/init.lua b/mods/MAPGEN/mcl_nether_fortresses/init.lua index a82d3f4c7..16fd11fb1 100644 --- a/mods/MAPGEN/mcl_nether_fortresses/init.lua +++ b/mods/MAPGEN/mcl_nether_fortresses/init.lua @@ -16,7 +16,7 @@ mcl_structures.register_structure("nether_outpost",{ biomes = {"Nether","SoulsandValley","WarpedForest","CrimsonForest","BasaltDelta"}, sidelen = 15, 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, filenames = { modpath.."/schematics/nether_outpost.mts" }, y_offset = 0, diff --git a/mods/MAPGEN/mcl_terrain_features/init.lua b/mods/MAPGEN/mcl_terrain_features/init.lua index 60555f0ff..623e518b3 100644 --- a/mods/MAPGEN/mcl_terrain_features/init.lua +++ b/mods/MAPGEN/mcl_terrain_features/init.lua @@ -118,6 +118,13 @@ mcl_structures.register_structure("water_lake",{ 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",{ place_on = {"mcl_blackstone:blackstone","mcl_blackstone:basalt"}, @@ -126,15 +133,15 @@ mcl_structures.register_structure("basalt_column",{ num_spawn_by = 2, noise_params = { offset = 0, - scale = 0.02, + scale = 0.003, spread = {x = 250, y = 250, z = 250}, - seed = 7225213, + seed = 72235213, octaves = 5, - persist = 0.1, + persist = 0.3, flags = "absvalue", }, 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, biomes = { "BasaltDelta" }, place_func = function(pos,def,pr) @@ -144,14 +151,21 @@ mcl_structures.register_structure("basalt_column",{ end) if #nn < 1 then return false end local basalt = {} + local magma = {} for i=1,pr:next(1,#nn) do if minetest.get_node(vector.offset(nn[i],0,-1,0)).name ~= "air" then local dst=vector.distance(pos,nn[i]) - for ii=0,pr:next(2,14)-dst do - table.insert(basalt,vector.new(nn[i].x,nn[i].y + ii,nn[i].z)) + local r = pr:next(1,14)-dst + 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 + minetest.bulk_set_node(magma,{name="mcl_nether:magma"}) minetest.bulk_set_node(basalt,{name="mcl_blackstone:basalt"}) return true end @@ -163,13 +177,13 @@ mcl_structures.register_structure("basalt_pillar",{ offset = 0, scale = 0.001, spread = {x = 250, y = 250, z = 250}, - seed = 783213, + seed = 7113, octaves = 5, persist = 0.1, flags = "absvalue", }, 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, biomes = { "BasaltDelta" }, place_func = function(pos,def,pr) @@ -179,15 +193,21 @@ mcl_structures.register_structure("basalt_pillar",{ end) if #nn < 1 then return false end local basalt = {} + local magma = {} for i=1,pr:next(1,#nn) do if minetest.get_node(vector.offset(nn[i],0,-1,0)).name ~= "air" then local dst=vector.distance(pos,nn[i]) - for ii=0,pr:next(19,34)-dst do - table.insert(basalt,vector.new(nn[i].x,nn[i].y + ii,nn[i].z)) + for ii=0,pr:next(19,35)-dst do + 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 minetest.bulk_set_node(basalt,{name="mcl_blackstone:basalt"}) + minetest.bulk_set_node(magma,{name="mcl_nether:magma"}) return true end })