mirror of
https://codeberg.org/tenplus1/mobs_monster.git
synced 2024-12-23 01:10:26 +01:00
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
|
||||
effect(pos, 30, "mobs_sand_particles.png", 0.1, 2, 3, 5)
|
||||
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