NPC Natural Spawning:

-Null entities are now skipped when determining what NPC in a natural spawn entry to spawn in the world.
This commit is contained in:
Luis C.M committed 2022-10-29 18:30:21 -05:00
1 parent abd4ab58a3
commit 62c54e24e8
1 file changed
+3 -1
+3 -1
View File
@@ -160,7 +160,9 @@ public class NPCSpawning {
} catch (Exception e) {
continue;
}
entities.add(entity);
if (entity != null) {
entities.add(entity);
}
}
Entity spawnEntity = entities.get((int)Math.floor(Math.random()*entities.size()));