mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 07:06:45 +01:00
Think we may have been adding some entities twice.
This commit is contained in:
parent
57e6e5400b
commit
77638bf56a
@ -619,12 +619,10 @@ public class HashChunkManager implements ChunkManager {
|
|||||||
|
|
||||||
List<Entity> tempSpawnedMobs = new ArrayList<Entity>(spawnedMobs);
|
List<Entity> tempSpawnedMobs = new ArrayList<Entity>(spawnedMobs);
|
||||||
for (Entity entity : tempSpawnedMobs) {
|
for (Entity entity : tempSpawnedMobs) {
|
||||||
if (entity.isDead())
|
if (entity.isDead() || !entity.isValid()) {
|
||||||
mobsToRemove.add(entity);
|
|
||||||
|
|
||||||
if (!entity.isValid())
|
|
||||||
mobsToRemove.add(entity);
|
mobsToRemove.add(entity);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
spawnedMobs.removeAll(mobsToRemove);
|
spawnedMobs.removeAll(mobsToRemove);
|
||||||
mobsToRemove.clear();
|
mobsToRemove.clear();
|
||||||
|
Loading…
Reference in New Issue
Block a user