mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 10:22:56 +00:00
Added Squids with basic AI
This commit is contained in:
@ -24,4 +24,14 @@ namespace pocketmine\entity;
|
||||
|
||||
abstract class Animal extends Creature implements Ageable{
|
||||
|
||||
public function initEntity(){
|
||||
parent::initEntity();
|
||||
if($this->getDataProperty(self::DATA_AGEABLE_FLAGS) === null){
|
||||
$this->setDataProperty(self::DATA_AGEABLE_FLAGS, self::DATA_TYPE_BYTE, 0);
|
||||
}
|
||||
}
|
||||
|
||||
public function isBaby(){
|
||||
return $this->getDataFlag(self::DATA_AGEABLE_FLAGS, self::DATA_FLAG_BABY);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user