mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 12:09:43 +00:00
removed commit added again
This commit is contained in:
parent
0e3f78fbf7
commit
e827427d1a
11 changed files with 22 additions and 13 deletions
|
|
@ -5,10 +5,10 @@ class Chicken extends Animal{
|
|||
public $timeUntilEgg;
|
||||
function __construct(Level $level, $eid, $class, $type = 0, $data = []){
|
||||
$this->timeUntilEgg = mt_rand(0,6000) + 6000;
|
||||
$this->setSize($this->isBaby() ? 0.2 : 0.3, $this->isBaby() ? 0.35 : 0.4);
|
||||
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.3, $this->isBaby() ? 0.35 : 0.4);
|
||||
$this->setSpeed(0.25);
|
||||
$this->update();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@
|
|||
class Cow extends Animal{
|
||||
const TYPE = MOB_COW;
|
||||
function __construct(Level $level, $eid, $class, $type = 0, $data = []){
|
||||
$this->setSize($this->isBaby() ? 0.45 : 0.9 , $this->isBaby() ? 0.7 : 1.4);
|
||||
parent::__construct($level, $eid, $class, $type, $data);
|
||||
$this->setHealth(isset($this->data["Health"]) ? $this->data["Health"] : 10, "generic");
|
||||
$this->setSize($this->isBaby() ? 0.45 : 0.9 , $this->isBaby() ? 0.7 : 1.4);
|
||||
$this->setName("Cow");
|
||||
$this->setSpeed(0.2);
|
||||
$this->update();
|
||||
|
|
|
|||
|
|
@ -3,10 +3,10 @@ class Pig extends Animal implements Rideable{
|
|||
const TYPE = MOB_PIG;
|
||||
|
||||
public function __construct(Level $level, $eid, $class, $type = 0, $data = []){
|
||||
$this->setSize($this->isBaby() ? 0.45 : 0.9, $this->isBaby() ? 0.45 : 0.9);
|
||||
parent::__construct($level, $eid, $class, $type, $data);
|
||||
$this->setHealth(isset($this->data["Health"]) ? $this->data["Health"]:10, "generic");
|
||||
$this->server = ServerAPI::request();
|
||||
$this->setSize($this->isBaby() ? 0.45 : 0.9, $this->isBaby() ? 0.45 : 0.9);
|
||||
$this->setName("Pig");
|
||||
$this->setSpeed(0.25);
|
||||
$this->update();
|
||||
|
|
|
|||
|
|
@ -4,12 +4,12 @@ class Sheep extends Animal{
|
|||
public $color;
|
||||
const TYPE = MOB_SHEEP;
|
||||
function __construct(Level $level, $eid, $class, $type = 0, $data = []){
|
||||
$this->setSize($this->isBaby() ? 0.45 : 0.9, $this->isBaby() ? 0.675 : 1.3);
|
||||
parent::__construct($level, $eid, $class, $type, $data);
|
||||
$this->setHealth(isset($this->data["Health"]) ? $this->data["Health"] : 8, "generic");
|
||||
$this->setName("Sheep");
|
||||
$this->data["Sheared"] = isset($this->data["Sheared"]) ? $this->data["Sheared"] : 0;
|
||||
$this->data["Color"] = isset($this->data["Color"]) ? $this->data["Color"] : $this->sheepColor();
|
||||
$this->setSize($this->isBaby() ? 0.45 : 0.9, $this->isBaby() ? 0.675 : 1.3);
|
||||
$this->setSpeed(0.25);
|
||||
$this->update();
|
||||
if($this->isSheared() and Entity::$updateOnTick){ //if ai enabled
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue