moved 2 more entities to separate classes, no more 1.0.2

This commit is contained in:
GameHerobrine 2023-02-24 11:22:14 +03:00
parent 96bb79cdcb
commit 0946e8f3a2
9 changed files with 48 additions and 21 deletions

View file

@ -8,6 +8,7 @@ class EntityList{
$this->entities[$property->getEntityType()] = $property;
}
public function getEntityFromTypeAndClass($type, $class){
if($class === ENTITY_ITEM) return $this->entities["itemSpecial"];
return isset($this->entities[$type]) && $this->entities[$type]->getEntityClass() === $class ? $this->entities[$type] : 0;
}
private $entities = [];