Moved Entity::get() to Level::getEntity() and removed Entity::getAll()

This commit is contained in:
Shoghi Cervantes
2014-05-24 13:30:37 +02:00
parent ef6ca9d2cd
commit abff932d8f
2 changed files with 10 additions and 9 deletions

View File

@@ -67,7 +67,7 @@ class Level{
public $players = [];
/** @var Entity[] */
public $entities = [];
protected $entities = [];
/** @var Entity[][] */
public $chunkEntities = [];
@@ -798,6 +798,15 @@ class Level{
return $this->level->getBiome((int) $x, (int) $z, $biome);
}
/**
* @param int $entityId
*
* @return Entity
*/
public function getEntity($entityId){
return isset($this->entities[$entityId]) ? $this->entities[$entityId] : null;
}
/**
* Gets the list of all the entitites in this level
*