Possible fix for #1661

This commit is contained in:
Shoghi Cervantes
2014-10-05 16:32:15 +02:00
parent 5e03e157ad
commit 6b65b68ebc
7 changed files with 24 additions and 39 deletions

View File

@ -1706,10 +1706,6 @@ class Level implements ChunkManager, Metadatable{
$entity->kill();
}
if(($chunk = $this->getChunk($entity->chunkX, $entity->chunkZ)) instanceof FullChunk){
$chunk->removeEntity($entity);
}
unset($this->entities[$entity->getID()]);
}
@ -1749,9 +1745,7 @@ class Level implements ChunkManager, Metadatable{
if($tile->getLevel() !== $this){
throw new \RuntimeException("Invalid Tile level");
}
if($this->isChunkLoaded($tile->chunk->getX(), $tile->chunk->getZ())){
$this->getChunk($tile->chunk->getX(), $tile->chunk->getZ(), true)->removeTile($tile);
}
unset($this->tiles[$tile->getID()]);
}