summaryrefslogtreecommitdiff
path: root/rat.lua
diff options
context:
space:
mode:
authorTenPlus1 <kinsellaja@yahoo.com>2017-02-21 15:23:03 +0000
committerTenPlus1 <kinsellaja@yahoo.com>2017-02-21 15:23:03 +0000
commitf7b9339dfc61f5f8b92acc031f797f788d901941 (patch)
tree240d3cdbf1fe1ebe9102f6cf29b5e94faff76b07 /rat.lua
parent08924ee1a3c575e8645d0158738cf96758cbb4d7 (diff)
animals spawn on different grasses if ethereal detected
Diffstat (limited to 'rat.lua')
-rw-r--r--rat.lua8
1 files changed, 6 insertions, 2 deletions
diff --git a/rat.lua b/rat.lua
index 47dccdf..3320d53 100644
--- a/rat.lua
+++ b/rat.lua
@@ -1,6 +1,7 @@
local S = mobs.intllib
+
-- Rat by PilzAdam
mobs:register_mob("mobs_animal:rat", {
@@ -57,6 +58,7 @@ mobs:register_mob("mobs_animal:rat", {
]]
})
+
local function rat_spawn(self, pos)
print (self:get_luaentity().name, pos.x, pos.y, pos.z)
end
@@ -70,10 +72,12 @@ mobs:spawn({
-- on_spawn = rat_spawn,
})
+
mobs:register_egg("mobs_animal:rat", S("Rat"), "mobs_rat_inventory.png", 0)
--- compatibility
-mobs:alias_mob("mobs:rat", "mobs_animal:rat")
+
+mobs:alias_mob("mobs:rat", "mobs_animal:rat") -- compatibility
+
-- cooked rat, yummy!
minetest.register_craftitem(":mobs:rat_cooked", {