mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 20:19:44 +00:00
water damage tweaks, using php8 pack functions
This commit is contained in:
parent
229a563ff5
commit
68b8232f07
17 changed files with 46 additions and 76 deletions
|
|
@ -10,7 +10,6 @@ class Chicken extends Animal{
|
|||
$this->setHealth(isset($this->data["Health"]) ? $this->data["Health"] : 4, "generic");
|
||||
$this->setName('Chicken');
|
||||
$this->setSpeed(0.25);
|
||||
$this->update();
|
||||
}
|
||||
public function isFood($id){
|
||||
return $id === PUMPKIN_SEEDS || $id === MELON_SEEDS || $id === BEETROOT_SEEDS || $id === WHEAT_SEEDS;
|
||||
|
|
@ -18,8 +17,8 @@ class Chicken extends Animal{
|
|||
|
||||
public function fall(){} //chickens have no fall dmg?
|
||||
|
||||
public function update(){
|
||||
parent::update();
|
||||
public function update($now){
|
||||
parent::update($now);
|
||||
if($this->timeUntilEgg-- <= 0 && !$this->isBaby()){
|
||||
$this->dropAnEgg();
|
||||
$this->timeUntilEgg = mt_rand(0,6000) + 6000;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue