From 8efbd89b6a664e1ee854380d8667eaf099474920 Mon Sep 17 00:00:00 2001 From: cora Date: Fri, 17 Jun 2022 03:09:40 +0200 Subject: [PATCH] Add basalt columns & lava pools --- mods/ENTITIES/mcl_mobs/spawning.lua | 3 + mods/ENTITIES/mobs_mc/enderman.lua | 2 + mods/ENTITIES/mobs_mc/skeleton+stray.lua | 2 + mods/MAPGEN/mcl_biomes/init.lua | 26 ++++++- mods/MAPGEN/mcl_surface_pools/init.lua | 87 ++++++++++++++++++++++-- 5 files changed, 113 insertions(+), 7 deletions(-) diff --git a/mods/ENTITIES/mcl_mobs/spawning.lua b/mods/ENTITIES/mcl_mobs/spawning.lua index 71f4ec8599..8fa2e7a8a6 100644 --- a/mods/ENTITIES/mcl_mobs/spawning.lua +++ b/mods/ENTITIES/mcl_mobs/spawning.lua @@ -189,6 +189,9 @@ local list_of_all_biomes = { "MesaBryce", "JungleEdge", "SavannaM", + "Nether", + "WarpedForest", + "SoulsandValley" } -- count how many mobs are in an area diff --git a/mods/ENTITIES/mobs_mc/enderman.lua b/mods/ENTITIES/mobs_mc/enderman.lua index 9ed59bb1fb..2391c4b211 100644 --- a/mods/ENTITIES/mobs_mc/enderman.lua +++ b/mods/ENTITIES/mobs_mc/enderman.lua @@ -751,6 +751,8 @@ mcl_mobs:spawn_specific( "JungleM_underground", "ExtremeHillsM_underground", "JungleEdgeM_underground", +"Nether", +"WarpedForest" }, 0, 7, diff --git a/mods/ENTITIES/mobs_mc/skeleton+stray.lua b/mods/ENTITIES/mobs_mc/skeleton+stray.lua index aab719b1cc..ccfae401ad 100644 --- a/mods/ENTITIES/mobs_mc/skeleton+stray.lua +++ b/mods/ENTITIES/mobs_mc/skeleton+stray.lua @@ -286,6 +286,8 @@ mcl_mobs:spawn_specific( "JungleM_underground", "ExtremeHillsM_underground", "JungleEdgeM_underground", +"Nether", +"SoulsandValley" }, 0, 7, diff --git a/mods/MAPGEN/mcl_biomes/init.lua b/mods/MAPGEN/mcl_biomes/init.lua index 9e52a5274c..1367804770 100644 --- a/mods/MAPGEN/mcl_biomes/init.lua +++ b/mods/MAPGEN/mcl_biomes/init.lua @@ -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", diff --git a/mods/MAPGEN/mcl_surface_pools/init.lua b/mods/MAPGEN/mcl_surface_pools/init.lua index ed42f52bbd..2c5fa9254d 100644 --- a/mods/MAPGEN/mcl_surface_pools/init.lua +++ b/mods/MAPGEN/mcl_surface_pools/init.lua @@ -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 })