Merge of Mob Spawning code by mgueydan

There's only been a few changes by me to make it fit in with the current codebase. Please let me know if I missed anything.