summaryrefslogtreecommitdiff
path: root/kitten.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 /kitten.lua
parent08924ee1a3c575e8645d0158738cf96758cbb4d7 (diff)
animals spawn on different grasses if ethereal detected
Diffstat (limited to 'kitten.lua')
-rw-r--r--kitten.lua15
1 files changed, 12 insertions, 3 deletions
diff --git a/kitten.lua b/kitten.lua
index 08b86d2..59e057a 100644
--- a/kitten.lua
+++ b/kitten.lua
@@ -1,6 +1,7 @@
local S = mobs.intllib
+
-- Kitten by Jordach / BFD
mobs:register_mob("mobs_animal:kitten", {
@@ -53,9 +54,16 @@ mobs:register_mob("mobs_animal:kitten", {
end
})
+
+local spawn_on = "default:dirt_with_grass"
+
+if minetest.get_modpath("ethereal") then
+ spawn_on = "ethereal:grove_dirt"
+end
+
mobs:spawn({
name = "mobs_animal:kitten",
- nodes = {"default:dirt_with_grass", "ethereal:grove_dirt"},
+ nodes = {spawn_on},
min_light = 12,
chance = 22000,
min_height = 0,
@@ -63,7 +71,8 @@ mobs:spawn({
day_toggle = true,
})
+
mobs:register_egg("mobs_animal:kitten", S("Kitten"), "mobs_kitten_inv.png", 0)
--- compatibility
-mobs:alias_mob("mobs:kitten", "mobs_animal:kitten")
+
+mobs:alias_mob("mobs:kitten", "mobs_animal:kitten") -- compatibility