mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 12:09:43 +00:00
get entity names or sizes by eids or instances
This commit is contained in:
parent
53928f4e88
commit
69d4e52d44
12 changed files with 35 additions and 12 deletions
|
|
@ -8,7 +8,7 @@ class Chicken extends Animal{
|
|||
$server->schedule(mt_rand(0,6000) + 6000, array($this, "dropAnEgg"));
|
||||
$this->setHealth(isset($this->data["Health"]) ? $this->data["Health"] : 4, "generic");
|
||||
$this->update();
|
||||
//$this->setName('Chicken');
|
||||
$this->setName('Chicken');
|
||||
$this->size = $this->isBaby() ? 0.35 : 0.7;
|
||||
}
|
||||
public function isFood($id){
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ class Cow extends Animal{
|
|||
parent::__construct($level, $eid, $class, $type, $data);
|
||||
$this->setHealth(isset($this->data["Health"]) ? $this->data["Health"]:10, "generic");
|
||||
$this->update();
|
||||
//$this->setName('Cow');
|
||||
$this->setName('Cow');
|
||||
$this->size = $this->isBaby() ? 0.65 : 1.4;
|
||||
}
|
||||
public function isFood($id){
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ class Pig extends Animal{
|
|||
$this->update();
|
||||
$this->server = ServerAPI::request();
|
||||
//$this->server->schedule(60, array($this, "testMovement"));
|
||||
//$this->setName('Pig');
|
||||
$this->setName('Pig');
|
||||
$this->size = $this->isBaby() ? 0.60 : 1.1875;
|
||||
}
|
||||
public function isFood($id){
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ class Sheep extends Animal{
|
|||
parent::__construct($level, $eid, $class, $type, $data);
|
||||
$this->setHealth(isset($this->data["Health"]) ? $this->data["Health"] : 8, "generic");
|
||||
$this->update();
|
||||
//$this->setName('Sheep');
|
||||
$this->setName('Sheep');
|
||||
$this->size = $this->isBaby() ? 0.65 : 1.3;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue