From 1060b5074c43a3372d21d42915530b2eba022e0c Mon Sep 17 00:00:00 2001 From: cora Date: Tue, 13 Sep 2022 19:49:08 +0200 Subject: [PATCH] Make end island larger --- mods/CORE/mcl_init/init.lua | 2 +- mods/MAPGEN/mcl_end_island/init.lua | 2 +- mods/MAPGEN/mcl_structures/end_spawn.lua | 33 ++++++++++++++---------- 3 files changed, 21 insertions(+), 16 deletions(-) diff --git a/mods/CORE/mcl_init/init.lua b/mods/CORE/mcl_init/init.lua index bb4a84921..6773949b7 100644 --- a/mods/CORE/mcl_init/init.lua +++ b/mods/CORE/mcl_init/init.lua @@ -162,7 +162,7 @@ end mcl_vars.mg_end_min = -27073 -- Carefully chosen to be at a mapchunk border mcl_vars.mg_end_max_official = mcl_vars.mg_end_min + minecraft_height_limit mcl_vars.mg_end_max = mcl_vars.mg_overworld_min - 2000 -mcl_vars.mg_end_platform_pos = { x = 100, y = mcl_vars.mg_end_min + 74, z = 0 } +mcl_vars.mg_end_platform_pos = { x = 100, y = mcl_vars.mg_end_min + 64, z = 0 } mcl_vars.mg_end_exit_portal_pos = vector.new(0, mcl_vars.mg_end_min + 71, 0) -- Realm barrier used to safely separate the End from the void below the Overworld diff --git a/mods/MAPGEN/mcl_end_island/init.lua b/mods/MAPGEN/mcl_end_island/init.lua index 499afe369..434c3c6ef 100644 --- a/mods/MAPGEN/mcl_end_island/init.lua +++ b/mods/MAPGEN/mcl_end_island/init.lua @@ -1,4 +1,4 @@ -local width = 115 +local width = 200 local noisemap = PerlinNoiseMap({ offset = 0.5, diff --git a/mods/MAPGEN/mcl_structures/end_spawn.lua b/mods/MAPGEN/mcl_structures/end_spawn.lua index e3048804c..75d14fdc4 100644 --- a/mods/MAPGEN/mcl_structures/end_spawn.lua +++ b/mods/MAPGEN/mcl_structures/end_spawn.lua @@ -6,8 +6,10 @@ local modpath = minetest.get_modpath(modname) mcl_structures.register_structure("end_spawn_obsidian_platform",{ static_pos ={mcl_vars.mg_end_platform_pos}, place_func = function(pos,def,pr) - local nn = minetest.find_nodes_in_area(vector.offset(pos,-2,0,-2),vector.offset(pos,2,0,2),{"air","mcl_end:end_stone"}) - minetest.bulk_set_node(nn,{name="mcl_core:obsidian"}) + local obby = minetest.find_nodes_in_area(vector.offset(pos,-2,0,-2),vector.offset(pos,2,0,2),{"air","mcl_end:end_stone"}) + local air = minetest.find_nodes_in_area(vector.offset(pos,-2,1,-2),vector.offset(pos,2,3,2),{"air","mcl_end:end_stone"}) + minetest.bulk_set_node(obby,{name="mcl_core:obsidian"}) + minetest.bulk_set_node(air,{name="air"}) return true end, }) @@ -19,19 +21,22 @@ mcl_structures.register_structure("end_exit_portal",{ }, after_place = function(pos,def,pr,blockseed) local p1 = vector.offset(pos,-16,-16,-16) - local p2 = vector.offset(pos,16,16,16) - minetest.bulk_set_node(minetest.find_nodes_in_area(p1,p2,{"mcl_portals:portal_end"}),{name="air"}) - local obj = minetest.add_entity(vector.offset(pos,3, 11, 3), "mobs_mc:enderdragon") - if obj then - local dragon_entity = obj:get_luaentity() - dragon_entity._portal_pos = pos - if blockseed ~= -1 then - dragon_entity._initial = true + local p2 = vector.offset(pos,16,21,16) + minetest.emerge_area(p1,p2,function(blockpos, action, calls_remaining, param) + if calls_remaining > 0 then return end + minetest.bulk_set_node(minetest.find_nodes_in_area(p1,p2,{"mcl_portals:portal_end"}),{name="air"}) + local obj = minetest.add_entity(vector.offset(pos,3, 11, 3), "mobs_mc:enderdragon") + if obj then + local dragon_entity = obj:get_luaentity() + dragon_entity._portal_pos = pos + if blockseed ~= -1 then + dragon_entity._initial = true + end + else + minetest.log("error", "[mcl_mapgen_core] ERROR! Ender dragon doesn't want to spawn") end - else - minetest.log("error", "[mcl_mapgen_core] ERROR! Ender dragon doesn't want to spawn") - end - minetest.fix_light(p1,p2) + minetest.fix_light(p1,p2) + end) end }) mcl_structures.register_structure("end_exit_portal_open",{