PigZombie fire resistance

This commit is contained in:
ArkQuark 2022-11-02 13:32:12 +03:00
parent ac1a1b2449
commit d6e66084c4
2 changed files with 40 additions and 39 deletions

View file

@ -5,13 +5,14 @@ move methods
*/
abstract class Creature extends Living{
const CLASS_TYPE = ENTITY_MOB;
public function __construct(Level $level, $eid, $class, $type = 0, $data = array()){
public function __construct(Level $level, $eid, $class, $type = 0, $data = []){
parent::__construct($level, $eid, $class, $type, $data);
$this->setHealth(isset($this->data["Health"]) ? $this->data["Health"]:1, "generic");
$this->setHealth(isset($this->data["Health"]) ? $this->data["Health"] : 1, "generic");
//$this->setName((isset($mobs[$this->type]) ? $mobs[$this->type]:$this->type));
$this->ai->addTask(new TaskLookAround());
$this->ai->addTask(new TaskRandomWalk());
if(Entity::$updateOnTick){
$this->ai->addTask(new TaskLookAround());
$this->ai->addTask(new TaskRandomWalk());
}
}
public function spawn($player){