Implement pre-spawn API to allow modifications to spawned entities.See preceding commit for why this change was included.