mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 12:09:43 +00:00
4 bugs were fixed
This commit is contained in:
parent
107afb434b
commit
828599184c
5 changed files with 9 additions and 5 deletions
|
|
@ -10,7 +10,6 @@ abstract class Animal extends Creature implements Ageable, Breedable{
|
|||
public $age;
|
||||
public function __construct(Level $level, $eid, $class, $type = 0, $data = []){
|
||||
parent::__construct($level, $eid, $class, $type, $data);
|
||||
|
||||
$this->setAge(isset($data["Age"]) ? $data["Age"] : 0);
|
||||
if(isset($this->data["IsBaby"]) && $this->data["IsBaby"] && $this->getAge() >= 0){
|
||||
$this->setAge(-24000);
|
||||
|
|
|
|||
|
|
@ -170,7 +170,6 @@ class Entity extends Position
|
|||
break;
|
||||
}
|
||||
$this->boundingBox = new AxisAlignedBB($this->x - $this->radius, $this->y, $this->z - $this->radius, $this->x + $this->radius, $this->y + $this->height, $this->z + $this->radius);
|
||||
$this->update();
|
||||
$this->updateLast();
|
||||
$this->updatePosition();
|
||||
if($this->isInVoid()){
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ class Chicken extends Animal{
|
|||
|
||||
public function update(){
|
||||
parent::update();
|
||||
if($this->timeUntilEgg-- <= 0){
|
||||
if($this->timeUntilEgg-- <= 0 && !$this->isBaby()){
|
||||
$this->dropAnEgg();
|
||||
$this->timeUntilEgg = mt_rand(0,6000) + 6000;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ class Sheep extends Animal{
|
|||
}
|
||||
|
||||
public function getDrops(){
|
||||
return $this->isBaby() ? parent::getDrops() : [
|
||||
return ($this->isBaby() || $this->isSheared()) ? parent::getDrops() : [
|
||||
[WOOL, $this->getColor() & 0x0F, 1]
|
||||
];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue