forked from mtcontrib/mobs_animal
Added spawn.lua check for custom mob spawning with example file
This commit is contained in:
2
rat.lua
2
rat.lua
@ -67,6 +67,7 @@ local function rat_spawn(self, pos)
|
||||
self.health = 100
|
||||
end
|
||||
|
||||
if not mobs.custom_spawn_animal then
|
||||
mobs:spawn({
|
||||
name = "mobs_animal:rat",
|
||||
nodes = {"default:stone"},
|
||||
@ -77,6 +78,7 @@ mobs:spawn({
|
||||
max_height = 0,
|
||||
-- on_spawn = rat_spawn,
|
||||
})
|
||||
end
|
||||
|
||||
|
||||
mobs:register_egg("mobs_animal:rat", S("Rat"), "mobs_rat_inv.png")
|
||||
|
Reference in New Issue
Block a user