mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 19:49:44 +00:00
fixed bug with flying detection, added panic task
This commit is contained in:
parent
7c47c852e2
commit
d7561ed1ba
10 changed files with 70 additions and 17 deletions
|
|
@ -16,6 +16,13 @@ abstract class Animal extends Creature implements Ageable, Breedable{
|
|||
}
|
||||
|
||||
$this->ai->addTask(new TaskTempt());
|
||||
$this->ai->addTask(new TaskPanic());
|
||||
}
|
||||
|
||||
public function harm($dmg, $cause = "generic", $force = false){
|
||||
$ret = parent::harm($dmg, $cause, $force);
|
||||
$this->inPanic |= ($ret && is_numeric($cause));
|
||||
return $ret;
|
||||
}
|
||||
|
||||
public function isBaby(){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue