Spawning disabled if chance set to 0 in minetest.conf

master
TenPlus1 2016-01-05 11:07:18 +00:00
parent 9cd759f824
commit c51b8150fd
1 changed files with 6 additions and 0 deletions

View File

@ -1801,6 +1801,12 @@ function mobs:spawn_specific(name, nodes, neighbors, min_light, max_light,
if new_chance ~= nil then
chance = new_chance
print ("[Mobs Redo] Chance setting for " .. name .. " is now " .. chance)
if chance == 0 then
print("[Mobs Redo] " .. name .. " has spawning disabled")
return
end
end
minetest.register_abm({