Extended Lua framework to support entity spawning and despawning.