armor is not resisting damage from anything except players, drop fix, and baby fix

This commit is contained in:
GameHerobrine 2022-07-11 16:23:54 +03:00
parent e31546afa7
commit b73205744e
4 changed files with 69 additions and 68 deletions

View file

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