Panda 5.46.0
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
public const GENE_AGGRESSIVE = 6GENE_BROWN
public const GENE_BROWN = 4GENE_LAZY
public const GENE_LAZY = 1GENE_NORMAL
public const GENE_NORMAL = 0GENE_PLAYFUL
public const GENE_PLAYFUL = 3GENE_WEAK
public const GENE_WEAK = 5GENE_WORRIED
public const GENE_WORRIED = 2TAG_GENES
public const TAG_GENES = "GeneArray"Methods
canFallInLove() protected
protected function canFallInLove(\pocketmine\player\Player $player) : boolcreateBaby() protected
protected function createBaby(\pocketmine\entity\animal\Animal $partner, \pocketmine\entity\Location $location) : \pocketmine\entity\animal\AnimalentityBaseTick() protected
protected function entityBaseTick(int $tickDiff = 1) : boolgetAdultDrops() protected
protected function getAdultDrops() : arraygetBabyScale() protected
protected function getBabyScale() : floatgetHiddenGene()
public function getHiddenGene() : intgetInitialSizeInfo() protected
protected function getInitialSizeInfo() : \pocketmine\entity\EntitySizeInfogetMainGene()
public function getMainGene() : intgetName()
public function getName() : stringgetNetworkTypeId()
public static function getNetworkTypeId() : stringgetPersonality()
public function getPersonality() : intinitEntity() protected
protected function initEntity(\pocketmine\nbt\tag\CompoundTag $nbt) : voidisActing()
public function isActing() : boolisBreedingItem()
public function isBreedingItem(\pocketmine\item\Item $item) : boolpersonality()
public static function personality(int $main, int $hidden) : intPersonality shown by a pair of genes.
randomGene()
public static function randomGene() : intJava Panda.Gene.getRandom(): out of 16, lazy, worried, playful and aggressive 1 each, weak 5, brown 2, normal 5.
registerGoals() protected
protected function registerGoals() : voidsaveNBT()
public function saveNBT() : \pocketmine\nbt\tag\CompoundTagsetAttackTarget()
public function setAttackTarget(?\pocketmine\entity\Living $target) : voidsetGenes()
public function setGenes(int $main, int $hidden) : voidstartAction()
public function startAction() : voidstopAction()
public function stopAction() : voidsyncNetworkData() protected
protected function syncNetworkData(\pocketmine\network\mcpe\protocol\types\entity\EntityMetadataCollection $properties) : voidwantsToAct()
public function wantsToAct() : boolLazy pandas lie down, playful ones roll, from time to time.
