summaryrefslogtreecommitdiff
path: root/spawner.lua
diff options
context:
space:
mode:
authorTenPlus1 <kinsellaja@yahoo.com>2017-09-08 09:41:36 +0100
committerTenPlus1 <kinsellaja@yahoo.com>2017-09-08 09:41:36 +0100
commit7b0a1cf233b18a17b0d00721cd03c3f4b49e1b28 (patch)
tree9e4b1d2964381947aef28379728696752a1eebb7 /spawner.lua
parente90369ee213fe220ee2f309ab05b5cfe6177bfdc (diff)
added spawner entity check
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