added mobs:force_capture() example to sand monster

This commit is contained in:
TenPlus1 2018-12-20 11:14:52 +00:00
parent d6420071ab
commit eeb6a8e138

View File

@ -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,
]]
}) })