forked from VoxeLibre/VoxeLibre
Spawn hoglins in stable bullwarks
This commit is contained in:
parent
4ad1abde14
commit
62f353d54f
|
@ -22,13 +22,26 @@ mcl_structures.register_structure("nether_outpost",{
|
||||||
mcl_mobspawners.setup_spawner(sp[1], "mobs_mc:blaze", 0, minetest.LIGHT_MAX+1, 10, 8, 0)
|
mcl_mobspawners.setup_spawner(sp[1], "mobs_mc:blaze", 0, minetest.LIGHT_MAX+1, 10, 8, 0)
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
|
local function spawn_mobs(mob,spawnon,p1,p2,pr,n)
|
||||||
|
n = n or 1
|
||||||
|
local sp = minetest.find_nodes_in_area_under_air(p1,p2,spawnon)
|
||||||
|
if sp and #sp > 0 then
|
||||||
|
for i=1,n do
|
||||||
|
local pos = vector.offset(sp[pr:next(1,#sp)],0,1,0)
|
||||||
|
if pos then
|
||||||
|
minetest.add_entity(pos,mob)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
mcl_structures.register_structure("nether_bulwark",{
|
mcl_structures.register_structure("nether_bulwark",{
|
||||||
place_on = {"mcl_nether:netherrack","mcl_crimson:crimson_nylium","mcl_crimson:warped_nylium","mcl_blackstone:basalt","mcl_blackstone:soul_soil","mcl_blackstone:blackstone","mcl_nether:soul_sand"},
|
place_on = {"mcl_nether:netherrack","mcl_crimson:crimson_nylium","mcl_crimson:warped_nylium","mcl_blackstone:basalt","mcl_blackstone:soul_soil","mcl_blackstone:blackstone","mcl_nether:soul_sand"},
|
||||||
fill_ratio = 0.01,
|
fill_ratio = 0.01,
|
||||||
chunk_probability = 600,
|
chunk_probability = 600,
|
||||||
flags = "all_floors",
|
flags = "all_floors",
|
||||||
biomes = {"Nether","SoulsandValley","WarpedForest","CrimsonForest"},
|
biomes = {"Nether","SoulsandValley","WarpedForest","CrimsonForest"},
|
||||||
sidelen = 32,
|
sidelen = 36,
|
||||||
solid_ground = true,
|
solid_ground = true,
|
||||||
make_foundation = true,
|
make_foundation = true,
|
||||||
y_min = mcl_vars.mg_lava_nether_max - 1,
|
y_min = mcl_vars.mg_lava_nether_max - 1,
|
||||||
|
@ -50,21 +63,11 @@ mcl_structures.register_structure("nether_bulwark",{
|
||||||
construct_nodes = {"group:wall"},
|
construct_nodes = {"group:wall"},
|
||||||
after_place = function(pos,def,pr)
|
after_place = function(pos,def,pr)
|
||||||
if not peaceful then
|
if not peaceful then
|
||||||
local p1 = vector.offset(pos,-10,0,-10)
|
local p1 = vector.offset(pos,-14,0,-14)
|
||||||
local p2 = vector.offset(pos,10,24,10)
|
local p2 = vector.offset(pos,14,24,14)
|
||||||
local sp = minetest.find_nodes_in_area_under_air(p1,p2,{"mcl_blackstone:blackstone_brick_polished"})
|
spawn_mobs("mobs_mc:piglin",{"mcl_blackstone:blackstone_brick_polished","mcl_stairs:slab_blackstone_polished"},p1,p2,pr,5)
|
||||||
if sp and #sp > 0 then
|
spawn_mobs("mobs_mc:piglin_brute",{"mcl_blackstone:blackstone_brick_polished","mcl_stairs:slab_blackstone_polished"},p1,p2,pr)
|
||||||
for i=1,5 do
|
spawn_mobs("mobs_mc:hoglin",{"mcl_blackstone:nether_gold"},p1,p2,pr,4)
|
||||||
local pos = vector.offset(sp[pr:next(1,#sp)],0,1,0)
|
|
||||||
if pos then
|
|
||||||
minetest.add_entity(pos,"mobs_mc:piglin")
|
|
||||||
end
|
|
||||||
end
|
|
||||||
local pos = vector.offset(sp[pr:next(1,#sp)],0,1,0)
|
|
||||||
if pos then
|
|
||||||
minetest.add_entity(pos,"mobs_mc:piglin_brute")
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
loot = {
|
loot = {
|
||||||
|
|
Loading…
Reference in New Issue