diff options
author | TenPlus1 <kinsellaja@yahoo.com> | 2017-02-21 15:23:03 +0000 |
---|---|---|
committer | TenPlus1 <kinsellaja@yahoo.com> | 2017-02-21 15:23:03 +0000 |
commit | f7b9339dfc61f5f8b92acc031f797f788d901941 (patch) | |
tree | 240d3cdbf1fe1ebe9102f6cf29b5e94faff76b07 /sheep.lua | |
parent | 08924ee1a3c575e8645d0158738cf96758cbb4d7 (diff) |
animals spawn on different grasses if ethereal detected
Diffstat (limited to 'sheep.lua')
-rw-r--r-- | sheep.lua | 17 |
1 files changed, 13 insertions, 4 deletions
@@ -1,6 +1,7 @@ local S = mobs.intllib + local all_colours = { {"black", S("Black"), "#000000b0"}, {"blue", S("Blue"), "#015dbb70"}, @@ -19,9 +20,10 @@ local all_colours = { {"yellow", S("Yellow"), "#e3ff0070"}, } + -- Sheep by PilzAdam, texture converted to minetest by AMMOnym from Summerfield pack -for _, col in pairs(all_colours) do +for _, col in ipairs(all_colours) do mobs:register_mob("mobs_animal:sheep_"..col[1], { type = "animal", @@ -180,9 +182,16 @@ for _, col in pairs(all_colours) do end + +local spawn_on = "default:dirt_with_grass" + +if minetest.get_modpath("ethereal") then + spawn_on = "ethereal:green_dirt" +end + mobs:spawn({ name = "mobs_animal:sheep_white", - nodes = {"default:dirt_with_grass", "ethereal:green_dirt"}, + nodes = {spawn_on}, min_light = 10, chance = 15000, min_height = 0, @@ -190,5 +199,5 @@ mobs:spawn({ day_toggle = true, }) --- compatibility -mobs:alias_mob("mobs:sheep", "mobs_animal:sheep_white") + +mobs:alias_mob("mobs:sheep", "mobs_animal:sheep_white") -- compatibility |