summaryrefslogtreecommitdiff
path: root/rat.lua
diff options
context:
space:
mode:
authorTenPlus1 <kinsellaja@yahoo.com>2016-05-01 19:41:08 +0100
committerTenPlus1 <kinsellaja@yahoo.com>2016-05-01 19:41:08 +0100
commitdeaada8a8b75f484eba60eb1b384034a2d95a571 (patch)
tree6e2ed8f652fa846029e50cf5be32f760fefb0930 /rat.lua
parentdc72770307d05d5858ebd4811cb828502cf005d5 (diff)
tweaked on_blast example
Diffstat (limited to 'rat.lua')
-rw-r--r--rat.lua8
1 files changed, 5 insertions, 3 deletions
diff --git a/rat.lua b/rat.lua
index 7af0ea7..750d0df 100644
--- a/rat.lua
+++ b/rat.lua
@@ -34,13 +34,15 @@ mobs:register_mob("mobs_animal:rat", {
local pos = self.object:getpos()
print("rat pos", pos.x, pos.y, pos.z)
end,
-
+]]
+--[[
on_blast = function(obj, damage)
print ("--- damage is", damage)
+ print ("--- mob is", obj.object:get_luaentity().name)
-- return's do_damage, do_knockback and drops
- return true, true, {"default:mese"}
+ return false, true, {"default:mese"}
end,
---]]
+]]
})
mobs:register_spawn("mobs_animal:rat", {"default:stone"}, 20, 5, 15000, 2, 0)