Make EntityTrackerBase#clearEntities call removeEntity for all entries (#4142)

This commit is contained in:
EnZaXD 2024-09-12 22:09:52 +02:00 committed by GitHub
parent ebc0e61be8
commit e0ce8cc715
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -95,7 +95,10 @@ public class EntityTrackerBase implements EntityTracker, ClientEntityIdChangeLis
@Override
public void clearEntities() {
entities.clear();
// Call wrapper function in case protocols need to do additional removals
for (final int id : entities.keySet().toIntArray()) {
removeEntity(id);
}
}
@Override