Spawn zombipigs in portal frames

This commit is contained in:
kay27 2022-03-11 07:21:25 +04:00
parent e2d2d4219b
commit ef08bfa5d9
1 changed files with 7 additions and 0 deletions

View File

@ -746,6 +746,13 @@ minetest.register_abm({
return return
end end
if lower_node_name == OBSIDIAN and pos.y >= mcl_mapgen.overworld.min and random(1, 200) == 19 then
local pigman_obj = minetest.add_entity(pos, "mobs_mc:pigman")
if pigman_obj then
teleport_cooloff(pigman_obj)
end
end
local o = node.param2 -- orientation local o = node.param2 -- orientation
local closer_node_name = get_node({x = pos.x - 1 + o, y = pos.y, z = pos.z - o}).name local closer_node_name = get_node({x = pos.x - 1 + o, y = pos.y, z = pos.z - o}).name