small fixes

This commit is contained in:
GameHerobrine 2022-10-19 19:02:59 +03:00
parent 7b66cd0250
commit ae8c541452
5 changed files with 23 additions and 11 deletions

View file

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