Skip to main content

Entity AI goal reference (8/41)

This page carries the AI goal (behavior) pages of MS Learn (MicrosoftDocs/minecraft-creator a9fd1c0, CC BY 4.0). IDs, property names, types, default values and JSON are as in the original. The full list is in the index.

minecraft:behavior.charge_held_item​

(Source: ms-learn, creator/Reference/Content/EntityReference/Examples/EntityGoals/minecraftBehavior_charge_held_item.md)

Allows an entity to charge and use their held item.

Entity Charge Held Item Behavior Properties​

NameDefault ValueTypeDescription
control_flags[]Control Flags choices
itemsNAStringThe list of items that can be used to charge the held item. This list is required and must have at least one item in it. Value must have at least 1 items.
items (as Keyed set of strings)not setKeyed set of strings
priority0Integer numberAs priority approaches 0, the priority is increased. The higher the priority, the sooner this behavior will be executed as a goal.

Control Flags choices​

ValueTitleDescription
jumpJump
lookLook
moveMove

Samples​

minecraft:behavior.circle_around_anchor​

(Source: ms-learn, creator/Reference/Content/EntityReference/Examples/EntityGoals/minecraftBehavior_circle_around_anchor.md)

Causes an entity to circle around an anchor point placed near a point or target.

Entity Circle Around Anchor Behavior Properties​

NameDefault ValueTypeDescriptionExample Values
angle_change15Decimal numberNumber of degrees to change this entity's facing by, when the entity selects its next anchor point.
control_flags[]Control Flags choices
goal_radius0.5Decimal numberMaximum distance from the anchor-point in which this entity considers itself to have reached the anchor point.Phantom: 1
height_above_target_range{"max":0,"min":0}Height Above Target Range itemThe number of blocks above the target that the next anchor point can be set.Phantom: {"min":20,"max":40}
height_adjustment_chance0.0028570001013576984Decimal numberPercent chance to determine how often to increase or decrease the current height around the anchor point.
height_offset_range{"max":0,"min":0}Height Offset Range itemVertical distance from the anchor point this entity must stay within, upon a successful height adjustment.Phantom: {"min":-4,"max":5}
priority0Integer numberAs priority approaches 0, the priority is increased. The higher the priority, the sooner this behavior will be executed as a goal.Phantom: 3
radius_adjustment_chance0.004000000189989805Decimal numberPercent chance to determine how often to increase the size of the current movement radius around the anchor point.
radius_change1Decimal numberThe number of blocks to increase the current movement radius by, upon successful "radius_adjustment_chance".
radius_range{"max":15,"min":5}Radius Range itemHorizontal distance from the anchor point this entity must stay within upon a successful radius adjustment.
speed_multiplier1Decimal numberMultiplies the speed at which this entity travels to its next desired position.

goal_radius​

Maximum distance from the anchor-point in which this entity considers itself to have reached the anchor point. This is to prevent the entity from bouncing back and forth trying to reach a specific spot.

height_above_target_range​

The number of blocks above the target that the next anchor point can be set. This value is used only when the entity is tracking a target. Check that the limits imposed on the range (minimum, maximum and maximum distance between values) are respected.

height_adjustment_chance​

Percent chance to determine how often to increase or decrease the current height around the anchor point. 1 = 100%. "height_change_chance" is deprecated and has been replaced with "height_adjustment_chance".

radius_adjustment_chance​

Percent chance to determine how often to increase the size of the current movement radius around the anchor point. 1 = 100%. "radius_change_chance" is deprecated and has been replaced with "radius_adjustment_chance".

radius_change​

The number of blocks to increase the current movement radius by, upon successful "radius_adjustment_chance". If the current radius increases over the range maximum, the current radius will be set back to the range minimum and the entity will change between clockwise and counter-clockwise movement.

radius_range​

Horizontal distance from the anchor point this entity must stay within upon a successful radius adjustment. Check that the limits imposed on the range (minimum, maximum and maximum distance between values) are respected.

Control Flags choices​

ValueTitleDescription
jumpJump
lookLook
moveMove

Legacy FloatRange​

Legacy FloatRange Properties​

JSON path: height_above_target_range

NameDefault ValueTypeDescription
max0Decimal number
min0Decimal number

Samples​

Phantom​
"minecraft:behavior.circle_around_anchor": {
"goal_radius": 1,
"height_offset_range": {
"min": -4,
"max": 5
},
"height_above_target_range": {
"min": 20,
"max": 40
},
"priority": 3
}

