Skip to main content

Entity AI goal reference (33/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.share_items​

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

Allows the mob to give items it has to others.

Entity Share Items Behavior Properties​

NameDefault ValueTypeDescription
control_flags[]Control Flags choices
entity_types[]Array of Entity Types itemsList of entities this mob will share items with
entity_types (Entity Types)not setEntity Types (Entity Types) item
goal_radius0.5Decimal numberDistance in blocks within the mob considers it has reached the goal. This is the "wiggle room" to stop the AI from bouncing back and forth trying to reach a specific spot.
max_dist1Integer numberMaximum distance in blocks this mob will look for entities to share items with
priority0Integer numberAs priority approaches 0, the priority is increased. The higher the priority, the sooner this behavior will be executed as a goal.
speed_multiplier1Decimal numberMovement speed multiplier of the mob when using this AI Goal

Control Flags choices​

ValueTitleDescription
jumpJump
lookLook
moveMove

Entity Types​

List of entities this mob will share items with.

Entity Types Properties​

JSON path: entity_types

NameDefault ValueTypeDescription
cooldown0Decimal numberThe amount of time in seconds that the mob has to wait before selecting a target of the same type again
filtersnot setMinecraft filterConditions that make this entry in the list valid
max_dist16Decimal numberMaximum distance this mob can be away to be a valid choice
must_seefalseBoolean true/falseIf true, the mob has to be visible to be a valid choice
must_see_forget_duration3Decimal numberDetermines the amount of time in seconds that this mob will look for a target before forgetting about it and looking for a new one when the target isn't visible any more
reevaluate_descriptionfalseBoolean true/falseIf true, the mob will stop being targeted if it stops meeting any conditions.
sprint_speed_multiplier1Decimal numberMultiplier for the running speed. A value of 1.0 means the speed is unchanged
walk_speed_multiplier1Decimal numberMultiplier for the walking speed. A value of 1.0 means the speed is unchanged

Entity Types (Entity Types)​

Entity Types Properties​

JSON path: entity_types

NameDefault ValueTypeDescription
check_if_outnumberedfalseBoolean true/falseIf true, the mob will check if its outnumbered
cooldown0Integer numberThe amount of time in seconds that the mob has to wait before selecting a target of the same type again
filters (Filters){"AND":null,"NOT":null,"OR":null,"all":null,"all_of":null,"any":null,"any_of":null,"none_of":null}Filters itemConditions that make this entry in the list valid
filters (Alternate 1)not setObject
max_dist16Decimal numberMaximum distance this mob can be away to be a valid choice
max_flee10Decimal numberMaximum distance this mob can be from the target to stop fleeing
max_height-1Decimal numberMaximum height this mob can be away to be a valid choice
must_seenot setBoolean true/falseIf true, the mob has to be visible to be a valid choice
must_see_forget_duration3Integer numberDetermines the amount of time in seconds that this mob will look for a target before forgetting about it and looking for a new one when the target isn't visible any more
priority0Integer numberPriority for this mob type
reevaluate_descriptionfalseBoolean true/falseIf true, the mob will stop being targeted if it stops meeting any conditions.
sprint_speed_multiplier1Decimal numberMultiplier for the sprinting speed. A value of 1.0 means the speed is unchanged
walk_speed_multiplier1Decimal numberMultiplier for the walking speed. A value of 1.0 means the speed is unchanged
Filters​
Filters Properties​

JSON path: entity_types > 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​

minecraft:behavior.silverfish_merge_with_stone​

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

Allows the mob to go into stone blocks like Silverfish do.

[!Note] Can only be used on the following type of entity:

  • Silverfish (minecraft:silverfish)

Silverfish Merge With Stone Behavior Properties​

NameDefault ValueTypeDescriptionExample Values
prioritynot setInteger numberAs priority approaches 0, the priority is increased. The higher the priority, the sooner this behavior will be executed as a goal.Silverfish: 5

Samples​

Silverfish​
"minecraft:behavior.silverfish_merge_with_stone": {
"priority": 5
}

minecraft:behavior.silverfish_wake_up_friends​

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

Allows the mob to alert mobs in nearby blocks to come out.

[!Note] Can only be used on the following type of entity:

  • Ender Dragon (minecraft:ender_dragon)

Entity Silverfish Wake Up Friends Behavior Properties​

NameDefault ValueTypeDescriptionExample Values
control_flags[]Control Flags choices
priority0Integer numberAs priority approaches 0, the priority is increased. The higher the priority, the sooner this behavior will be executed as a goal.Silverfish: 1

Control Flags choices​

ValueTitleDescription
jumpJump
lookLook
moveMove

Samples​

Silverfish​
"minecraft:behavior.silverfish_wake_up_friends": {
"priority": 1
}

minecraft:behavior.skeleton_horse_trap​

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

Allows Equine mobs to be Horse Traps and be triggered like them, spawning a lightning bolt and a bunch of horses when a player is nearby. Can only be used by Horses, Mules, Donkeys and Skeleton Horses.

[!Note] Can only be used on the following types of entity:

  • Horse (minecraft:horse)
  • Mule (minecraft:mule)
  • Donkey (minecraft:donkey)
  • Skeleton Horse (minecraft:skeleton_horse)

Entity Skeleton Horse Trap Behavior Properties​

NameDefault ValueTypeDescription
control_flags[]Control Flags choices
duration1Decimal numberAmount of time in seconds the trap exists. After this amount of time is elapsed, the trap is removed from the world if it hasn't been activated
priority0Integer numberAs priority approaches 0, the priority is increased. The higher the priority, the sooner this behavior will be executed as a goal.
within_radius0Decimal numberDistance in blocks that the player has to be within to trigger the horse trap.

Control Flags choices​

ValueTitleDescription
jumpJump
lookLook
moveMove

Samples​

minecraft:behavior.sleep​

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

Allows mobs that own a bed to in a village to move to and sleep in it.

[!Note] Can only be used on the following type of entity:

  • Villager (minecraft:villager)

Entity Sleep Behavior Properties​

NameDefault ValueTypeDescription
can_sleep_while_ridingfalseBoolean true/falseIf true, the mob will be able to use the sleep goal if riding something
control_flags[]Control Flags choices
cooldown_time0Decimal numberTime in seconds the mob has to wait before using the goal again
priority0Integer numberAs priority approaches 0, the priority is increased. The higher the priority, the sooner this behavior will be executed as a goal.
sleep_collider_height1Decimal numberThe height of the mob's collider while sleeping
sleep_collider_width1Decimal numberThe width of the mob's collider while sleeping
sleep_y_offset1Decimal numberThe y offset of the mob's collider while sleeping
speed_multiplier1Decimal numberMovement speed multiplier of the mob when using this goal.
timeout_cooldown8Decimal numberThe cooldown time in seconds before the goal can be reused after a internal failure or timeout condition.

Control Flags choices​

ValueTitleDescription
jumpJump
lookLook
moveMove

Samples​

minecraft:behavior.slime_attack​

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

Causes the entity to grow tired every once in a while, while attacking.

[!Note] In order to attack, the entity must have a runtime_identifier set to minecraft:slime and a variant component with a value greater than 1. Otherwise it will still path towards a target, but it will not cause damage.

[!Note] Requires a target in order to work properly. Entities can generate targets via one of the following behaviors:

  • Nearest Attackable Target Behavior (minecraft:behavior.nearest_attackable_target)

  • Hurt By Target Behavior (minecraft:behavior.hurt_by_target) [!Note] Requires the following components in order to work properly:

  • Attack (minecraft:attack)

  • Variant (minecraft:variant)

[!Note] Can only be used on the following types of entity:

  • Slime (minecraft:slime)
  • Magma Cube (minecraft:magma_cube)

Entity Slime Attack Behavior Properties​

NameDefault ValueTypeDescriptionExample Values
control_flags[]Control Flags choices
grow_tired_cooldown_time15Decimal number
priority0Integer numberAs priority approaches 0, the priority is increased. The higher the priority, the sooner this behavior will be executed as a goal.Magma Cube: 3
set_persistentfalseBoolean true/falseAllows the actor to be set to persist upon targeting a player
speed_multiplier1Decimal numberDuring attack behavior, this multiplier modifies the entity's speed when moving toward the target.
x_max_rotation10Decimal numberMaximum rotation (in degrees), on the X-axis, this entity can rotate while trying to look at the target.
y_max_rotation10Decimal numberMaximum rotation (in degrees), on the Y-axis, this entity can rotate while trying to look at the target.

Control Flags choices​

ValueTitleDescription
jumpJump
lookLook
moveMove

Samples​

Magma Cube​
"minecraft:behavior.slime_attack": {
"priority": 3
}

minecraft:behavior.slime_float​

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

Allow slimes to float in water / lava.

[!Note] Can only be used on the following types of entity:

  • Slime (minecraft:slime)
  • Magma Cube (minecraft:magma_cube)

Entity Slime Float Behavior Properties​

NameDefault ValueTypeDescriptionExample Values
control_flags[]Control Flags choices
jump_chance_percentage0.800000011920929Decimal numberPercent chance a slime or magma cube has to jump while in water / lava.
priority0Integer numberAs priority approaches 0, the priority is increased. The higher the priority, the sooner this behavior will be executed as a goal.Magma Cube: 1
speed_multiplier1.2000000476837158Decimal numberDetermines the multiplier the entity's speed is modified by when moving through water / lava.

Control Flags choices​

ValueTitleDescription
jumpJump
lookLook
moveMove

Samples​

Magma Cube​
"minecraft:behavior.slime_float": {
"priority": 1
}

minecraft:behavior.slime_keep_on_jumping​

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

Allows the entity to continuously jump around like a slime.

[!Note] Can only be used on the following types of entity:

  • Slime (minecraft:slime)
  • Magma Cube (minecraft:magma_cube)

Entity Slime Keep On Jumping Behavior Properties​

NameDefault ValueTypeDescriptionExample Values
control_flags[]Control Flags choices
priority0Integer numberAs priority approaches 0, the priority is increased. The higher the priority, the sooner this behavior will be executed as a goal.Magma Cube: 5
speed_multiplier1Decimal numberDetermines the multiplier this entity's speed is modified by when jumping around.

Control Flags choices​

ValueTitleDescription
jumpJump
lookLook
moveMove

Samples​

Magma Cube​
"minecraft:behavior.slime_keep_on_jumping": {
"priority": 5
}

minecraft:behavior.slime_random_direction​

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

Allows the entity to move in random directions like a slime.

[!Note] Can only be used on the following types of entity:

  • Slime (minecraft:slime)
  • Magma Cube (minecraft:magma_cube)

Entity Slime Random Direction Behavior Properties​

NameDefault ValueTypeDescriptionExample Values
add_random_time_range3Integer numberAdditional time (in whole seconds), chosen randomly in the range of [0, "add_random_time_range"], to add to "min_change_direction_time".
control_flags[]Control Flags choices
min_change_direction_time2Decimal numberConstant minimum time (in seconds) to wait before choosing a new direction.
priority0Integer numberAs priority approaches 0, the priority is increased. The higher the priority, the sooner this behavior will be executed as a goal.Magma Cube: 4
turn_range360Integer numberMaximum rotation angle range (in degrees) when randomly choosing a new direction.

Control Flags choices​

ValueTitleDescription
jumpJump
lookLook
moveMove

Samples​

Magma Cube​
"minecraft:behavior.slime_random_direction": {
"priority": 4
}

minecraft:behavior.snacking​

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

Allows the mob to take a load off and snack on food that it found nearby.

Entity Snacking Behavior Properties​

NameDefault ValueTypeDescription
control_flags[]Control Flags choices
items[]StringItems that we are interested in snacking on
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.
snacking_cooldown7.5Decimal numberThe cooldown time in seconds before the mob is able to snack again
snacking_cooldown_min0.5Decimal numberThe minimum time in seconds before the mob is able to snack again
snacking_stop_chance0.0016666667070239782Decimal numberThis is the chance that the mob will stop snacking, from 0 to 1

Control Flags choices​

ValueTitleDescription
jumpJump
lookLook
moveMove

minecraft:behavior.sneeze​

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

Allows the mob to sneeze, causing it to drop items and affect nearby mobs.

Entity Sneeze Behavior Properties​

NameDefault ValueTypeDescription
control_flags[]Control Flags choices
cooldown_time0Decimal numberTime in seconds the mob has to wait before using the goal again
drop_item_chance1Decimal numberThe probability that the mob will drop an item when it sneezes.
entity_types[]Array of Entity Types itemsList of entity types this mob will startle (cause to jump) when it sneezes.
entity_types (Entity Types)not setEntity Types (Entity Types) item
loot_tableStringLoot table to select dropped items from.
prepare_soundStringSound to play when the sneeze is about to happen.
prepare_time1Decimal numberThe time in seconds that the mob takes to prepare to sneeze (while the prepare_sound is playing).
priority0Integer numberAs priority approaches 0, the priority is increased. The higher the priority, the sooner this behavior will be executed as a goal.
probability0.019999999552965164Decimal numberThe probability of sneezing. A value of 1.00 is 100%
soundStringSound to play when the sneeze occurs.
within_radius0Decimal numberDistance in blocks that mobs will be startled.

Control Flags choices​

ValueTitleDescription
jumpJump
lookLook
moveMove

Entity Types​

List of entity types this mob will startle (cause to jump) when it sneezes.

Entity Types Properties​

JSON path: entity_types

NameDefault ValueTypeDescription
cooldown0Decimal numberThe amount of time in seconds that the mob has to wait before selecting a target of the same type again
filtersnot setMinecraft filterConditions that make this entry in the list valid
max_dist16Decimal numberMaximum distance this mob can be away to be a valid choice
must_seefalseBoolean true/falseIf true, the mob has to be visible to be a valid choice
must_see_forget_duration3Decimal numberDetermines the amount of time in seconds that this mob will look for a target before forgetting about it and looking for a new one when the target isn't visible any more
reevaluate_descriptionfalseBoolean true/falseIf true, the mob will stop being targeted if it stops meeting any conditions.
sprint_speed_multiplier1Decimal numberMultiplier for the running speed. A value of 1.0 means the speed is unchanged
walk_speed_multiplier1Decimal numberMultiplier for the walking speed. A value of 1.0 means the speed is unchanged

Entity Types (Entity Types)​

Entity Types Properties​

JSON path: entity_types

NameDefault ValueTypeDescription
check_if_outnumberedfalseBoolean true/falseIf true, the mob will check if its outnumbered
cooldown0Integer numberThe amount of time in seconds that the mob has to wait before selecting a target of the same type again
filters (Filters){"AND":null,"NOT":null,"OR":null,"all":null,"all_of":null,"any":null,"any_of":null,"none_of":null}Filters itemConditions that make this entry in the list valid
filters (Alternate 1)not setObject
max_dist16Decimal numberMaximum distance this mob can be away to be a valid choice
max_flee10Decimal numberMaximum distance this mob can be from the target to stop fleeing
max_height-1Decimal numberMaximum height this mob can be away to be a valid choice
must_seenot setBoolean true/falseIf true, the mob has to be visible to be a valid choice
must_see_forget_duration3Integer numberDetermines the amount of time in seconds that this mob will look for a target before forgetting about it and looking for a new one when the target isn't visible any more
priority0Integer numberPriority for this mob type
reevaluate_descriptionfalseBoolean true/falseIf true, the mob will stop being targeted if it stops meeting any conditions.
sprint_speed_multiplier1Decimal numberMultiplier for the sprinting speed. A value of 1.0 means the speed is unchanged
walk_speed_multiplier1Decimal numberMultiplier for the walking speed. A value of 1.0 means the speed is unchanged
Filters​
Filters Properties​

JSON path: entity_types > 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​

Sources
idSourceLicenseCommitAccessed
ms-learnMinecraft Creator documentation (Microsoft Learn)CC BY 4.0 (documentation), MIT (code)a9fd1c02026-11-13