4 bugs were fixed

This commit is contained in:
GameHerobrine 2022-11-13 18:52:48 +03:00
parent 107afb434b
commit 828599184c
5 changed files with 9 additions and 5 deletions

View file

@ -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;
}