1. Wiki
  2. /Entities
  3. /minecraft:behavior.random_look_around

minecraft:behavior.random_look_around

Don't want to write this by hand? GodCraft sets minecraft:behavior.random_look_around for you with a switch.Get GodCraft

Overview

minecraft:behavior.random_look_around is an entity component: it goes in the components object of a custom mob, or in one of its component groups. Makes the mob turn its head and look in random directions when it has nothing else to do. Adds life to idle mobs.

Fields

FieldTypeDefaultDescription
look_timeIntRange{"max":40,"min":20}How long, in seconds, the mob looks one way before turning to another.
min_angle_of_view_horizontalnumber-180Furthest angle to the left the mob can look, measured from where it faces.
max_angle_of_view_horizontalnumber180Furthest angle to the right the mob can look, measured from where it faces.
probabilitynumber0.02Chance that the mob starts looking around.
priorityinteger0Decides which goal wins when several want to run: lower numbers run first.Range: 0 to …
control_flagsGoal's control flags[]noneLists the body parts this goal takes control of (such as move, look or jump), so goals that need the same part don't run together.

Example

Inside the components object of BP/entities/<name>.json (values are the defaults or placeholders):

BP/entities/<name>.json
{
  "minecraft:behavior.random_look_around": {
    "look_time": {
      "max": 40,
      "min": 20
    },
    "min_angle_of_view_horizontal": -180,
    "max_angle_of_view_horizontal": 180,
    "probability": 0.02,
    "priority": 0,
    "control_flags": []
  }
}

We use cookies to improve your experience and analyse site traffic. Learn more