Move Entity despawn logic back to Player

this is not network-session specific, and different implementations will need to do this.
This commit is contained in:
Dylan K. Taylor
2019-05-07 18:01:23 +01:00
parent 66481fedeb
commit d7a7ab5102
2 changed files with 6 additions and 5 deletions

View File

@ -790,11 +790,7 @@ class NetworkSession{
}
public function stopUsingChunk(int $chunkX, int $chunkZ) : void{
foreach($this->player->getWorld()->getChunkEntities($chunkX, $chunkZ) as $entity){
if($entity !== $this->player){
$entity->despawnFrom($this->player);
}
}
}
public function tick() : bool{