minecraft:behavior.controlled_by_player​

(Source: ms-learn, creator/Reference/Content/EntityReference/Examples/EntityGoals/minecraftBehavior_controlled_by_player.md)

Allows the entity to be controlled by the player using an item in the item_controllable property (required). On every tick, the entity will attempt to rotate towards where the player is facing with the control item whilst simultaneously moving forward.

[!Note] Requires the following components in order to work properly:

  • Movement (minecraft:movement)
  • Rideable (minecraft:rideable)
  • Item Controllable (minecraft:item_controllable)

Entity Controlled By Player Behavior Properties​

NameDefault ValueTypeDescriptionExample Values
control_flags[]Control Flags choices
fractional_rotation0.5Decimal numberThe entity will attempt to rotate to face where the player is facing each tick.
fractional_rotation_limit5Decimal numberLimits the total degrees the entity can rotate to face where the player is facing on each tick.
mount_speed_multiplier1Decimal numberSpeed multiplier of mount when controlled by player.Strider: 1.45
priority0Integer numberAs priority approaches 0, the priority is increased. The higher the priority, the sooner this behavior will be executed as a goal.

fractional_rotation​

The entity will attempt to rotate to face where the player is facing each tick. The entity will target this percentage of their difference in their current facing angles each tick (from 0.0 to 1.0 where 1.0 = 100%). This is limited by "fractional_rotation_limit". A value of 0.0 will result in the entity no longer turning to where the player is facing. Value must be >= 0.5. Value must be <= 1.

Control Flags choices​

ValueTitleDescription
jumpJump
lookLook
moveMove

Samples​

Pig​
"minecraft:behavior.controlled_by_player": {
"priority": 0
}
Strider​
"minecraft:behavior.controlled_by_player": {
"priority": 0,
"mount_speed_multiplier": 1.45
}

minecraft:behavior.croak​

(Source: ms-learn, creator/Reference/Content/EntityReference/Examples/EntityGoals/minecraftBehavior_croak.md)

Allows the entity to croak at a random time interval with configurable conditions.

Entity Croak Behavior Properties​

NameDefault ValueTypeDescriptionExample Values
control_flags[]Control Flags choices
duration{"max":4.5,"min":4.5}Duration itemRandom range in seconds after which the croaking stops. Can also be a constant. Check that the limits imposed on the range (minimum, maximum and maximum distance between values) are respectedFrog: {"min":4.5,"max":4.5}
filters (Filters){"AND":null,"NOT":null,"OR":null,"all":null,"all_of":null,"any":null,"any_of":null,"none_of":null}Filters itemConditions for the behavior to start and keep running. The interval between runs only starts after passing the filters.Frog: {"all_of":[{"test":"in_water","value":false},{"test":"in_lava","value":false}]}
filters (Alternate 1)not setObject
interval{"max":20,"min":10}Interval itemRandom range in seconds between runs of this behavior. Can also be a constant. Check that the limits imposed on the range (minimum, maximum and maximum distance between values) are respectedFrog: {"min":10,"max":20}
priority0Integer numberAs priority approaches 0, the priority is increased. The higher the priority, the sooner this behavior will be executed as a goal.Frog: 9

Control Flags choices​

ValueTitleDescription
jumpJump
lookLook
moveMove

Legacy FloatRange​

Legacy FloatRange Properties​

JSON path: duration

NameDefault ValueTypeDescription
max0Decimal number
min0Decimal number

Filters​

Filters Properties​

JSON path: filters

NameDefault ValueTypeDescription
domainnot setObjectThe domain the test should be performed in.
operatornot setObjectThe comparison to apply with 'value'.
subjectnot setObjectThe subject of this filter test.
testnot setStringThe name of the test to apply.
valuenot setObjectThe value being compared with the test.

Samples​

Frog​
"minecraft:behavior.croak": {
"duration": {
"min": 4.5,
"max": 4.5
},
"filters": {
"all_of": [
{
"test": "in_water",
"value": false
},
{
"test": "in_lava",
"value": false
}
]
},
"interval": {
"min": 10,
"max": 20
},
"priority": 9
}
Sources
idSourceLicenseCommitAccessed
ms-learnMinecraft Creator documentation (Microsoft Learn)CC BY 4.0 (documentation), MIT (code)a9fd1c02026-11-13