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 /chicken.lua | |
parent | 08924ee1a3c575e8645d0158738cf96758cbb4d7 (diff) |
animals spawn on different grasses if ethereal detected
Diffstat (limited to 'chicken.lua')
-rw-r--r-- | chicken.lua | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/chicken.lua b/chicken.lua index ad2f722..11cc4b7 100644 --- a/chicken.lua +++ b/chicken.lua @@ -1,6 +1,7 @@ local S = mobs.intllib + -- Chicken by JK Murray mobs:register_mob("mobs_animal:chicken", { @@ -79,9 +80,16 @@ mobs:register_mob("mobs_animal:chicken", { end, }) + +local spawn_on = "default:dirt_with_grass" + +if minetest.get_modpath("ethereal") then + spawn_on = "ethereal:bamboo_dirt" +end + mobs:spawn({ name = "mobs_animal:chicken", - nodes = {"default:dirt_with_grass", "ethereal:bamboo_dirt"}, + nodes = {spawn_on}, min_light = 10, chance = 15000, active_object_count = 2, @@ -89,10 +97,12 @@ mobs:spawn({ day_toggle = true, }) + mobs:register_egg("mobs_animal:chicken", S("Chicken"), "mobs_chicken_inv.png", 0) --- compatibility -mobs:alias_mob("mobs:chicken", "mobs_animal:chicken") + +mobs:alias_mob("mobs:chicken", "mobs_animal:chicken") -- compatibility + -- egg entity @@ -158,6 +168,7 @@ mobs:register_arrow("mobs_animal:egg_entity", { end }) + -- egg throwing item local egg_GRAVITY = 9 @@ -207,6 +218,7 @@ local mobs_shoot_egg = function (item, player, pointed_thing) return item end + -- egg minetest.register_node(":mobs:egg", { description = S("Chicken Egg"), @@ -232,6 +244,7 @@ minetest.register_node(":mobs:egg", { on_use = mobs_shoot_egg }) + -- fried egg minetest.register_craftitem(":mobs:chicken_egg_fried", { description = S("Fried Egg"), |