mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2025-01-24 17:00:19 +01:00
use spawn_specific to limit spawn number of mobs:pumpking and mobs:pumpboom
fix typo
This commit is contained in:
parent
86e57814e6
commit
f7f73c2004
@ -1447,7 +1447,7 @@ function mobs:explosion(pos, radius, fire, smoke, sound)
|
|||||||
p.x = pos.x + x
|
p.x = pos.x + x
|
||||||
p.y = pos.y + y
|
p.y = pos.y + y
|
||||||
p.z = pos.z + z
|
p.z = pos.z + z
|
||||||
if p.y >= 19600 --MFF
|
if p.y >= -19600 --MFF
|
||||||
and data[vi] ~= c_air
|
and data[vi] ~= c_air
|
||||||
and data[vi] ~= c_ignore
|
and data[vi] ~= c_ignore
|
||||||
and data[vi] ~= c_obsidian
|
and data[vi] ~= c_obsidian
|
||||||
|
@ -127,21 +127,11 @@ minetest.register_node("mobs:pumpboom_spawner", {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_abm({
|
--(name, nodes, neighbors, min_light, max_light, interval, chance, active_object_count, min_height, max_height, spawn_in_area)
|
||||||
nodenames = {"mobs:pumpking_spawner"},
|
-- spawn on mobs:pumpking_spawner between 1 and 20 light, interval 300, 1 chance, 1 pumpking_spawner in area up to 31000 in height
|
||||||
interval = 300.0,
|
mobs:spawn_specific("mobs:pumpking", {"mobs:pumpking_spawner"}, {"air"}, 1, 20, 300, 1, 1, -31000, 31000, true)
|
||||||
chance = 1,
|
|
||||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
-- spawn on mobs:pumpboom_spawner between 1 and 20 light, 4 interval, 1 chance, 1 pumpboom in area up to 31000 in height
|
||||||
minetest.add_entity(pos, "mobs:pumpking")
|
mobs:spawn_specific("mobs:pumpboom", {"mobs:pumpboom_spawner"}, {"air"}, 1, 20, 10, 4, 1, -31000, 31000, true)
|
||||||
end
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_abm({
|
|
||||||
nodenames = {"mobs:pumpboom_spawner"},
|
|
||||||
interval = 10.0,
|
|
||||||
chance = 4,
|
|
||||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
|
||||||
pos.y = pos.y + 1
|
|
||||||
minetest.add_entity(pos, "mobs:pumpboom")
|
|
||||||
end
|
|
||||||
})
|
|
||||||
|
Loading…
Reference in New Issue
Block a user