From c049278a6dc395b3c18c559efde7a0eac8ed6f23 Mon Sep 17 00:00:00 2001 From: GameHerobrine Date: Mon, 11 Jul 2022 23:41:24 +0300 Subject: [PATCH] fix of timings(forgot that i changed them) --- src/entity/animal/Chicken.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/entity/animal/Chicken.php b/src/entity/animal/Chicken.php index 88c32148..710ad8fa 100644 --- a/src/entity/animal/Chicken.php +++ b/src/entity/animal/Chicken.php @@ -5,7 +5,7 @@ class Chicken extends Animal{ function __construct(Level $level, $eid, $class, $type = 0, $data = array()){ parent::__construct($level, $eid, $class, $type, $data); $server = ServerAPI::request(); - $server->schedule(1, array($this, "dropAnEgg")); + $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'); @@ -19,7 +19,7 @@ class Chicken extends Animal{ return; } ServerAPI::request()->api->entity->drop(new Position($this->x + 0.5, $this->y, $this->z + 0.5, $this->level), BlockAPI::getItem(EGG,0,1)); - $this->server->schedule(1, array($this, "dropAnEgg")); + $this->server->schedule(mt_rand(0,6000) + 6000, array($this, "dropAnEgg")); } public function getDrops(){