classes for all animals, moved construcors

This commit is contained in:
GameHerobrine 2022-06-07 12:59:33 +03:00
parent efa2e11497
commit 327e74e7aa
8 changed files with 59 additions and 43 deletions

View file

@ -1,12 +1,12 @@
<?php
/*
TODO:
move methods
*/
class Pig extends Animal{
const TYPE = 12;
const TYPE = MOB_PIG;
function __construct(Level $level, $eid, $class, $type = 0, $data = array()){
console("A constructor which indicates it works! ".":".$eid.":".$class.":".$type);
parent::__construct($level, $eid, $class, $type, $data);
$this->setHealth(isset($this->data["Health"]) ? $this->data["Health"]:10, "generic");
$this->update();
//$this->setName('Pig');
$this->size = $this->isBaby() ? 0.60 : 1.1875;
}
}