changed some spawn settings
This commit is contained in:
parent
ba878a4924
commit
2737030329
5
api.lua
5
api.lua
@ -814,14 +814,13 @@ end
|
||||
mobs.spawning_mobs = {}
|
||||
|
||||
function mobs:spawn_specific(name, nodes, neighbors, min_light, max_light, interval, chance, active_object_count, min_height, max_height)
|
||||
mobs.spawning_mobs[name] = true
|
||||
mobs.spawning_mobs[name] = true
|
||||
minetest.register_abm({
|
||||
nodenames = nodes,
|
||||
neighbors = neighbors,
|
||||
interval = interval,
|
||||
chance = chance,
|
||||
action = function(pos, node, _, active_object_count_wider)
|
||||
|
||||
-- do not spawn if too many active in area
|
||||
if active_object_count_wider > active_object_count
|
||||
or not mobs.spawning_mobs[name]
|
||||
@ -868,7 +867,7 @@ end
|
||||
|
||||
-- compatibility with older mob registration
|
||||
function mobs:register_spawn(name, nodes, max_light, min_light, chance, active_object_count, max_height)
|
||||
mobs:spawn_specific(name, nodes, {"air"}, min_light, max_light, 30, chance, active_object_count, -32000, max_height)
|
||||
mobs:spawn_specific(name, nodes, {"air"}, min_light, max_light, 30, chance, active_object_count, -31000, max_height)
|
||||
end
|
||||
|
||||
-- particle effects
|
||||
|
2
bee.lua
2
bee.lua
@ -46,7 +46,7 @@ mobs:register_mob("mobs:bee", {
|
||||
end,
|
||||
})
|
||||
|
||||
mobs:register_spawn("mobs:bee", {"group:flower"}, 20, 4, 5000, 1, 31000)
|
||||
mobs:register_spawn("mobs:bee", {"group:flower"}, 20, 8, 5000, 1, 31000)
|
||||
|
||||
mobs:register_egg("mobs:bee", "Bee", "mobs_bee_inv.png", 0)
|
||||
|
||||
|
2
cow.lua
2
cow.lua
@ -98,7 +98,7 @@ mobs:register_mob("mobs:cow", {
|
||||
end,
|
||||
})
|
||||
|
||||
mobs:register_spawn("mobs:cow", {"default:dirt_with_grass", "ethereal:green_dirt"}, 20, 0, 11000, 1, 31000)
|
||||
mobs:register_spawn("mobs:cow", {"default:dirt_with_grass", "ethereal:green_dirt"}, 20, 8, 11000, 1, 31000)
|
||||
|
||||
mobs:register_egg("mobs:cow", "Cow", "default_grass.png", 1)
|
||||
|
||||
|
@ -41,6 +41,6 @@ mobs:register_mob("mobs:dirt_monster", {
|
||||
},
|
||||
})
|
||||
|
||||
mobs:register_spawn("mobs:dirt_monster", {"default:dirt_with_grass", "ethereal:gray_dirt_top"}, 5, 0, 7000, 1, 31000)
|
||||
mobs:register_spawn("mobs:dirt_monster", {"default:dirt_with_grass", "ethereal:gray_dirt"}, 5, 0, 7000, 1, 31000)
|
||||
|
||||
mobs:register_egg("mobs:dirt_monster", "Dirt Monster", "default_dirt.png", 1)
|
||||
|
@ -63,6 +63,6 @@ mobs:register_mob("mobs:kitten", {
|
||||
end,
|
||||
})
|
||||
|
||||
mobs:register_spawn("mobs:kitten", {"default:dirt_with_grass", "ethereal:grove_dirt"}, 20, 0, 12000, 1, 31000)
|
||||
mobs:register_spawn("mobs:kitten", {"default:dirt_with_grass", "ethereal:grove_dirt"}, 20, 8, 12000, 1, 31000)
|
||||
|
||||
mobs:register_egg("mobs:kitten", "Kitten", "mobs_kitten_inv.png", 0)
|
||||
|
@ -45,6 +45,6 @@ mobs:register_mob("mobs:oerkki", {
|
||||
replace_offset = -1,
|
||||
})
|
||||
|
||||
mobs:register_spawn("mobs:oerkki", {"default:stone"}, 5, -1, 7000, 1, -10)
|
||||
mobs:register_spawn("mobs:oerkki", {"default:stone"}, 5, 0, 7000, 1, -10)
|
||||
|
||||
mobs:register_egg("mobs:oerkki", "Oerkki", "default_obsidian.png", 1)
|
||||
|
Loading…
x
Reference in New Issue
Block a user