Improved freeing chunks

This commit is contained in:
Shoghi Cervantes
2014-10-31 16:39:32 +01:00
parent f8d6ebabf3
commit ce989876af
3 changed files with 8 additions and 15 deletions

View File

@ -748,9 +748,8 @@ abstract class Entity extends Location implements Metadatable{
foreach($this->level->getChunkEntities($X, $Z) as $entity){
$entity->despawnFrom($this);
}
$this->level->freeChunk($X, $Z, $this);
}
$this->level->freeAllChunks($this);
}
}
$this->setLevel($targetLevel, $this instanceof Player ? true : false); //Hard reference