mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 12:09:43 +00:00
Update EntityAPI.php
This commit is contained in:
parent
7ea63bdceb
commit
83b7bc4b39
11 changed files with 380 additions and 57 deletions
|
|
@ -4,8 +4,7 @@ class Chicken extends Animal{
|
|||
const TYPE = MOB_CHICKEN;
|
||||
function __construct(Level $level, $eid, $class, $type = 0, $data = array()){
|
||||
parent::__construct($level, $eid, $class, $type, $data);
|
||||
$server = ServerAPI::request();
|
||||
$server->schedule(mt_rand(0,6000) + 6000, array($this, "dropAnEgg"));
|
||||
$this->server->schedule(mt_rand(0,6000) + 6000, array($this, "dropAnEgg"));
|
||||
$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);
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ class Pig extends Animal{
|
|||
$this->server = ServerAPI::request();
|
||||
$this->setSize($this->isBaby() ? 0.45 : 0.9, $this->isBaby() ? 0.45 : 0.9);
|
||||
$this->setName('Pig');
|
||||
$this->ai->addTask(new TaskLookAround());
|
||||
$this->update();
|
||||
}
|
||||
public function isFood($id){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue