Skip to content

PolarBear 5.46.0 ​

class · pocketmine\entity\animal\PolarBear · source

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) : void

canFreeze() ​

php
public function canFreeze() : bool

createBaby() protected ​

php
protected function createBaby(\pocketmine\entity\animal\Animal $partner, \pocketmine\entity\Location $location) : \pocketmine\entity\animal\Animal

getAdultDrops() protected ​

php
protected function getAdultDrops() : array

getInitialSizeInfo() protected ​

php
protected function getInitialSizeInfo() : \pocketmine\entity\EntitySizeInfo

getName() ​

php
public function getName() : string

getNetworkTypeId() ​

php
public static function getNetworkTypeId() : string

hasCubNearby() ​

php
public function hasCubNearby() : bool

Whether a polar bear cub is within 8 blocks (checked once a second).

initEntity() protected ​

php
protected function initEntity(\pocketmine\nbt\tag\CompoundTag $nbt) : void

isBreedingItem() ​

php
public function isBreedingItem(\pocketmine\item\Item $item) : bool

registerGoals() protected ​

php
protected function registerGoals() : void

setAttackTarget() ​

php
public function setAttackTarget(?\pocketmine\entity\Living $target) : void

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.