From 092b746b0bc45272aba1c8701dbe645cfeeafaae Mon Sep 17 00:00:00 2001 From: PrairieWind Date: Tue, 9 Aug 2022 17:09:16 -0600 Subject: [PATCH] Add Pillager and Evoker Spawning to Pillager Outpost --- mods/MAPGEN/mcl_structures/pillager_outpost.lua | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/mods/MAPGEN/mcl_structures/pillager_outpost.lua b/mods/MAPGEN/mcl_structures/pillager_outpost.lua index 596aa66c7..4646b96ab 100644 --- a/mods/MAPGEN/mcl_structures/pillager_outpost.lua +++ b/mods/MAPGEN/mcl_structures/pillager_outpost.lua @@ -57,11 +57,25 @@ mcl_structures.register_structure("pillager_outpost",{ after_place = function(p,def,pr) local p1 = vector.offset(p,-7,0,-7) local p2 = vector.offset(p,7,14,7) + local spawnon = {"mcl_core:stripped_oak"} + local sp = minetest.find_nodes_in_area_under_air(p1,p2,spawnon) for _,n in pairs(minetest.find_nodes_in_area(p1,p2,{"group:wall"})) do local def = minetest.registered_nodes[minetest.get_node(n).name:gsub("_%d+$","")] if def and def.on_construct then def.on_construct(n) end end + if sp and #sp > 0 then + for i=1,5 do + local pos = sp[pr:next(1,#sp)] + if pos then + minetest.add_entity(pos,"mobs_mc:pillager") + end + end + local pos = sp[pr:next(1,#sp)] + if pos then + minetest.add_entity(pos,"mobs_mc:evoker") + end + end end })