summaryrefslogtreecommitdiff
path: root/spawner.lua
diff options
context:
space:
mode:
Diffstat (limited to 'spawner.lua')
-rw-r--r--spawner.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/spawner.lua b/spawner.lua
index 8aa5e32..7e75aac 100644
--- a/spawner.lua
+++ b/spawner.lua
@@ -171,7 +171,8 @@ minetest.register_abm({
pos2.y = pos2.y + 0.5
-- only if light levels are within range
- if lig >= mlig and lig <= xlig then
+ if lig >= mlig and lig <= xlig
+ and minetest.registered_entities[mob] then
minetest.add_entity(pos2, mob)
end
end