Panda

Pandas are passive (sometimes neutral) animal mobs that reside in jungles.

Spawning
Pandas spawn in groups of 1–2 in bamboo jungle biomes at the surface on grass blocks with a (minimum) two block space above them at a light level of 9 or more, but are rarer than other jungle mobs. They spawn with a randomized personality, with the normal one being the most common and the brown variant being the rarest.

In Bedrock Edition pandas can spawn at light level 7 or above in jungle biomes and have a higher spawn rate in bamboo jungle biomes. 57% of pandas will spawn as babies.

Behavior
Pandas act similarly to other passive mobs; they will wander aimlessly, avoiding falling off cliffs high enough to cause fall damage, and will stay out of water or lava, unless they roll over an edge. They also move faster in water than other land mobs, similarly to polar bears. They will follow any player who is carrying bamboo and will stop following them if the player moves over approximately 16 blocks away from them. They will also randomly whimper. Adult pandas will seek out bamboo and cake items and eat them.

Baby pandas will sometimes sneeze, which rarely drops a slime ball and makes nearby adult pandas jump. They will also occasionally roll over and jump around.

Pandas will attack players when hurt, but only once, similar to llamas.

Pandas can be ridden by baby zombies variants.

Personalities
Pandas have different personalities: either lazy, worried, playful, aggressive, weak, brown or normal.


 * Lazy pandas:
 * Will lay on their backs.
 * Are slower than normal pandas.
 * Are the slowest land mob in the game.
 * Will not follow a player who is holding bamboo, while they're lying on their back.
 * Worried pandas:
 * Will avoid the player and most hostile mobs, except slimes, magma cubes, ghasts, shulkers, phantoms and the ender dragon.
 * Will shake and hide their faces during thunderstorms.
 * Will not eat bamboo or cake items on their own, regardless of whether a player or hostile mob is in vicinity or not.
 * Playful pandas:
 * Will roll over and jump around even as adults.
 * Aggressive pandas:
 * Are neutral and will attack the player and other mobs when hit.
 * When nearby pandas are attacked, aggressive pandas will become hostile towards the attacker.
 * Pandas are very slow, but have reach rivaling that of the player. This makes them difficult to attack at melee range (e.g. with a sword) without getting damaged, but also makes them easy to attack at long range (e.g. with a crossbow).
 * Weak pandas:
 * Tend to sneeze more often as babies than regular baby pandas.
 * Have 10 health instead of 20.
 * Brown pandas:
 * Do not have unique personality actions but are brown and white instead of the usual black and white.
 * Normal pandas:
 * Do not have unique personality actions.

Breeding
For two pandas to enter love mode, there must be at least eight bamboo blocks within a five-block radius from them; once that requirement is met, the player can feed them bamboo and they will mate, producing a baby panda. If there isn't enough bamboo however, both pandas will briefly shake their heads.

Genetics
Each panda has two hidden values called "genes" or "alleles"; when two pandas breed each one passes one of their genes to their children, who then randomly mix both obtained genes as their respective main and hidden gene. These genes can have a maximum value of 15. Similar to biology, there is a main gene, which affects the personality traits of a panda which are dominant including lazy, worried, playful, aggressive and normal. If any of these are a panda's main gene, the panda will have that personality trait regardless of the hidden gene. There is also a hidden gene, which only affects the recessive personality traits of a panda and is limited to weak and brown. Only a panda whose genes are both weak or brown will have the weak or brown personality trait. A panda with the weak or brown main gene but not the hidden gene will have the normal personality trait. Each panda has different required genes to be born.

All pandas have 2 genes, one dominant and one recessive. Weak and brown panda genes take less priority to be the dominant gene over the other panda types. For example, if an aggressive panda with an aggressive dominant and recessive gene, breeds with a weak panda with a weak dominant and recessive gene, the baby will never be a weak panda, and will always be aggressive.

Another example is with the brown panda, which has the same breeding behavior as the weak one. If a panda with dominant (brown) and recessive (brown) breeds with a panda with recessive and dominant genes that aren't brown or weak, the baby will never be born as a brown panda.

However, if a panda has a brown recessive gene, and breeds with a panda with dominant and recessive brown genes, the baby will then have a 50% chance of being a brown panda. When two pandas with the same genes breed, there is a 50% chance they will be born as either.

Two pandas can have the same genes even though they don't have the same personality. As an aggressive panda can have recessive lazy genes, while another lazy panda can have recessive aggressive genes.

There is also a 1/32 chance that one of the baby genes will mutate into another gene.

Appearance


The appearance of pandas depends on their personality:
 * Aggressive pandas have angry eyebrows.
 * Lazy pandas have a smiling face.
 * Weak pandas have teary eyes and snotty noses.
 * Worried pandas have 'puppy' eyes similar to tamed wolves.
 * Playful pandas have their tongues out.
 * Normal pandas have a frowning face.

Pandas are usually black and white, but there is a rare brown and white variant.

Drops
Upon death, adult pandas will drop: Like other baby animals, killing a baby panda yields no items or experience.
 * 0–2
 * 1–3 s, if killed by a tamed wolf or the player.

Baby pandas have a chance of dropping 1 when they sneeze.

Data values
Pandas have entity data associated with them that contain various properties of the mob.

Trivia

 * To create the in-game sounds for pandas, Mojang's lead sound designer, Samuel Åberg, went to Guangzhou, China, to record real-life pandas.
 * The baby panda's sneeze is likely a reference to a moderately popular video of a real baby panda sneezing while its parent eats.
 * Brown pandas are a real subspecies of the giant panda, known as the Qinling panda.
 * Pandas are the second type of bear to be added into the game, with the first being the polar bear.
 * The lazy panda is the slowest land mob in the game (not counting status effects such as slowness).
 * The rarest mob $$ is a baby husk riding a brown panda, which has a 2.88×10−13 chance (one in 3.47 2 trillion) of spawning.