forked from mtcontrib/mobs_monster
added mobs:force_capture() example to sand monster
This commit is contained in:
parent
d6420071ab
commit
eeb6a8e138
@ -90,6 +90,21 @@ mobs:register_mob("mobs_monster:sand_monster", {
|
|||||||
pos.y = pos.y + 0.25
|
pos.y = pos.y + 0.25
|
||||||
effect(pos, 30, "mobs_sand_particles.png", 0.1, 2, 3, 5)
|
effect(pos, 30, "mobs_sand_particles.png", 0.1, 2, 3, 5)
|
||||||
end,
|
end,
|
||||||
|
--[[
|
||||||
|
on_rightclick = function(self, clicker)
|
||||||
|
|
||||||
|
local tool = clicker:get_wielded_item()
|
||||||
|
local name = clicker:get_player_name()
|
||||||
|
|
||||||
|
if tool:get_name() == "default:sand" then
|
||||||
|
|
||||||
|
self.owner = name
|
||||||
|
self.type = "npc"
|
||||||
|
|
||||||
|
mobs:force_capture(self, clicker)
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
]]
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user