Skip to Content

Overview

AttributeValue
Health6 HP (3 hearts)
TameableYes
Can FlyYes
Shoulder PerchingYes (tamed only)

Behaviors

Mimicking System

Implementation: MimicBehavior, ParrotMimicGoal

Parrots mimic hostile mob sounds as a warning system for players.

Base Accuracy: 55-95% (varies by individual parrot)

Mimic Types:

Mob TypeSound EventRarity
ZombiePARROT_IMITATE_ZOMBIECommon
SkeletonPARROT_IMITATE_SKELETONCommon
SpiderPARROT_IMITATE_SPIDERCommon
CreeperPARROT_IMITATE_CREEPERUncommon
EndermanPARROT_IMITATE_ENDERMANRare
WitchPARROT_IMITATE_WITCHRare
Wither SkeletonPARROT_IMITATE_WITHER_SKELETONRare
RavagerPARROT_IMITATE_RAVAGERRare
PhantomPARROT_IMITATE_PHANTOMRare
HoglinPARROT_IMITATE_HOGLINRare
PiglinPARROT_IMITATE_PIGLINRare
VindicatorPARROT_IMITATE_VINDICATORRare

Warning System:

  • Triggered when hostile mob is within 32 blocks
  • 80% chance to perform a warning mimic
  • Accuracy increases by 15% for warnings
  • Shorter cooldown (100 ticks vs 200 ticks)

Configuration:

{ "mimic": { "base_accuracy": 0.75, "accuracy_variation": 0.2, "mimic_chance": 0.05, "warning_range": 32.0, "warning_chance": 0.8 } }

Dancing Behavior

Implementation: DanceBehavior, ParrotMusicGoal

Parrots dance to music with different styles based on the music disc playing.

Dance Styles by Music Disc:

DiscDance StyleDescription
13, catBOUNCERhythmic jumping every 10 ticks
blocks, chirpSPIN45-degree rotations every 5 ticks
far, mallWIGGLERapid small movements and head shaking
mellohi, stalHEAD_BOBVertical bobbing motion
strad, wardWING_FLAPFrequent jumping with rotations
11, waitPARTYEnergetic bouncing and spinning
otherside, 5, pigstep, relicRAVEFast spinning with strobe jumping
pigstepDISCOSmooth rhythmic movements

Dance Mechanics:

StyleBehavior
BOUNCEJump every 10 ticks with slight rotation changes
SPINRotate 45 degrees every 5 ticks
WIGGLERapid 15-degree rotations and forward/back movement
HEAD_BOBJump every 8 ticks with head angle changes
WING_FLAPJump every 6 ticks with 30-degree rotations
PARTYJump every 5 ticks with random spins
RAVESpin 30 degrees per tick with strobe jumping
DISCOSmooth sine-wave bobbing and rotation

Party Effect:

  • Other parrots within 16 blocks have 30% chance to join
  • Dancing parrots emit note particles
  • All parrots dance in sync

Configuration:

{ "dance": { "show_particles": true, "enable_party_effect": true, "party_radius": 16.0, "party_join_chance": 0.3 } }

Music Detection

Implementation: MusicDetectionBehavior

Parrots detect and respond to music sources.

Detection Range: 64 blocks (configurable)

Music Sources:

  • Jukeboxes (detects any playing disc)
  • Note blocks (remembers plays for 5 seconds)

Behavior Sequence:

  1. Parrot detects music within range
  2. Determines dance style from the disc
  3. Flies toward music source at 1.2x speed
  4. Perches nearby (within 6 blocks)
  5. Starts dancing with appropriate style

Configuration:

{ "music": { "detection_radius": 64, "flight_speed": 1.2, "prefer_high_perches": true } }

Flight and Perching

Implementation: PerchBehavior, ParrotPerchGoal

Parrots seek high perches and can ride on player shoulders.

Perch Preferences:

  • High perches: 5+ blocks above minimum build height
  • Isolation: Avoid perches near threats (cats, foxes, wolves, ocelots)
  • Tree coverage: Bonus score for leaf blocks
  • Block preferences: Fences and logs get bonus points

Perch Scoring Formula:

Score = (height * height_bonus) - (distance * distance_penalty) + (leaf_bonus if leaves) + (preferred_block_bonus if preferred block) - (threat_penalty / threat_distance)

Shoulder Perching:

  • Only tamed parrots can perch on shoulders
  • 3-block detection range
  • Uses vanilla shoulder riding system
  • Can be spooked off by nearby threats

Flight Patterns:

TypeSpeedPurpose
Short burstsNormalDirect flight to target perch
Gliding0.8xSafe descent to ground
Music flights1.2xFlying toward music sources

Perch Duration:

  • Maximum: 1200 ticks (60 seconds)
  • Random adjustment movements every 40 ticks
  • Leave immediately if threatened

Configuration:

{ "perch": { "search_radius": 32, "prefer_high_perches": true, "min_perch_height": 5, "spook_radius": 8.0, "max_perch_ticks": 1200 } }

Behavior Priorities

The ParrotBehaviorGoal orchestrates behaviors in priority order:

PriorityBehaviorCondition
1 (highest)Shoulder PerchingIf riding a player
2DancingIf music is playing and parrot has arrived
3Flying to MusicIf music detected within range
4PerchingIf currently on a perch
5Flying to PerchSeeking a new perch
6IdleRandom wandering

Integration

Note Block Integration

  • Mixin intercepts note block plays
  • Notifies all parrots within 64 blocks
  • Parrots remember note block location and time
  • Allows dancing to player-created music

Performance

Optimization Strategies

  • Reduced scanning: Music detection only every 60 ticks
  • Early exits: Skip processing if condition not met
  • Cached lookups: Component data cached per tick
  • Spatial indexing: Uses existing SpatialIndex for neighbor queries

Memory Usage

  • Component tags store minimal state
  • No persistent entity references
  • Efficient NBT storage for mimics and perches

Scientific Basis

Mimicry

Based on real-world parrot ability to mimic sounds. African Grey Parrots can learn 100+ words, and alarm calls warn flock members of predators.

Dancing

Based on research into birds responding to music. Cockatoos bob to beats (documented in Snowball the cockatoo), and parrots have an innate sense of rhythm.

Perching

Based on wild parrot behavior, including preference for high perches for predator detection and sleeping in roosting flocks for safety.

Troubleshooting

Parrots Not Dancing

  • Check if jukebox has a disc inserted
  • Verify parrot is within 64 blocks
  • Ensure parrot is not on player’s shoulder
  • Check that music behavior is enabled

Parrots Not Mimicking

  • Verify hostile mobs are nearby for warning mimics
  • Check mimic cooldown (200 ticks between random mimics)
  • Individual parrots have varying accuracy (55-95%)

Parrots Not Perching

  • Check if parrot is tamed for shoulder perching
  • Verify suitable perches exist within 32 blocks
  • Parrots may be spooked by nearby threats

See Also

Last updated on