PolarBear 5.46.0
Extends Animal
Bedrock values (entities/polar_bear.json): 30 health, 1.4x1.4, movement 0.25, follow range 48, attack 6. Neutral: adults attack whoever hurts them or a nearby cub, and players close to their cubs (within 8 blocks of a cub), and hunt foxes; cubs panic. Not breedable. Loot (loot_tables/entities/polar_bear.json): 0-2 raw cod and 0-2 raw salmon (cooked when burning), each +0-1 per Looting level; XP 1-3.
Methods
attack()
php
public function attack(\pocketmine\event\entity\EntityDamageEvent $source) : voidcanFreeze()
php
public function canFreeze() : boolcreateBaby() protected
php
protected function createBaby(\pocketmine\entity\animal\Animal $partner, \pocketmine\entity\Location $location) : \pocketmine\entity\animal\AnimalgetAdultDrops() protected
php
protected function getAdultDrops() : arraygetInitialSizeInfo() protected
php
protected function getInitialSizeInfo() : \pocketmine\entity\EntitySizeInfogetName()
php
public function getName() : stringgetNetworkTypeId()
php
public static function getNetworkTypeId() : stringhasCubNearby()
php
public function hasCubNearby() : boolWhether a polar bear cub is within 8 blocks (checked once a second).
initEntity() protected
php
protected function initEntity(\pocketmine\nbt\tag\CompoundTag $nbt) : voidisBreedingItem()
php
public function isBreedingItem(\pocketmine\item\Item $item) : boolregisterGoals() protected
php
protected function registerGoals() : voidsetAttackTarget()
php
public function setAttackTarget(?\pocketmine\entity\Living $target) : void