forked from mtcontrib/mobs_animal
tweaked on_blast example
This commit is contained in:
parent
dc72770307
commit
deaada8a8b
8
rat.lua
8
rat.lua
|
@ -34,13 +34,15 @@ mobs:register_mob("mobs_animal:rat", {
|
||||||
local pos = self.object:getpos()
|
local pos = self.object:getpos()
|
||||||
print("rat pos", pos.x, pos.y, pos.z)
|
print("rat pos", pos.x, pos.y, pos.z)
|
||||||
end,
|
end,
|
||||||
|
]]
|
||||||
|
--[[
|
||||||
on_blast = function(obj, damage)
|
on_blast = function(obj, damage)
|
||||||
print ("--- damage is", damage)
|
print ("--- damage is", damage)
|
||||||
|
print ("--- mob is", obj.object:get_luaentity().name)
|
||||||
-- return's do_damage, do_knockback and drops
|
-- return's do_damage, do_knockback and drops
|
||||||
return true, true, {"default:mese"}
|
return false, true, {"default:mese"}
|
||||||
end,
|
end,
|
||||||
--]]
|
]]
|
||||||
})
|
})
|
||||||
|
|
||||||
mobs:register_spawn("mobs_animal:rat", {"default:stone"}, 20, 5, 15000, 2, 0)
|
mobs:register_spawn("mobs_animal:rat", {"default:stone"}, 20, 5, 15000, 2, 0)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user