Skip to content

Panda 5.46.0 ​

class · pocketmine\entity\animal\Panda · source

Extends Animal

Bedrock values (entities/panda.json): 20 health (weak: 10), 1.3x1.25, movement 0.15, babies scale 0.4. Two genes (main and hidden allele, saved as Bedrock's "GeneArray"); the personality (VARIANT) is the main gene, except the recessive brown and weak genes which only show when both alleles match. Normal 0, lazy 1, worried 2, playful 3, brown 4, weak 5, aggressive 6; random genes and inheritance (one allele from each parent, 1/32 mutation) follow Java. Aggressive pandas fight back (6 damage), worried ones flee from other mobs, lazy ones lie down (LAYING_DOWN), playful ones roll (ROLLING). Tempted and bred with bamboo, which needs 8 bamboo blocks within 5 blocks. Babies sneeze (weak babies more often) and drop a slime ball. Loot (loot_tables/entities/panda.json): 0-2 bamboo (+0-1 per Looting level); XP 1-3.

Constants ​

GENE_AGGRESSIVE ​

php
public const GENE_AGGRESSIVE = 6

GENE_BROWN ​

php
public const GENE_BROWN = 4

GENE_LAZY ​

php
public const GENE_LAZY = 1

GENE_NORMAL ​

php
public const GENE_NORMAL = 0

GENE_PLAYFUL ​

php
public const GENE_PLAYFUL = 3

GENE_WEAK ​

php
public const GENE_WEAK = 5

GENE_WORRIED ​

php
public const GENE_WORRIED = 2

TAG_GENES ​

php
public const TAG_GENES = "GeneArray"

Methods ​

canFallInLove() protected ​

php
protected function canFallInLove(\pocketmine\player\Player $player) : bool

createBaby() protected ​

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

entityBaseTick() protected ​

php
protected function entityBaseTick(int $tickDiff = 1) : bool

getAdultDrops() protected ​

php
protected function getAdultDrops() : array

getBabyScale() protected ​

php
protected function getBabyScale() : float

getHiddenGene() ​

php
public function getHiddenGene() : int

getInitialSizeInfo() protected ​

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

getMainGene() ​

php
public function getMainGene() : int

getName() ​

php
public function getName() : string

getNetworkTypeId() ​

php
public static function getNetworkTypeId() : string

getPersonality() ​

php
public function getPersonality() : int

initEntity() protected ​

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

isActing() ​

php
public function isActing() : bool

isBreedingItem() ​

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

personality() ​

php
public static function personality(int $main, int $hidden) : int

Personality shown by a pair of genes.

randomGene() ​

php
public static function randomGene() : int

Java Panda.Gene.getRandom(): out of 16, lazy, worried, playful and aggressive 1 each, weak 5, brown 2, normal 5.

registerGoals() protected ​

php
protected function registerGoals() : void

saveNBT() ​

php
public function saveNBT() : \pocketmine\nbt\tag\CompoundTag

setAttackTarget() ​

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

setGenes() ​

php
public function setGenes(int $main, int $hidden) : void

startAction() ​

php
public function startAction() : void

stopAction() ​

php
public function stopAction() : void

syncNetworkData() protected ​

php
protected function syncNetworkData(\pocketmine\network\mcpe\protocol\types\entity\EntityMetadataCollection $properties) : void

wantsToAct() ​

php
public function wantsToAct() : bool

Lazy pandas lie down, playful ones roll, from time to time.

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