forked from mtcontrib/mobs_animal
Added compatibility with mobs already spawned in world
This commit is contained in:
parent
654c54075a
commit
06a3483ca2
3
bee.lua
3
bee.lua
|
@ -43,7 +43,8 @@ mobs:register_spawn("mobs_animal:bee", {"group:flower"}, 20, 10, 9000, 1, 31000,
|
|||
|
||||
mobs:register_egg("mobs_animal:bee", "Bee", "mobs_bee_inv.png", 0)
|
||||
|
||||
minetest.register_alias("mobs:bee", "mobs_animal:bee")
|
||||
-- compatibility
|
||||
mobs:alias_mob("mobs:bee", "mobs_animal:bee")
|
||||
|
||||
-- honey
|
||||
minetest.register_craftitem(":mobs:honey", {
|
||||
|
|
|
@ -83,4 +83,5 @@ mobs:register_spawn("mobs_animal:bunny",
|
|||
|
||||
mobs:register_egg("mobs_animal:bunny", "Bunny", "mobs_bunny_inv.png", 0)
|
||||
|
||||
minetest.register_alias("mobs:bunny", "mobs_animal:bunny")
|
||||
-- compatibility
|
||||
mobs:alias_mob("mobs:bunny", "mobs_animal:bunny")
|
||||
|
|
|
@ -80,7 +80,8 @@ mobs:register_spawn("mobs_animal:chicken",
|
|||
|
||||
mobs:register_egg("mobs_animal:chicken", "Chicken", "mobs_chicken_inv.png", 0)
|
||||
|
||||
minetest.register_alias("mobs:chicken", "mobs_animal:chicken")
|
||||
-- compatibility
|
||||
mobs:alias_mob("mobs:chicken", "mobs_animal:chicken")
|
||||
|
||||
-- egg entity
|
||||
|
||||
|
|
3
cow.lua
3
cow.lua
|
@ -98,7 +98,8 @@ mobs:register_spawn("mobs_animal:cow",
|
|||
|
||||
mobs:register_egg("mobs_animal:cow", "Cow", "default_grass.png", 1)
|
||||
|
||||
minetest.register_alias("mobs:cow", "mobs_animal:cow")
|
||||
-- compatibility
|
||||
mobs:alias_mob("mobs:cow", "mobs_animal:cow")
|
||||
|
||||
-- bucket of milk
|
||||
minetest.register_craftitem(":mobs:bucket_milk", {
|
||||
|
|
|
@ -55,4 +55,5 @@ mobs:register_spawn("mobs_animal:kitten",
|
|||
|
||||
mobs:register_egg("mobs_animal:kitten", "Kitten", "mobs_kitten_inv.png", 0)
|
||||
|
||||
minetest.register_alias("mobs:kitten", "mobs_animal:kitten")
|
||||
-- compatibility
|
||||
mobs:alias_mob("mobs:kitten", "mobs_animal:kitten")
|
||||
|
|
3
rat.lua
3
rat.lua
|
@ -41,7 +41,8 @@ mobs:register_spawn("mobs_animal:rat", {"default:stone"}, 20, 5, 15000, 2, 0)
|
|||
|
||||
mobs:register_egg("mobs_animal:rat", "Rat", "mobs_rat_inventory.png", 0)
|
||||
|
||||
minetest.register_alias("mobs:rat", "mobs_animal:rat")
|
||||
-- compatibility
|
||||
mobs:alias_mob("mobs:rat", "mobs_animal:rat")
|
||||
|
||||
-- cooked rat, yummy!
|
||||
minetest.register_craftitem(":mobs:rat_cooked", {
|
||||
|
|
19
sheep.lua
19
sheep.lua
|
@ -170,25 +170,14 @@ for _, col in pairs(all_colours) do
|
|||
|
||||
mobs:register_egg("mobs_animal:sheep_"..col[1], col[2] .. " Sheep", "wool_"..col[1]..".png", 1)
|
||||
|
||||
minetest.register_alias("mobs:sheep_"..col[1], "mobs_animal:sheep_"..col[1])
|
||||
-- compatibility
|
||||
mobs:alias_mob("mobs:sheep_" .. col[1], "mobs_animal:sheep_" .. col[1])
|
||||
|
||||
end
|
||||
|
||||
mobs:register_spawn("mobs_animal:sheep_white",
|
||||
{"default:dirt_with_grass", "ethereal:green_dirt"}, 20, 10, 15000, 1, 31000, true)
|
||||
|
||||
-- compatibility (item and entity)
|
||||
minetest.register_alias("mobs:sheep", "mobs:sheep_white")
|
||||
|
||||
--[[
|
||||
-- replace old sheep entity with new white sheep
|
||||
minetest.register_entity("mobs:sheep", {
|
||||
|
||||
on_activate = function(self, staticdata, dtime_s)
|
||||
|
||||
self.object:remove()
|
||||
|
||||
minetest.add_entity(self.object:getpos(), "mobs_animal:sheep_white")
|
||||
end
|
||||
})
|
||||
]]
|
||||
-- compatibility
|
||||
mobs:alias_mob("mobs:sheep", "mobs_animal:sheep_white")
|
||||
|
|
|
@ -58,7 +58,8 @@ mobs:register_spawn("mobs_animal:pumba",
|
|||
|
||||
mobs:register_egg("mobs_animal:pumba", "Warthog", "wool_pink.png", 1)
|
||||
|
||||
minetest.register_alias("mobs:pumba", "mobs_animal:pumba")
|
||||
-- compatibility
|
||||
mobs:alias_mob("mobs:pumba", "mobs_animal:pumba")
|
||||
|
||||
-- raw porkchop
|
||||
minetest.register_craftitem(":mobs:pork_raw", {
|
||||
|
|
Loading…
Reference in New Issue
Block a user