1
0
Fork 0

Add bookshelves and anvils as structure constructed nodes

bambootoo
PrairieWind 2022-12-14 20:13:08 -07:00 committed by Gitea
parent 20ca34233c
commit 256655df83
2 changed files with 8 additions and 2 deletions

View File

@ -17,6 +17,7 @@ mcl_structures.register_structure("pillager_outpost",{
y_max = mcl_vars.mg_overworld_max,
y_min = 1,
biomes = { "Desert", "Plains", "Savanna", "IcePlains", "Taiga" },
construct_nodes = {"mcl_anvils:anvil_damage_2"},
filenames = {
modpath.."/schematics/mcl_structures_pillager_outpost.mts",
modpath.."/schematics/mcl_structures_pillager_outpost_2.mts"
@ -67,7 +68,12 @@ mcl_structures.register_structure("pillager_outpost",{
mcl_structures.spawn_mobs("mobs_mc:pillager",spawnon,p1,p2,pr,5)
mcl_structures.spawn_mobs("mobs_mc:parrot",{"mesecons_pressureplates:pressure_plate_stone_off"},p1,p2,pr,3)
mcl_structures.spawn_mobs("mobs_mc:iron_golem",{"mesecons_button:button_stone_off"},p1,p2,pr,1)
mcl_structures.construct_nodes(p1,p2,{"group:wall"})
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
end
})

View File

@ -20,7 +20,7 @@ mcl_structures.register_structure("woodland_cabin",{
modpath.."/schematics/mcl_structures_woodland_cabin.mts",
modpath.."/schematics/mcl_structures_woodland_outpost.mts",
},
construct_nodes = {"mcl_barrels:barrel_closed"},
construct_nodes = {"mcl_barrels:barrel_closed","mcl_books:bookshelf"},
after_place = function(p,def,pr)
local p1=vector.offset(p,-def.sidelen,-1,-def.sidelen)
local p2=vector.offset(p,def.sidelen,def.sidelen,def.sidelen)