编辑

Entity Documentation - minecraft:behavior.flee_sun

Allows the mob to run away from direct sunlight and seek shade.

Note

This behavior is used by undead mobs like skeletons and zombies that burn in sunlight. The entity will seek shade or water during daytime to avoid sun damage.

Entity Flee Sun Behavior Properties

Name Default Value Type Description Example Values
control_flags [] Control Flags choices
priority 0 Integer number As priority approaches 0, the priority is increased. The higher the priority, the sooner this behavior will be executed as a goal. Bogged: 2, Parched: 3
speed_multiplier 1 Decimal number Movement speed multiplier of the mob when using this AI Goal Bogged: 1

Control Flags choices

Value Title Description
jump Jump
look Look
move Move

Samples

Bogged

"minecraft:behavior.flee_sun": {
  "priority": 2,
  "speed_multiplier": 1
}

Parched

"minecraft:behavior.flee_sun": {
  "priority": 3,
  "speed_multiplier": 1
}