Merge branch 'stable' into next-minor

This commit is contained in:
Dylan K. Taylor
2022-01-20 16:30:49 +00:00
2 changed files with 3 additions and 2 deletions

View File

@ -878,7 +878,7 @@ class World implements ChunkManager{
//Update entities that need update
Timings::$tickEntity->startTiming();
foreach($this->updateEntities as $id => $entity){
if($entity->isClosed() or !$entity->onUpdate($currentTick)){
if($entity->isClosed() or $entity->isFlaggedForDespawn() or !$entity->onUpdate($currentTick)){
unset($this->updateEntities[$id]);
}
if($entity->isFlaggedForDespawn()){