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

minecraft:behavior.random_look_around_and_sit

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

Overview

minecraft:behavior.random_look_around_and_sit is an entity component: it goes in the components object of a custom mob, or in one of its component groups. Makes the mob sit down and glance around for a while. The mob needs a sitting animation for this to look right.

Fields

FieldTypeDefaultDescription
min_look_timeinteger20Shortest time, in ticks, the mob looks in one direction.
max_look_timeinteger40Longest time, in ticks, the mob looks in one direction.
continue_sitting_on_reloadbooleanfalseIf true, the mob is still sitting after the world reloads.
continue_if_leashedbooleanfalseIf true, the mob keeps sitting even while on a lead.
min_look_countinteger1Fewest different directions the mob looks in.
max_look_countinteger2Most different directions the mob looks in.
random_look_around_cooldowninteger0Seconds before the goal can run again.
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 sitting and 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_and_sit": {
    "min_look_time": 20,
    "max_look_time": 40,
    "continue_sitting_on_reload": false,
    "continue_if_leashed": false,
    "min_look_count": 1,
    "max_look_count": 2,
    "random_look_around_cooldown": 0,
    "min_angle_of_view_horizontal": -180
  }
}

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