summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rat.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/rat.lua b/rat.lua
index 3320d53..31304eb 100644
--- a/rat.lua
+++ b/rat.lua
@@ -60,7 +60,10 @@ mobs:register_mob("mobs_animal:rat", {
local function rat_spawn(self, pos)
- print (self:get_luaentity().name, pos.x, pos.y, pos.z)
+ self = self:get_luaentity()
+ print (self.name, pos.x, pos.y, pos.z)
+ self.hp_max = 100
+ self.health = 100
end
mobs:spawn({