mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 19:49:44 +00:00
item physics test
This commit is contained in:
parent
828599184c
commit
3892d697f8
5 changed files with 51 additions and 29 deletions
|
|
@ -4,12 +4,12 @@ class Chicken extends Animal{
|
|||
const TYPE = MOB_CHICKEN;
|
||||
public $timeUntilEgg;
|
||||
function __construct(Level $level, $eid, $class, $type = 0, $data = []){
|
||||
$this->timeUntilEgg = mt_rand(0,6000) + 6000;
|
||||
parent::__construct($level, $eid, $class, $type, $data);
|
||||
$this->setHealth(isset($this->data["Health"]) ? $this->data["Health"] : 4, "generic");
|
||||
$this->setName('Chicken');
|
||||
$this->setSize($this->isBaby() ? 0.2 : 0.4, $this->isBaby() ? 0.35 : 0.7);
|
||||
$this->setSpeed(0.25);
|
||||
$this->timeUntilEgg = mt_rand(0,6000) + 6000;
|
||||
$this->update();
|
||||
}
|
||||
public function isFood($id){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue