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 /warthog.lua | |
| parent | 08924ee1a3c575e8645d0158738cf96758cbb4d7 (diff) | |
animals spawn on different grasses if ethereal detected
Diffstat (limited to 'warthog.lua')
| -rw-r--r-- | warthog.lua | 16 | 
1 files changed, 13 insertions, 3 deletions
| diff --git a/warthog.lua b/warthog.lua index 75c0713..436e468 100644 --- a/warthog.lua +++ b/warthog.lua @@ -1,6 +1,7 @@  local S = mobs.intllib +  -- Warthog by KrupnoPavel  mobs:register_mob("mobs_animal:pumba", { @@ -56,9 +57,16 @@ mobs:register_mob("mobs_animal:pumba", {  	end,  }) + +local spawn_on = "default:dirt_with_grass" + +if minetest.get_modpath("ethereal") then +	spawn_on = "ethereal:mushroom_dirt" +end +  mobs:spawn({  	name = "mobs_animal:pumba", -	nodes = {"default:dirt_with_dry_grass", "ethereal:mushroom_dirt"}, +	nodes = {spawn_on},  	min_light = 10,  	chance = 15000,  	min_height = 0, @@ -66,10 +74,12 @@ mobs:spawn({  	day_toggle = true,  }) +  mobs:register_egg("mobs_animal:pumba", S("Warthog"), "wool_pink.png", 1) --- compatibility -mobs:alias_mob("mobs:pumba", "mobs_animal:pumba") + +mobs:alias_mob("mobs:pumba", "mobs_animal:pumba") -- compatibility +  -- raw porkchop  minetest.register_craftitem(":mobs:pork_raw", { | 
