Skip to content

Actors - Components Module

anvil.api.actors.components

EntityAIAdmireItem

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(admire_item_sound=None, sound_interval=0.0, *control_flags)

Enables the mob to admire items that have been configured as admirable.

Parameters:

Name Type Description Default
admire_item_sound str

The sound event to play when admiring the item. Defaults to None.

None
sound_interval Seconds | tuple[Seconds, Seconds]

The range of time in seconds to randomly wait before playing the sound again. Can be a number, an array [min, max], or an object with range_min and range_max. Defaults to 0.0.

0.0
Note

Requires minecraft:admire_item in order to work properly.

Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_admire_item

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIAquaticChargeAttack

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(attack_reach=0.05000000074505806, charge_cooldown_time=(2.0, 6.0), charge_overshoot_distance=1.5, charge_speed=0.05999999865889549, knockback_force=2.0, max_charge_distance=16.0, *control_flags)

Enables an aquatic mob to dash at its target with knockback; includes overshoot and cooldown settings.

Parameters:

Name Type Description Default
attack_reach float

Horizontal reach grown around the mob's AABB to register a hit. Defaults to 0.05000000074505806.

0.05000000074505806
charge_cooldown_time tuple[Seconds, Seconds]

Range of time in seconds to wait before starting another charge. Check that the limits imposed on the range (minimum, maximum and maximum distance between values) are respected. Defaults to (2.0, 6.0).

(2.0, 6.0)
charge_overshoot_distance float

Distance beyond the target the mob aims during a charge. Defaults to 1.5.

1.5
charge_speed float

Absolute speed used during the charge attack. Value must be >= 0.05000000074505806. Defaults to 0.05999999865889549.

0.05999999865889549
knockback_force float

Knockback force applied to the target on hit. Defaults to 2.0.

2.0
max_charge_distance float

Maximum distance at which the mob attempts a charge. Defaults to 16.0.

16.0
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_aquatic_charge_attack

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIAvoidBlock

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(tick_interval=1, search_range=0, search_height=0, walk_speed_modifier=1.0, sprint_speed_modifier=1.0, avoid_block_sound=None, sound_interval=None, target_selection_method='nearest', target_blocks=[])

Allows this entity to avoid certain blocks.

Parameters:

Name Type Description Default
tick_interval int

Should start tick interval. Defaults to 1.

1
search_range int

Maximum distance to look for a block in xz. Defaults to 0.

0
search_height int

Maximum distance to look for a block in y. Defaults to 0.

0
walk_speed_modifier float

Modifier for walking speed. 1.0 means keep the regular speed, while higher numbers make the walking speed faster. Defaults to 1.0.

1.0
sprint_speed_modifier float

Modifier for sprint speed. 1.0 means keep the regular speed, while higher numbers make the sprint speed faster. Defaults to 1.0.

1.0
avoid_block_sound str

The sound event to play when the mob is avoiding a block. Defaults to None.

None
sound_interval list[float]

The range of time in seconds to randomly wait before playing the sound again. Defaults to None.

None
target_selection_method Literal[nearest]

Block search method. Defaults to 'nearest'.

'nearest'
target_blocks list[MinecraftBlockDescriptor]

List of block types this mob avoids. Defaults to [].

[]
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_avoid_block

__iter__()

Iterates over the component's fields.

on_escape(event, target=FilterSubject.Self)

Add an escape event to be triggered when the mob escapes the avoided block.

Parameters:

Name Type Description Default
event str

The event name to trigger.

required
target FilterSubject

The event target. Defaults to FilterSubject.Self.

Self

Returns:

Name Type Description
self

for chaining.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIAvoidMobType

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(avoid_mob_sound=None, avoid_target_xz=16, avoid_target_y=7, ignore_visibility=False, probability_per_strength=1.0, remove_target=False, sound_interval=[3.0, 8.0], check_if_outnumbered=False, cooldown=0.0)

Allows the entity to run away from other entities that meet the criteria specified.

Parameters:

Name Type Description Default
avoid_mob_sound str

The sound event to play when the mob is avoiding another mob. Defaults to None.

None
avoid_target_xz int

The next target position the entity chooses to avoid another entity will be chosen within this XZ Distance. Defaults to 16.

16
avoid_target_y int

The next target position the entity chooses to avoid another entity will be chosen within this Y Distance. Defaults to 7.

7
ignore_visibility bool

Whether or not to ignore direct line of sight while this entity is running away from other specified entities. Defaults to False.

False
probability_per_strength float

Percent chance this entity will stop avoiding another entity based on that entity's strength, where 1.0 = 100%. Value must be <= 1. Defaults to 1.0.

1.0
remove_target bool

Determine if we should remove target when fleeing or not. Defaults to False.

False
sound_interval list[float]

The range of time in seconds to randomly wait before playing the sound again. Defaults to [3.0, 8.0].

[3.0, 8.0]
check_if_outnumbered bool

If true, the mob will check if its outnumbered. Defaults to False.

False
cooldown float

The amount of time in seconds that the mob has to wait before selecting a target of the same type again. Defaults to 0.0.

0.0
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_avoid_mob_type

__iter__()

Iterates over the component's fields.

add_type(filter, max_dist=3.0, max_flee=10.0, sprint_speed_multiplier=1.0, walk_speed_multiplier=1.0)

Adds a new entity type to the list of conditions another entity must meet to be a valid target to avoid.

Parameters:

Name Type Description Default
filter Filter

Filter to determine which entities to avoid.

required
max_dist float

Maximum distance to look for an avoid target for the entity. Defaults to 3.0.

3.0
max_flee float

How many blocks away from its avoid target the entity must be for it to stop fleeing from the avoid target. Defaults to 10.0.

10.0
sprint_speed_multiplier float

Multiplier for sprint speed. 1.0 means keep the regular speed, while higher numbers make the sprint speed faster. Defaults to 1.0.

1.0
walk_speed_multiplier float

Multiplier for walking speed. 1.0 means keep the regular speed, while higher numbers make the walking speed faster. Defaults to 1.0.

1.0

on_escape_event(event, target=FilterSubject.Self)

Event that is triggered when escaping from a mob.

Parameters:

Name Type Description Default
event str

Event to trigger.

required
target FilterSubject

Target of the event. Defaults to FilterSubject.Self.

Self

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIBarter

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(*control_flags)

Enables the mob to barter for items that have been configured as barter currency. Must be used in combination with the barter component.

This component has no configurable constructor properties beyond optional control flags.

Note

Requires minecraft:barter and a barter table in order to work properly.

Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_barter

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIBeg

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(items, look_distance=8.0, look_time=None)

Allows this mob to look at and follow the player that holds food they like.

Parameters:

Name Type Description Default
items list[MinecraftItemDescriptor | Identifier]

List of items that this mob likes.

required
look_distance float

Distance in blocks the mob will beg from. Defaults to 8.0.

8.0
look_time int | tuple[int, int]

The range of time in seconds this mob will stare at the player holding a food they like, begging for it. Defaults to None.

None
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_beg

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIBreakDoor

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

Allows this mob to break doors.

This component has no configurable constructor properties.

Note

Learn notes that vanilla Bedrock currently prefers can_break_doors on the navigation component for this capability.

Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_break_door

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIBreed

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(speed_multiplier=1.0)

Allows this mob to breed with other mobs.

Parameters:

Name Type Description Default
speed_multiplier float

Movement speed multiplier applied to the mob when using this AI Goal. Defaults to 1.0.

1.0
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_breed

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAICelebrate

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(celebration_sound='celebrate', duration=30.0, jump_interval=(1.0, 3.5), sound_interval=(2.0, 7.0), *control_flags)

Allows this entity to celebrate surviving a raid by making celebration sounds and jumping.

Parameters:

Name Type Description Default
celebration_sound str

The sound event to trigger during the celebration. Defaults to "celebrate".

'celebrate'
duration Seconds

The duration in seconds that the celebration lasts for. Defaults to 30.0.

30.0
jump_interval tuple[Seconds, Seconds]

Minimum and maximum time between jumping (positive, in seconds). Check that the limits imposed on the range (minimum, maximum and maximum distance between values) are respected. Defaults to (1.0, 3.5).

(1.0, 3.5)
sound_interval tuple[Seconds, Seconds]

Minimum and maximum time between sound events (positive, in seconds). Check that the limits imposed on the range (minimum, maximum and maximum distance between values) are respected. Defaults to (2.0, 7.0).

(2.0, 7.0)
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_celebrate

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAICelebrateSurvive

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(duration=30.0, fireworks_interval=(10.0, 20.0), *control_flags)

Allows the player to trade with this mob. When the goal starts, it will stop the mob's navigation.

Parameters:

Name Type Description Default
duration Seconds

The duration in seconds that the celebration lasts for. Defaults to 30.0.

30.0
fireworks_interval tuple[Seconds, Seconds]

Minimum and maximum time between firework (positive, in seconds). Defaults to (10.0, 20.0).

(10.0, 20.0)
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_celebrate_survive

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIChargeAttack

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(max_distance=3, min_distance=2, success_rate=0.1428, speed_multiplier=1.0)

Allows this entity to damage a target by using a running attack.

Parameters:

Name Type Description Default
max_distance int

A charge attack cannot start if the entity is farther than this distance to the target. Defaults to 3.

3
min_distance int

A charge attack cannot start if the entity is closer than this distance to the target. Defaults to 2.

2
success_rate float

Percent chance this entity will start a charge attack, if not already attacking (1.0 = 100%). Defaults to 0.1428.

0.1428
speed_multiplier float

Modifies the entity's speed when charging toward the target. Defaults to 1.0.

1.0
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_charge_attack

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIChargeHeldItem

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(*items)

Allows an entity to charge and use their held item.

Parameters:

Name Type Description Default
*items str

The list of items that can be used to charge the held item. At least one item is required.

()
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_charge_held_item

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAICircleAroundAnchor

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(angle_change=15.0, goal_radius=0.5, height_above_target_range=None, height_adjustment_chance=0.002857, height_offset_range=None, radius_adjustment_chance=0.004, radius_change=1.0, radius_range=None, speed_multiplier=1.0)

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

Parameters:

Name Type Description Default
angle_change float

Number of degrees to change this entity's facing by, when the entity selects its next anchor point. Defaults to 15.0.

15.0
goal_radius float

Maximum distance from the anchor-point in which this entity considers itself to have reached the anchor point. Defaults to 0.5.

0.5
height_above_target_range tuple[int, int]

The number of blocks above the target that the next anchor point can be set. Defaults to None.

None
height_adjustment_chance float

Percent chance to determine how often to increase or decrease the current height around the anchor point. Defaults to 0.002857.

0.002857
height_offset_range tuple[int, int]

Vertical distance from the anchor point this entity must stay within, upon a successful height adjustment. Defaults to None.

None
radius_adjustment_chance float

Percent chance to determine how often to increase the size of the current movement radius around the anchor point. Defaults to 0.004.

0.004
radius_change float

The number of blocks to increase the current movement radius by, upon successful "radius_adjustment_chance". Defaults to 1.0.

1.0
radius_range tuple[int, int]

Horizontal distance from the anchor point this entity must stay within upon a successful radius adjustment. Defaults to None.

None
speed_multiplier float

Multiplies the speed at which this entity travels to its next desired position. Defaults to 1.0.

1.0
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_circle_around_anchor

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIControlledByPlayer

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(fractional_rotation=0.5, fractional_rotation_limit=5.0, mount_speed_multiplier=1.0, *control_flags)

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.

Parameters:

Name Type Description Default
fractional_rotation float

The entity will attempt to rotate to face where the player is facing each tick. Defaults to 0.5.

0.5
fractional_rotation_limit float

Limits the total degrees the entity can rotate to face where the player is facing on each tick. Defaults to 5.0.

5.0
mount_speed_multiplier float

Speed multiplier of mount when controlled by player. Defaults to 1.0.

1.0
Note

Requires minecraft:rideable and minecraft:item_controllable, and also expects an entity movement component to be present.

Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_controlled_by_player

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAICroak

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(duration=None, filters=None, interval=None)

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

Parameters:

Name Type Description Default
duration Seconds | tuple[Seconds, Seconds]

Random range in seconds after which the croaking stops. Can also be a constant. Defaults to None.

None
filters Filter

Conditions for the behavior to start and keep running. The interval between runs only starts after passing the filters. Defaults to None.

None
interval Seconds | tuple[Seconds, Seconds]

Random range in seconds between runs of this behavior. Can also be a constant. Defaults to None.

None
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_croak

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIDefendTrustedTarget

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(aggro_sound=None, attack_interval=0, must_see=False, must_see_forget_duration=3.0, sound_chance=None, within_radius=0.0)

Allows the mob to target another mob that hurts an entity it trusts.

Parameters:

Name Type Description Default
aggro_sound str

Sound to occasionally play while defending. Defaults to None.

None
attack_interval int

Time in seconds between attacks. Defaults to 0.

0
must_see bool

If true, the mob has to be visible to be a valid choice. Defaults to False.

False
must_see_forget_duration Seconds

Determines 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. Defaults to 3.0.

3.0
sound_chance float

Chance that the aggro sound will play while defending. Defaults to None.

None
within_radius float

Distance in blocks that the target can be within to launch an attack. Defaults to 0.0.

0.0
Note

Requires a trusted relationship in order to work properly.

Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_defend_trusted_target

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIDefendVillageTarget

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(attack_chance=0.05000000074505806, attack_owner=False, must_reach=False, must_see=False, must_see_forget_duration=3.0, persist_time=0.0, within_radius=0.0, *control_flags)

Allows the entity to stay in a village and defend the village from aggressors. If a player is in bad standing with the village this goal will cause the entity to attack the player regardless of filter conditions.

Parameters:

Name Type Description Default
attack_chance float

The percentage chance that the entity has to attack aggressors of its village, where 1.0 = 100%. Value must be <= 1. Defaults to 0.05000000074505806.

0.05000000074505806
attack_owner bool

If true, this entity can attack its owner. Defaults to False.

False
must_reach bool

If true, this entity requires a path to the target. Defaults to False.

False
must_see bool

If true, the mob has to be visible to be a valid choice. Defaults to False.

False
must_see_forget_duration Seconds

Determines 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. Defaults to 3.0.

3.0
persist_time Seconds

Time (in seconds) this entity can continue attacking the target after the target is no longer valid. Defaults to 0.0.

0.0
within_radius float

Maximum distance this entity can be from the target when following it, otherwise the target becomes invalid. This value is only used if the entity doesn't declare "minecraft:follow_range". Defaults to 0.0.

0.0
Note

This behavior is typically used with the minecraft:dweller component.

Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_defend_village_target

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIDelayedAttack

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(attack_duration=0.75, attack_once=False, cooldown_time=1, hit_delay_pct=0.5, inner_boundary_time_increase=0.25, max_path_time=0.55, melee_fov=90, min_path_time=0.2, outer_boundary_time_increase=0.5, path_fail_time_increase=0.75, path_inner_boundary=16, path_outer_boundary=32, random_stop_interval=0, reach_multiplier=2, require_complete_path=False, speed_multiplier=1, track_target=False, x_max_rotation=30, y_max_head_rotation=30, can_spread_on_fire=False)

Allows an entity to attack, while also delaying the damage-dealt until a specific time in the attack animation.

Parameters:

Name Type Description Default
attack_duration float

The entity's attack animation will play out over this duration (in seconds). Also controls attack cooldown. Defaults to 0.75.

0.75
attack_once bool

Allows the mob to perform this melee attack behavior only once during its lifetime. Defaults to False.

False
cooldown_time int

Description. Defaults to 1.

1
hit_delay_pct float

The percentage into the attack animation to apply the damage of the attack (1.0 = 100%). Value must be <= 1. Defaults to 0.5.

0.5
inner_boundary_time_increase float

Time, in seconds, added to the attack path recalculation interval when the target is beyond "path_inner_boundary". Defaults to 0.25.

0.25
max_path_time float

Maximum base time, in seconds, before recalculating a new attack path to the target (before increases are applied). Defaults to 0.55.

0.55
melee_fov int

Field of view, in degrees, used by the hard-coded sensing component to detect a valid attack target. Defaults to 90.

90
min_path_time float

Minimum base time, in seconds, before recalculating a new attack path to the target (before increases are applied). Defaults to 0.2.

0.2
outer_boundary_time_increase float

Time, in seconds, added to the attack path recalculation interval when the target is beyond "path_outer_boundary". Defaults to 0.5.

0.5
path_fail_time_increase float

Time, in seconds, added to the attack path recalculation interval when the mob cannot move along the current path. Defaults to 0.75.

0.75
path_inner_boundary int

Distance at which to increase attack path recalculation by "inner_boundary_time_increase". Defaults to 16.

16
path_outer_boundary int

Distance at which to increase attack path recalculation by "outer_boundary_time_increase". Defaults to 32.

32
random_stop_interval int

Defines a 1-in-N chance for the mob to stop its current attack, where N equals "random_stop_interval". Defaults to 0.

0
reach_multiplier int

Used with the base size of the entity to determine minimum target-distance before trying to deal attack damage. Defaults to 2.

2
require_complete_path bool

Specifies whether a full navigation path from the mob to the target is required. Defaults to False.

False
speed_multiplier float

Multiplier applied to the mob's movement speed when moving toward its target. Defaults to 1.

1
track_target bool

Allows the mob to track its target even if it lacks a hard-coded sensing component. Defaults to False.

False
x_max_rotation int

Maximum rotation, in degrees, on the X-axis while the mob is trying to look at its target. Defaults to 30.

30
y_max_head_rotation int

Maximum rotation, in degrees, on the Y-axis while the mob is trying to look at its target. Defaults to 30.

30
can_spread_on_fire bool

Allows the mob, if on fire and empty handed, to ignite its target upon a successful attack. Defaults to False.

False
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_delayed_attack

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIDig

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(duration=0, idle_time=0, allow_dig_when_named=False, digs_in_daylight=False, suspicion_is_disturbance=False, vibration_is_disturbance=False)

Allows this entity to dig into the ground before despawning.

Parameters:

Name Type Description Default
duration Seconds

Goal duration in seconds. Defaults to 0.

0
idle_time Seconds

The minimum idle time in seconds between the last detected disturbance to the start of digging. Defaults to 0.

0
allow_dig_when_named bool

If true, this behavior can run when this entity is named. Otherwise not. Defaults to False.

False
digs_in_daylight bool

Indicates that the actor should start digging when it sees daylight. Defaults to False.

False
suspicion_is_disturbance bool

If true, finding new suspicious locations count as disturbances that may delay the start of this goal. Defaults to False.

False
vibration_is_disturbance bool

If true, vibrations count as disturbances that may delay the start of this goal. Defaults to False.

False
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_dig

__iter__()

Iterates over the component's fields.

on_start(event, target=FilterSubject.Self)

Sets an event to run when the dig goal starts.

Parameters:

Name Type Description Default
event str

The event name to trigger.

required
target FilterSubject

The event target. Defaults to FilterSubject.Self.

Self

Returns:

Name Type Description
self

for chaining.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIDoorInteract

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

Allows the mob to open and close doors.

This component has no configurable constructor properties.

Note

Learn notes that this behavior is not currently used by vanilla Bedrock entities.

Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_door_interact

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIDrinkMilk

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(cooldown_seconds=5, filters=None)

Allows the mob to drink milk based on specified environment conditions.

Parameters:

Name Type Description Default
cooldown_seconds Seconds

Time (in seconds) that the goal is on cooldown before it can be used again. Defaults to 5.

5
filters Filter

Conditions that need to be met for the behavior to start. Defaults to None.

None
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_drink_milk

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIDrinkPotion

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(speed_modifier=0.0)

Allows the mob to drink potions based on specified environment conditions.

Parameters:

Name Type Description Default
speed_modifier float

The movement speed modifier to apply to the entity while it is drinking a potion. A value of 0 represents no change in speed. Defaults to 0.0.

0.0
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_drink_potion

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIDropItemFor

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(loot_table, cooldown=0.25, drop_item_chance=1.0, goal_radius=0.5, max_head_look_at_height=10.0, minimum_teleport_distance=2.0, offering_distance=1.0, search_count=0, search_height=1, search_range=0, seconds_before_pickup=0.0, speed_multiplier=1.0, target_range=(1, 1, 1), teleport_offset=(0, 1, 0), time_of_day_range=(0.0, 1.0), *control_flags)

Allows the entity to move toward a target, and drop an item near the target.

Parameters:

Name Type Description Default
loot_table LootTable | str

The loot table that contains the possible loot the entity can drop with this goal.

required
cooldown Seconds

The amount of time in seconds that the mob has to wait before selecting a target of the same type again. Defaults to 0.25.

0.25
drop_item_chance float

The percent chance the entity will drop an item when using this goal. Value must be <= 1. Defaults to 1.0.

1.0
goal_radius float

Distance 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. Value must be > 0. Defaults to 0.5.

0.5
max_head_look_at_height float

The maximum height the entities head will look at when dropping the item. The entity will always be looking at its target. Defaults to 10.0.

10.0
minimum_teleport_distance float

If the target position is farther away than this distance on any tick, the entity will teleport to the target position. Defaults to 2.0.

2.0
offering_distance float

The preferred distance the entity tries to be from the target it is dropping an item for. Defaults to 1.0.

1.0
search_count int

The number of randomly selected blocks each tick that the mob will check within its search range and height for a valid block to move to. Defaults to 0.

0
search_height int

The height in blocks the entity will search within to find a valid target position. Value must be > 0. Defaults to 1.

1
search_range int

The distance in blocks the entity will search within to find a valid target position. Value must be > 0. Defaults to 0.

0
seconds_before_pickup Seconds

The numbers of seconds that will pass before the dropped entity can be picked up from the ground. Defaults to 0.0.

0.0
speed_multiplier float

Movement speed multiplier of the mob when using this goal. Defaults to 1.0.

1.0
target_range tuple[float, float, float]

The range in blocks within which the entity searches to find a target to drop an item for. Defaults to (1, 1, 1).

(1, 1, 1)
teleport_offset tuple[float, float, float]

When the entity teleports, offset the teleport position by this many blocks in the X, Y, and Z coordinate. Defaults to (0, 1, 0).

(0, 1, 0)
time_of_day_range tuple[float, float]

The valid times of day that this goal can be used. For reference: noon is 0.0, sunset is 0.25, midnight is 0.5, and sunrise is 0.75, and back to noon for 1.0. Defaults to (0.0, 1.0).

(0.0, 1.0)
Note

Requires a minecraft:navigation component in order to work properly.

Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_drop_item_for

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIEatBlock

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(success_chance=0.02, time_until_eat=1.8)

Allows the entity to consume a block, replace the eaten block with another block, and trigger an event as a result.

Parameters:

Name Type Description Default
success_chance Molang | str | float

A molang expression defining the success chance the entity has to consume a block. Defaults to 0.02.

0.02
time_until_eat Seconds

The amount of time (in seconds) it takes for the block to be eaten upon a successful eat attempt. Defaults to 1.8.

1.8
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_eat_block

__iter__()

Iterates over the component's fields.

add_block_pair(eat_block, replace_block)

Adds an eat-and-replace block pair for the behavior.

Parameters:

Name Type Description Default
eat_block MinecraftBlockDescriptor | Identifier

Block identifier the entity should consume.

required
replace_block MinecraftBlockDescriptor | Identifier

Block identifier that should replace the eaten block.

required

Returns:

Name Type Description
self

Returns the current instance for method chaining.

on_eat(event, target=FilterSubject.Self)

Sets the event triggered when the eating animation completes.

Parameters:

Name Type Description Default
event str

Event to trigger when the block is eaten.

required
target FilterSubject

Event target. Defaults to FilterSubject.Self.

Self

Returns:

Name Type Description
self

Returns the current instance for method chaining.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIEatCarriedItem

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(delay_before_eating=0.0, *control_flags)

If the mob is carrying a food item, the mob will eat it and the effects will be applied to the mob.

Parameters:

Name Type Description Default
delay_before_eating Seconds

Time in seconds the mob should wait before eating the item. Defaults to 0.0.

0.0
Note

Requires food items to be present in the entity's inventory.

Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_eat_carried_item

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIEatMob

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(eat_animation_time=1.0, eat_mob_sound=None, loot_table=None, pull_in_force=1.0, reach_mob_distance=1.0, run_speed=1.0, *control_flags)

Allows the entity to eat a specified Mob.

Parameters:

Name Type Description Default
eat_animation_time Seconds

Sets the time in seconds the eat animation should play for. Defaults to 1.0.

1.0
eat_mob_sound str

Sets the sound that should play when eating a mob. Defaults to None.

None
loot_table LootTable | str

The loot table for loot to be dropped when eating a mob. Defaults to None.

None
pull_in_force float

Sets the force which the mob-to-be-eaten is pulled towards the eating mob. Defaults to 1.0.

1.0
reach_mob_distance float

Sets the desired distance to be reached before eating the mob. Defaults to 1.0.

1.0
run_speed float

Sets the entity's speed when running toward the target. Defaults to 1.0.

1.0
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_eat_mob

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIEmerge

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(cooldown_time=0.5, duration=5.0)

Allows this entity to emerge from the ground.

Parameters:

Name Type Description Default
cooldown_time Seconds

Time in seconds the mob has to wait before using the goal again. Defaults to 0.5.

0.5
duration Seconds

Goal duration in seconds. Defaults to 5.0.

5.0
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_emerge

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIEndermanLeaveBlock

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

Allows the enderman to drop a block they are carrying.

Note

Can only be used by Endermen.

Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_enderman_leave_block

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIEndermanTakeBlock

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

Allows the enderman to take a block and carry it around.

Note

Can only be used by Endermen.

Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_enderman_take_block

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIEquipItem

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

The entity puts on the desired equipment.

Parameters:

Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_equip_item

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIExploreOutskirts

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(dist_from_boundary=(5, 0, 5), explore_dist=5.0, max_travel_time=60.0, max_wait_time=0.0, min_dist_from_target=2.2, min_perimeter=1.0, min_wait_time=3.0, next_xz=5, next_y=3, speed_multiplier=1.0, timer_ratio=2.0)

Allows the entity to first travel to a random point on the outskirts of the village, and then explore random points within a small distance.

Parameters:

Name Type Description Default
dist_from_boundary Coordinates

The distance from the boundary the villager must be within in to explore the outskirts. Defaults to (5, 0, 5).

(5, 0, 5)
explore_dist float

Total distance in blocks the the entity will explore beyond the village bounds when choosing its travel point. Defaults to 5.0.

5.0
max_travel_time float

This is the maximum amount of time an entity will attempt to reach it's travel point on the outskirts of the village before the goal exits. Defaults to 60.0.

60.0
max_wait_time float

The wait time in seconds between choosing new explore points will be chosen on a random interval between this value and the minimum wait time. Defaults to 0.0.

0.0
min_dist_from_target float

The entity must be within this distance for it to consider it has successfully reached its target. Defaults to 2.2.

2.2
min_perimeter float

The minimum perimeter of the village required to run this goal. Defaults to 1.0.

1.0
min_wait_time float

The wait time in seconds between choosing new explore points will be chosen on a random interval between this value and the maximum wait time. Defaults to 3.0.

3.0
next_xz int

A new explore point will randomly be chosen within this XZ distance of the current target position when navigation has finished and the wait timer has elapsed. Defaults to 5.

5
next_y int

A new explore point will randomly be chosen within this Y distance of the current target position when navigation has finished and the wait timer has elapsed. Defaults to 3.

3
speed_multiplier float

The multiplier for speed while using this goal. 1.0 maintains the speed. Defaults to 1.0.

1.0
timer_ratio float

Each new explore point will be chosen on a random interval between the minimum and the maximum wait time, divided by this value. Defaults to 2.0.

2.0
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_explore_outskirts

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIFertilizeFarmBlock

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(goal_radius=1.5, max_fertilizer_usage=1, search_cooldown_max_seconds=8.0, search_count=9, search_height=1, search_range=1, speed_multiplier=0.5)

Allows the mob to search within an area for a growable crop block. If found, the mob will use any available fertilizer in their inventory on the crop. This goal will not execute if the mob does not have a fertilizer item in its inventory.

Parameters:

Name Type Description Default
goal_radius float

Distance in blocks within the mob considers it has reached it's target position. Value must be > 0. Defaults to 1.5.

1.5
max_fertilizer_usage int

The maximum number of times the mob will use fertilzer on the target block. Value must be > 0. Defaults to 1.

1
search_cooldown_max_seconds float

The maximum amount of time in seconds that the goal can take before searching again. The time is chosen between 0 and this number. Value must be > 0. Defaults to 8.0.

8.0
search_count int

The number of randomly selected blocks each tick that the mob will check within its search range and height for a valid block to move to. Defaults to 9.

9
search_height int

The height in blocks the mob will search within to find a valid target position. Value must be > 0. Defaults to 1.

1
search_range int

The distance in blocks the mob will search within to find a valid target position. Value must be > 0. Defaults to 1.

1
speed_multiplier float

Movement speed multiplier of the mob when using this goal. Defaults to 0.5.

0.5
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_fertilize_farm_block

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIFindCover

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(cooldown_time=0.0, speed_multiplier=1.0, *control_flags)

Allows the mob to seek shade.

Parameters:

Name Type Description Default
cooldown_time Seconds

Time in seconds the mob has to wait before using the goal again. Defaults to 0.0.

0.0
speed_multiplier float

Movement speed multiplier of the mob when using this AI Goal. Defaults to 1.0.

1.0
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_find_cover

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIFindMount

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(avoid_water=False, max_failed_attempts=20, mount_distance=-1.0, start_delay=0, target_needed=False, within_radius=0.0, *control_flags)

Allows the mob to look around for another mob to ride atop it.

Parameters:

Name Type Description Default
avoid_water bool

If true, the mob will not go into water blocks when going towards a mount. Defaults to False.

False
max_failed_attempts int

Number of attempts to find mount. Defaults to 20.

20
mount_distance float

This is the distance the mob needs to be, in blocks, from the desired mount to mount it. If the value is below 0, the mob will use its default attack distance. Defaults to -1.0.

-1.0
start_delay int

Time the mob will wait before starting to move towards the mount. Defaults to 0.

0
target_needed bool

If true, the mob will only look for a mount if it has a target. Defaults to False.

False
within_radius float

Distance in blocks within which the mob will look for a mount. Defaults to 0.0.

0.0
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_find_mount

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIFindUnderwaterTreasure

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(search_range=0, speed_multiplier=1.0, stop_distance=2.0, *control_flags)

Allows the mob to move towards the nearest underwater ruin or shipwreck.

Parameters:

Name Type Description Default
search_range int

The range that the mob will search for a treasure chest within a ruin or shipwreck to move towards. Defaults to 0.

0
speed_multiplier float

Movement speed multiplier of the mob when using this AI Goal. Defaults to 1.0.

1.0
stop_distance float

The distance the mob will move before stopping. Defaults to 2.0.

2.0
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_find_underwater_treasure

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIFireAtTarget

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(projectile_def, attack_cooldown=0.5, attack_range=None, filters=None, max_head_rotation_x=30.0, max_head_rotation_y=30.0, owner_anchor=2, owner_offset=(0, 0, 0), post_shoot_delay=0.2, pre_shoot_delay=0.75, ranged_fov=90.0, target_anchor=2, target_offset=(0, 0, 0))

Allows an entity to attack by firing a shot with a delay. Anchor and offset parameters of this component overrides the anchor and offset from projectile component.

Parameters:

Name Type Description Default
projectile_def MinecraftEntityDescriptor | Identifier

Actor definition to use as projectile for the ranged attack. The actor must be a projectile. This field is required for the goal to be usable.

required
attack_cooldown Seconds

The cooldown time in seconds before this goal can be used again. Defaults to 0.5.

0.5
attack_range tuple[int, int]

Target needs to be within this range for the attack to happen. Defaults to None.

None
filters Filter

Conditions that need to be met for the behavior to start. Defaults to None.

None
max_head_rotation_x float

Maximum head rotation (in degrees), on the X-axis, that this entity can apply while trying to look at the target. Defaults to 30.0.

30.0
max_head_rotation_y float

Maximum head rotation (in degrees), on the Y-axis, that this entity can apply while trying to look at the target. Defaults to 30.0.

30.0
owner_anchor int

Entity anchor for the projectile spawn location. Defaults to 2.

2
owner_offset tuple[float, float, float]

Offset vector from the owner_anchor. Defaults to (0, 0, 0).

(0, 0, 0)
post_shoot_delay Seconds

Time in seconds between firing the projectile and ending the goal. Defaults to 0.2.

0.2
pre_shoot_delay Seconds

Time in seconds before firing the projectile. Defaults to 0.75.

0.75
ranged_fov float

Field of view (in degrees) when using sensing to detect a target for attack. Defaults to 90.0.

90.0
target_anchor int

Entity anchor for projectile target. Defaults to 2.

2
target_offset tuple[float, float, float]

Offset vector from the target_anchor. Defaults to (0, 0, 0).

(0, 0, 0)
Note

Requires a format version of at least 1.21.30.

Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_fire_at_target

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIFleeSun

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(speed_multiplier=1.0, *control_flags)

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

Parameters:

Name Type Description Default
speed_multiplier float

Movement speed multiplier of the mob when using this AI Goal. Defaults to 1.0.

1.0
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_flee_sun

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIFloat

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(sink_with_passengers=False, chance_per_tick_to_float=0.0, time_under_water_to_dismount_passengers=0.0)

Allows the mob to stay afloat while swimming. Passengers will be kicked out the moment the mob's head goes underwater, which may not happen for tall mobs.

Parameters:

Name Type Description Default
sink_with_passengers bool

If true, the mob will keep sinking as long as it has passengers. Defaults to False.

False
chance_per_tick_to_float float

The chance per tick to cause an upward impulse. Defaults to 0.0.

0.0
time_under_water_to_dismount_passengers Seconds

Time in seconds that a floating vehicles head can be underwater before it causes its passengers to dismount. Defaults to 0.0.

0.0
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_float

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIFloatTempt

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(items, can_get_scared=False, can_tempt_vertically=False, can_tempt_while_ridden=False, sound_interval=None, speed_multiplier=1.0, stop_distance=1.5, tempt_sound=None, within_radius=0.0)

Allows a mob to be tempted by a player holding a specific item. Uses point-to-point movement. Designed for mobs that are floating (e.g. use the "minecraft:navigation.float" component).

Parameters:

Name Type Description Default
items list[MinecraftItemDescriptor | Identifier]

List of items that can tempt the mob.

required
can_get_scared bool

If true, the mob can stop being tempted if the player moves too fast while close to this mob. Defaults to False.

False
can_tempt_vertically bool

If true, vertical distance to the player will be considered when tempting. Defaults to False.

False
can_tempt_while_ridden bool

If true, the mob can be tempted even if it has a passenger (i.e. if being ridden). Defaults to False.

False
sound_interval int | tuple[int, int]

Range of random ticks to wait between tempt sounds. Defaults to None.

None
speed_multiplier float

Movement speed multiplier of the mob when using this AI Goal. Defaults to 1.0.

1.0
stop_distance float

The distance at which the mob will stop following the player. Defaults to 1.5.

1.5
tempt_sound str

Sound to play while the mob is being tempted. Defaults to None.

None
within_radius float

Distance in blocks this mob can get tempted by a player holding an item they like. Defaults to 0.0.

0.0
Note

Designed for mobs using minecraft:navigation.float.

Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_float_tempt

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIFloatWander

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(additional_collision_buffer=False, allow_navigating_through_liquids=False, float_duration=(0.0, 0.0), float_wander_has_move_control=True, must_reach=False, navigate_around_surface=False, random_reselect=False, surface_xz_dist=0, surface_y_dist=0, use_home_position_restriction=True, xz_dist=10, y_dist=7, y_offset=0.0)

Allows the mob to float around like the Ghast.

Parameters:

Name Type Description Default
additional_collision_buffer bool

If true, the mob will have an additional buffer zone around it to avoid collisions with blocks when picking a position to wander to. Defaults to False.

False
allow_navigating_through_liquids bool

If true allows the mob to navigate through liquids on its way to the target position. Defaults to False.

False
float_duration tuple[Seconds, Seconds]

Range of time in seconds the mob will float around before landing and choosing to do something else. Defaults to (0.0, 0.0).

(0.0, 0.0)
float_wander_has_move_control bool

If true, the MoveControl flag will be added to the behavior which means that it can no longer be active at the same time as other behaviors with MoveControl. Defaults to True.

True
must_reach bool

If true, the point has to be reachable to be a valid target. Defaults to False.

False
navigate_around_surface bool

If true, will prioritize finding random positions in the vicinity of surfaces, i.e. blocks that are not Air or Liquid. Defaults to False.

False
random_reselect bool

If true, the mob will randomly pick a new point while moving to the previously selected one. Defaults to False.

False
surface_xz_dist int

The horizontal distance in blocks that the goal will check for a surface from a candidate position. Only valid when navigate_around_surface is true. Defaults to 0.

0
surface_y_dist int

The vertical distance in blocks that the goal will check for a surface from a candidate position. Only valid when navigate_around_surface is true. Defaults to 0.

0
use_home_position_restriction bool

If true, the mob will respect home position restrictions when choosing new target positions. If false, it will choose target position without considering home restrictions. Defaults to True.

True
xz_dist int

Distance in blocks on ground that the mob will look for a new spot to move to. Must be at least 1. Defaults to 10.

10
y_dist int

Distance in blocks that the mob will look up or down for a new spot to move to. Must be at least 1. Defaults to 7.

7
y_offset float

Height in blocks to add to the selected target position. Defaults to 0.0.

0.0
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_float_wander

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIFollowCaravan

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(entity_count=1, speed_multiplier=1.0)

Allows the mob to follow mobs that are in a caravan.

Parameters:

Name Type Description Default
entity_count int

Number of entities that can be in the caravan. Defaults to 1.

1
speed_multiplier float

Movement speed multiplier of the mob when using this AI Goal. Defaults to 1.0.

1.0
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_follow_caravan

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIFollowMob

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(search_range=0, speed_multiplier=1.0, stop_distance=2, filters=None, preferred_actor_type=None, use_home_position_restriction=False)

Allows the mob to follow other mobs.

Parameters:

Name Type Description Default
search_range int

The distance in blocks it will look for a mob to follow. Defaults to 0.

0
speed_multiplier float

Movement speed multiplier of the mob when using this AI Goal. Defaults to 1.0.

1.0
stop_distance int

The distance in blocks this mob stops from the mob it is following. Defaults to 2.

2
filters Filter

If non-empty, provides criteria for filtering which nearby Mobs can be followed. Defaults to None.

None
preferred_actor_type str

The type of actor to prefer following. If left unspecified, a random actor among those in range will be chosen. Defaults to None.

None
use_home_position_restriction bool

If true, the mob will respect the 'minecraft:home' component's 'restriction_radius' field when choosing a target to follow. Defaults to False.

False
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_follow_mob

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIFollowOwner

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(can_teleport=True, ignore_vibration=True, max_distance=60.0, speed_multiplier=1.0, start_distance=10.0, stop_distance=2.0, post_teleport_distance=1)

Allows a mob to follow the player that owns it.

Parameters:

Name Type Description Default
can_teleport bool

Defines if the mob will teleport to its owner when too far away. Defaults to True.

True
ignore_vibration bool

Defines if the mob should disregard following its owner after detecting a recent vibration. Defaults to True.

True
max_distance float

The maximum distance the mob can be from its owner to start following it. Applicable only when "can_teleport" is set to false. Defaults to 60.0.

60.0
speed_multiplier float

Movement speed multiplier of the mob when using this AI Goal. Defaults to 1.0.

1.0
start_distance float

The minimum distance the mob must be from its owner to start following it. Defaults to 10.0.

10.0
stop_distance float

The distance at which the mob will stop following its owner. Defaults to 2.0.

2.0
post_teleport_distance int

Defines how far (in blocks) the entity will be from its owner after teleporting. If not specified, it defaults to "stop_distance" + 1, allowing the entity to seamlessly resume navigation. Defaults to 1.

1
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_follow_owner

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIFollowParent

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(speed_multiplier=1.0)

Allows the mob to follow their parent around.

Parameters:

Name Type Description Default
speed_multiplier float

Movement speed multiplier of the mob when using this AI Goal. Defaults to 1.0.

1.0
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_follow_parent

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIFollowTargetCaptain

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(follow_distance=0.0, within_radius=0.0)

Allows mob to move towards its current target captain.

Parameters:

Name Type Description Default
follow_distance float

Defines the distance in blocks the mob will stay from its target while following. Defaults to 0.0.

0.0
within_radius float

Defines the maximum distance in blocks a mob can get from its target captain before giving up trying to follow it. Defaults to 0.0.

0.0
Note

Requires an entity to be labeled as a captain in a group.

Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_follow_target_captain

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIGoAndGiveItemsToNoteblock

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(listen_time=30, reach_block_distance=3.0, run_speed=1.0, throw_force=0.2, throw_sound=None, vertical_throw_mul=1.5)

The entity will attempt to toss the items from its inventory to a nearby recently played noteblock.

Parameters:

Name Type Description Default
listen_time int

Sets the time an entity should continue delivering items to a noteblock after hearing it. Defaults to 30.

30
reach_block_distance float

Sets the desired distance to be reached before throwing the items towards the block. Defaults to 3.0.

3.0
run_speed float

Sets the entity's speed when running toward the block. Defaults to 1.0.

1.0
throw_force float

Sets the throw force. Defaults to 0.2.

0.2
throw_sound str

Sound to play when this mob throws an item. Defaults to None.

None
vertical_throw_mul float

Sets the vertical throw multiplier that is applied on top of the throw force in the vertical direction. Defaults to 1.5.

1.5
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_go_and_give_items_to_noteblock

__iter__()

Iterates over the component's fields.

on_item_throw(event, target=FilterSubject.Self)

Adds an event to run when the entity throws items toward the noteblock.

Parameters:

Name Type Description Default
event str

Event to run when the item is thrown.

required
target FilterSubject

Event target. Defaults to FilterSubject.Self.

Self

Returns:

Name Type Description
self

Returns the current instance for method chaining.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIGoAndGiveItemsToOwner

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(reach_mob_distance=3.0, run_speed=1.0, throw_force=0.2, throw_sound='item_thrown', vertical_throw_mul=1.5)

The entity will attempt to toss the items from its inventory to its owner.

Parameters:

Name Type Description Default
reach_mob_distance float

Sets the desired distance to be reached before giving items to owner. Defaults to 3.0.

3.0
run_speed float

Sets the entity's speed when running toward the owner. Defaults to 1.0.

1.0
throw_force float

Sets the throw force. Defaults to 0.2.

0.2
throw_sound str

Sound to play when this mob throws an item. Defaults to "item_thrown".

'item_thrown'
vertical_throw_mul float

Sets the vertical throw multiplier that is applied on top of the throw force in the vertical direction. Defaults to 1.5.

1.5
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_go_and_give_items_to_owner

__iter__()

Iterates over the component's fields.

on_item_throw(event, target=FilterSubject.Self)

Adds an event to run when the entity throws items to its owner.

Parameters:

Name Type Description Default
event str

Event to run when the item is thrown.

required
target FilterSubject

Event target. Defaults to FilterSubject.Self.

Self

Returns:

Name Type Description
self

Returns the current instance for method chaining.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIGoHome

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(calculate_new_path_radius=2.0, goal_radius=0.5, interval=120, speed_multiplier=1.0)

Allows the mob to move back to the position they were spawned.

Parameters:

Name Type Description Default
calculate_new_path_radius float

Distance in blocks that the mob is considered close enough to the end of the current path. A new path will then be calculated to continue toward home. Defaults to 2.0.

2.0
goal_radius float

Distance 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. Defaults to 0.5.

0.5
interval int

A random value to determine when to randomly move somewhere. This has a 1/interval chance to choose this goal. Defaults to 120.

120
speed_multiplier float

Movement speed multiplier of the mob when using this AI Goal. Defaults to 1.0.

1.0
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_go_home

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIGuardianAttack

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(elder_extra_magic_damage=2, hard_mode_extra_magic_damage=2, magic_damage=1, min_distance=3.0, sound_delay_time=0.5, x_max_rotation=90.0, y_max_head_rotation=90.0, *control_flags)

Allows this entity to use a laser beam attack. Can only be used by Guardians and Elder Guardians.

Parameters:

Name Type Description Default
elder_extra_magic_damage int

Amount of additional damage dealt from an elder guardian's magic attack. Value must be > 0. Defaults to 2.

2
hard_mode_extra_magic_damage int

In hard difficulty, amount of additional damage dealt from a guardian's magic attack. Value must be > 0. Defaults to 2.

2
magic_damage int

Amount of damage dealt from a guardian's magic attack. Magic attack damage is added to the guardian's base attack damage. Value must be > 0. Defaults to 1.

1
min_distance float

Guardian attack behavior stops if the target is closer than this distance (doesn't apply to elders). Defaults to 3.0.

3.0
sound_delay_time Seconds

Time (in seconds) to wait after starting an attack before playing the guardian attack sound. Value must be > 0. Defaults to 0.5.

0.5
x_max_rotation float

Maximum rotation (in degrees), on the X-axis, this entity can rotate while trying to look at the target. Value must be > 0. Defaults to 90.0.

90.0
y_max_head_rotation float

Maximum rotation (in degrees), on the Y-axis, this entity can rotate its head while trying to look at the target. Value must be > 0. Defaults to 90.0.

90.0
Note

Can only be used by Guardians and Elder Guardians.

Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_guardian_attack

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIHarvestFarmBlock

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(goal_radius=1.5, max_seconds_before_search=1.0, search_cooldown_max_seconds=8.0, search_count=0, search_height=1, search_range=16, seconds_until_new_task=0.5, speed_multiplier=0.5)

Allows the entity to search within an area for farmland with air above it. If found, the entity will replace the air block by planting a seed item from its inventory on the farmland block. This goal will not execute if the entity does not have an item in its inventory.

Parameters:

Name Type Description Default
goal_radius float

Distance in blocks within the entity considers it has reached it's target position. Value must be > 0. Defaults to 1.5.

1.5
max_seconds_before_search float

The maximum amount of time in seconds that the goal can take before searching for the first harvest block. The time is chosen between 0 and this number. Value must be > 0. Defaults to 1.0.

1.0
search_cooldown_max_seconds float

The maximum amount of time in seconds that the goal can take before searching again, after failing to find a a harvest block already. The time is chosen between 0 and this number. Value must be > 0. Defaults to 8.0.

8.0
search_count int

The number of randomly selected blocks each tick that the mob will check within its search range and height for a valid block to move to. Defaults to 0.

0
search_height int

The height in blocks the entity will search within to find a valid target position. Value must be > 0. Defaults to 1.

1
search_range int

The distance in blocks the entity will search within to find a valid target position. Value must be > 0. Defaults to 16.

16
seconds_until_new_task float

The amount of time in seconds that the goal will cooldown after a successful reap/sow, before it can start again. Value must be > 0. Defaults to 0.5.

0.5
speed_multiplier float

Movement speed multiplier of the mob when using this goal. Defaults to 0.5.

0.5
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_harvest_farm_block

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIHide

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(duration=1.0, poi_type=None, speed_multiplier=1.0, timeout_cooldown=8.0)

Allows a mob with the hide component to attempt to move to - and hide at - an owned or nearby POI.

Parameters:

Name Type Description Default
duration Seconds

Amount of time in seconds that the mob reacts. Defaults to 1.0.

1.0
poi_type str

Tells the goal what POI type it should be looking for. Defaults to None.

None
speed_multiplier float

Movement speed multiplier of the mob when using this goal. Defaults to 1.0.

1.0
timeout_cooldown float

The cooldown time in seconds before the goal can be reused after a internal failure or timeout condition. Defaults to 8.0.

8.0
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_hide

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIHoldGround

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(broadcast=False, broadcast_range=0.0, min_radius=10.0, *control_flags)

Compels an entity to stop at their current location, turn to face a mob they are targeting, and react with an event.

Parameters:

Name Type Description Default
broadcast bool

Whether to broadcast out the mob's target to other mobs of the same type. Defaults to False.

False
broadcast_range float

Range in blocks for how far to broadcast. Defaults to 0.0.

0.0
min_radius float

Minimum distance the target must be for the mob to run this goal. Defaults to 10.0.

10.0
Note

Requires a target in order to work properly.

Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_hold_ground

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIHurtByTarget

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(alert_same_type=False, entity_types=None, max_dist=16, must_see=False, must_see_forget_duration=3.0, reevaluate_description=False, sprint_speed_multiplier=1.0, walk_speed_multiplier=1.0, hurt_owner=False)

Allows the mob to target another mob that hurts them.

Parameters:

Name Type Description Default
alert_same_type bool

If true, nearby mobs of the same type will be alerted about the damage. Defaults to False.

False
entity_types Filter

List of entity types that this mob can target when hurt by them. Defaults to None.

None
max_dist int

Maximum distance this mob can be away to be a valid choice. Defaults to 16.

16
must_see bool

If true, the mob has to be visible to be a valid choice. Defaults to False.

False
must_see_forget_duration float

Determines 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. Defaults to 3.0.

3.0
reevaluate_description bool

If true, the mob will stop being targeted if it stops meeting any conditions. Defaults to False.

False
sprint_speed_multiplier float

Multiplier for the running speed. A value of 1.0 means the speed is unchanged. Defaults to 1.0.

1.0
walk_speed_multiplier float

Multiplier for the walking speed. A value of 1.0 means the speed is unchanged. Defaults to 1.0.

1.0
hurt_owner bool

If true, the mob will hurt its owner and other mobs with the same owner as itself. Defaults to False.

False
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_hurt_by_target

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIInspectBookshelf

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(goal_radius=0.5, search_count=10, search_height=1, search_range=0, speed_multiplier=1.0)

Allows the mob to inspect bookshelves.

Parameters:

Name Type Description Default
goal_radius float

Distance 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. Value must be > 0. Defaults to 0.5.

0.5
search_count int

The number of randomly selected blocks each tick that the mob will check within its search range and height for a valid block to move to. Defaults to 10.

10
search_height int

The height that the mob will search for bookshelves. Value must be > 0. Defaults to 1.

1
search_range int

The distance in blocks the mob will look for books to inspect. Value must be > 0. Defaults to 0.

0
speed_multiplier float

Movement speed multiplier of the mob when using this goal. Defaults to 1.0.

1.0
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_inspect_bookshelf

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIInvestigateSuspiciousLocation

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(goal_radius=1.5, speed_multiplier=1.0, *control_flags)

Allows this entity to move towards a "suspicious" position based on data gathered in minecraft:suspect_tracking.

Parameters:

Name Type Description Default
goal_radius float

Distance in blocks within the entity considers it has reached it's target position. Defaults to 1.5.

1.5
speed_multiplier float

Movement speed multiplier. Defaults to 1.0.

1.0
Note

Requires minecraft:suspect_tracking.

Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_investigate_suspicious_location

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIJumpAroundTarget

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(check_collision=False, entity_bounding_box_scale=0.7, filters=None, jump_angles=(40.0, 55.0, 60.0, 75.0, 80.0), jump_cooldown_duration=0.5, jump_cooldown_when_hurt_duration=0.1, landing_distance_from_target=None, landing_position_spread_degrees=90, last_hurt_duration=2.0, line_of_sight_obstruction_height_ignore=4, max_jump_velocity=1.4, prepare_jump_duration=0.5, required_vertical_space=4, snap_to_surface_block_range=10, valid_distance_to_target=None)

Allows an entity to jump around a target.

Parameters:

Name Type Description Default
check_collision bool

Enables collision checks when calculating the jump. Setting check_collision to true may affect performance and should be used with care. Defaults to False.

False
entity_bounding_box_scale float

Scaling temporarily applied to the entity's AABB bounds when jumping. A smaller bounding box reduces the risk of collisions during the jump. When check_collision is true it also increases the chance of being able to jump when close to obstacles. Defaults to 0.7.

0.7
filters Filter

Conditions that need to be met for the behavior to start. Defaults to None.

None
jump_angles tuple[float, ...]

The jump angles in float degrees that are allowed when performing the jump. The order in which the angles are chosen is randomized. Defaults to (40.0, 55.0, 60.0, 75.0, 80.0).

(40.0, 55.0, 60.0, 75.0, 80.0)
jump_cooldown_duration Seconds

The time in seconds to spend in cooldown before this goal can be used again. Defaults to 0.5.

0.5
jump_cooldown_when_hurt_duration Seconds

The time in seconds to spend in cooldown after being hurt before this goal can be used again. Defaults to 0.1.

0.1
landing_distance_from_target tuple[int, int] | None

The range deciding how close to and how far away from the target the landing position can be when jumping. Defaults to None.

None
landing_position_spread_degrees int

This angle (in degrees) is used for controlling the spread when picking a landing position behind the target. A zero spread angle means the landing position will be straight behind the target with no variance. A 90 degree spread angle means the landing position can be up to 45 degrees to the left and to the right of the position straight behind the target's view direction. Defaults to 90.

90
last_hurt_duration Seconds

If the entity was hurt within these last seconds, the jump_cooldown_when_hurt_duration will be used instead of jump_cooldown_duration. Defaults to 2.0.

2.0
line_of_sight_obstruction_height_ignore int

If the entity's line of sight towards its target is obstructed by an obstacle with a height below this number, the obstacle will be ignored, and the goal will try to find a valid landing position. Defaults to 4.

4
max_jump_velocity float

Maximum velocity a jump can be performed at. Defaults to 1.4.

1.4
prepare_jump_duration Seconds

The time in seconds to spend preparing for the jump. Defaults to 0.5.

0.5
required_vertical_space int

The number of blocks above the entity's head that has to be air for this goal to be usable. Defaults to 4.

4
snap_to_surface_block_range int

The number of blocks above and below from the jump target position that will be checked to find a surface to land on. Defaults to 10.

10
valid_distance_to_target tuple[int, int] | None

Target needs to be within this range for the jump to happen. Defaults to None.

None
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_jump_around_target

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIJumpToBlock

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(cooldown_range=None, forbidden_blocks=None, max_velocity=1.5, minimum_distance=2, minimum_path_length=5, preferred_blocks=None, preferred_blocks_chance=1.0, scale_factor=0.7, search_height=10, search_width=8)

Allows an entity to jump to another random block.

Parameters:

Name Type Description Default
cooldown_range tuple[Seconds, Seconds] | None

Minimum and maximum cooldown time-range (positive, in seconds) between each attempted jump. Defaults to None.

None
forbidden_blocks list[str] | None

Blocks that the mob can't jump to. Defaults to None.

None
max_velocity float

The maximum velocity with which the mob can jump. Defaults to 1.5.

1.5
minimum_distance int

The minimum distance (in blocks) from the mob to a block, in order to consider jumping to it. Defaults to 2.

2
minimum_path_length int

The minimum length (in blocks) of the mobs path to a block, in order to consider jumping to it. Defaults to 5.

5
preferred_blocks list[str] | None

Blocks that the mob prefers jumping to. Defaults to None.

None
preferred_blocks_chance float

Chance (between 0.0 and 1.0) that the mob will jump to a preferred block, if in range. Only matters if preferred blocks are defined. Defaults to 1.0.

1.0
scale_factor float

The scalefactor of the bounding box of the mob while it is jumping. Defaults to 0.7.

0.7
search_height int

The height (in blocks, in range [2, 15]) of the search box, centered around the mob. Defaults to 10.

10
search_width int

The width (in blocks, in range [2, 15]) of the search box, centered around the mob. Defaults to 8.

8
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_jump_to_block

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIKnockbackRoar

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(attack_time=0.5, cooldown_time=0.1, damage_filters=None, duration=1, knockback_damage=6, knockback_filters=None, knockback_height_cap=0.4, knockback_horizontal_strength=4, knockback_range=4, knockback_vertical_strength=4)

Allows the mob to perform a damaging knockback that affects all nearby entities.

Parameters:

Name Type Description Default
attack_time float

The delay after which the knockback occurs (in seconds). Defaults to 0.5.

0.5
cooldown_time float

Time (in seconds) the mob has to wait before using the goal again. Defaults to 0.1.

0.1
damage_filters Filter

The list of conditions another entity must meet to be a valid target to apply damage to. Defaults to None.

None
duration float

The max duration of the roar (in seconds). Defaults to 1.

1
knockback_damage int

The damage dealt by the knockback roar. Defaults to 6.

6
knockback_filters Filter

The list of conditions another entity must meet to be a valid target to apply knockback to. Defaults to None.

None
knockback_height_cap float

The maximum height for vertical knockback. Defaults to 0.4.

0.4
knockback_horizontal_strength int

The strength of the horizontal knockback. Defaults to 4.

4
knockback_range int

The radius (in blocks) of the knockback effect. Defaults to 4.

4
knockback_vertical_strength int

The strength of the vertical knockback. Defaults to 4.

4
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_knockback_roar

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAILayDown

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(interval=120, random_stop_interval=120)

Allows mobs to lay down at times.

Parameters:

Name Type Description Default
interval int

A random value to determine at what intervals something can occur. This has a 1/interval chance to choose this goal. Defaults to 120.

120
random_stop_interval int

a random value in which the goal can use to pull out of the behavior. This is a 1/interval chance to play the sound. Defaults to 120.

120
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_lay_down

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAILayEgg

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(allow_laying_from_below=False, egg_type='minecraft:turtle_egg', goal_radius=0.5, lay_egg_sound='lay_egg', lay_seconds=10.0, search_height=1, search_range=0, speed_multiplier=1.0, target_blocks=None, target_materials_above_block=None, use_default_animation=True, *control_flags)

Allows the mob to lay an egg block on certain types of blocks if the mob is pregnant.

Parameters:

Name Type Description Default
allow_laying_from_below bool

Allows the mob to lay its eggs from below the target if it can't get there. This is useful if the target block is water with air above, since mobs may not be able to get to the air block above water. Defaults to False.

False
egg_type MinecraftBlockDescriptor | Identifier

Block type for the egg to lay. If this is a turtle egg, the number of eggs in the block is randomly set. Defaults to "minecraft:turtle_egg".

'minecraft:turtle_egg'
goal_radius float

Distance 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. Value must be > 0. Defaults to 0.5.

0.5
lay_egg_sound str

Name of the sound event played when laying the egg. Defaults to lay_egg, which is used for Turtles. Defaults to "lay_egg".

'lay_egg'
lay_seconds Seconds

Duration of the laying egg process in seconds. Defaults to 10.0.

10.0
search_height int

The height in blocks the mob will look for the block to move towards. Value must be > 0. Defaults to 1.

1
search_range int

The distance in blocks it will look for the block to move towards. Value must be > 0. Defaults to 0.

0
speed_multiplier float

Movement speed multiplier of the mob when using this goal. Defaults to 1.0.

1.0
target_blocks list[MinecraftBlockDescriptor | Identifier]

Blocks that the mob can lay its eggs on top of. Defaults to the engine default when omitted.

None
target_materials_above_block list[Literal[Air, Water, Lava]]

Types of materials that can exist above the target block. Valid types are Air, Water, and Lava. Defaults to the engine default when omitted.

None
use_default_animation bool

Specifies if the default lay-egg animation should be played when the egg is placed or not. Defaults to True.

True
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_lay_egg

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAILeapAtTarget

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(must_be_on_ground=True, set_persistent=False, target_dist=0.3, yd=0.0)

Allows monsters to jump at and attack their target. Can only be used by hostile mobs.

Parameters:

Name Type Description Default
must_be_on_ground bool

If true, the mob will only jump at its target if its on the ground. Setting it to false will allow it to jump even if its already in the air. Defaults to True.

True
set_persistent bool

Allows the actor to be set to persist upon targeting a player. Defaults to False.

False
target_dist float

The height in blocks the mob jumps when leaping at its target. Defaults to 0.3.

0.3
yd float

The height in blocks the mob jumps when leaping at its target. Defaults to 0.0.

0.0
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_leap_at_target

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAILookAtEntity

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(angle_of_view_horizontal=360, angle_of_view_vertical=360, filters=None, look_distance=8.0, look_time=(2, 4), probability=0.02, *control_flags)

Compels an entity to look at a specific entity by rotating the head bone pose within a set limit.

Parameters:

Name Type Description Default
angle_of_view_horizontal int

The angle in degrees that the mob can see rotated on the Y-axis (left-right). Value must be <= 360. Defaults to 360.

360
angle_of_view_vertical int

The angle in degrees that the mob can see rotated on the X-axis (up-down). Value must be <= 360. Defaults to 360.

360
filters Filter

Filter to determine the conditions for this mob to look at the entity. Defaults to None.

None
look_distance float

The distance in blocks from which the entity will look at the nearest entity. Defaults to 8.0.

8.0
look_time tuple[int, int]

Time range to look at the nearest entity. Defaults to (2, 4).

(2, 4)
probability float

The probability of looking at the target. A value of 1.00 is 100%. Value must be <= 1. Defaults to 0.02.

0.02
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_look_at_entity

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAILookAtPlayer

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(angle_of_view_horizontal=360, angle_of_view_vertical=360, look_distance=8.0, look_time=(2, 4), probability=0.02, target_distance=0.6)

Compels an entity to look at the player by rotating the head bone pose within a set limit.

Parameters:

Name Type Description Default
angle_of_view_horizontal int

The angle in degrees that the mob can see rotated on the Y-axis (left-right). Value must be <= 360. Defaults to 360.

360
angle_of_view_vertical int

The angle in degrees that the mob can see rotated on the X-axis (up-down). Value must be <= 360. Defaults to 360.

360
look_distance float

The distance in blocks from which the entity will look at the nearest entity. Defaults to 8.0.

8.0
look_time tuple[int, int]

Time range to look at the nearest entity. Defaults to (2, 4).

(2, 4)
probability float

The probability of looking at the target. A value of 1.00 is 100%. Value must be <= 1. Defaults to 0.02.

0.02
target_distance float

Description. Defaults to 0.6.

0.6
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_look_at_player

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAILookAtTarget

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(angle_of_view_horizontal=360, angle_of_view_vertical=360, look_distance=8.0, look_time=(2, 4), probability=0.02, target_distance=0.6)

Compels an entity to look at the target by rotating the head bone pose within a set limit.

Parameters:

Name Type Description Default
angle_of_view_horizontal int

The angle in degrees that the mob can see rotated on the Y-axis (left-right). Value must be <= 360. Defaults to 360.

360
angle_of_view_vertical int

The angle in degrees that the mob can see rotated on the X-axis (up-down). Value must be <= 360. Defaults to 360.

360
look_distance float

The distance in blocks from which the entity will look at the nearest entity. Defaults to 8.0.

8.0
look_time tuple[int, int]

Time range to look at the nearest entity. Defaults to (2, 4).

(2, 4)
probability float

The probability of looking at the target. A value of 1.00 is 100%. Value must be <= 1. Defaults to 0.02.

0.02
target_distance float

Description. Defaults to 0.6.

0.6
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_look_at_target

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAILookAtTradingPlayer

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(angle_of_view_horizontal=360, angle_of_view_vertical=360, look_distance=8.0, look_time=None, probability=0.02)

Compels an entity to look at the player that is currently trading with the entity.

Parameters:

Name Type Description Default
angle_of_view_horizontal int

The angle in degrees that the mob can see rotated on the Y-axis (left-right). Value must be <= 360. Defaults to 360.

360
angle_of_view_vertical int

The angle in degrees that the mob can see rotated on the X-axis (up-down). Value must be <= 360. Defaults to 360.

360
look_distance float

The distance in blocks from which the entity will look at the nearest entity. Defaults to 8.0.

8.0
look_time tuple[int, int]

Time range to look at the nearest entity. Defaults to None.

None
probability float

The probability of looking at the target. A value of 1.00 is 100%. Value must be <= 1. Defaults to 0.02.

0.02
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_look_at_trading_player

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIMakeLove

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

Allows the villager to look for a mate to spawn other villagers with.

Parameters:

Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_make_love

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIMeleeAttack

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(attack_once=False, cooldown_time=1, inner_boundary_time_increase=0.25, max_path_time=0.55, melee_fov=90, min_path_time=0.2, outer_boundary_time_increase=0.5, path_fail_time_increase=0.75, path_inner_boundary=16, path_outer_boundary=32, random_stop_interval=0, reach_multiplier=2, require_complete_path=False, speed_multiplier=1, track_target=False, x_max_rotation=30, y_max_head_rotation=30, can_spread_on_fire=False)

Allows an entity to deal damage through a melee attack.

Parameters:

Name Type Description Default
attack_once bool

Allows the mob to perform this melee attack behavior only once during its lifetime. Defaults to False.

False
cooldown_time int

Cooldown time, in seconds, between consecutive attacks. Defaults to 1.

1
inner_boundary_time_increase float

Time, in seconds, added to the attack path recalculation interval when the target is beyond "path_inner_boundary". Defaults to 0.25.

0.25
max_path_time float

Maximum base time, in seconds, before recalculating a new attack path to the target (before increases are applied). Defaults to 0.55.

0.55
melee_fov int

Field of view, in degrees, used by the hard-coded sensing component to detect a valid attack target. Defaults to 90.

90
min_path_time float

Minimum base time, in seconds, before recalculating a new attack path to the target (before increases are applied). Defaults to 0.2.

0.2
outer_boundary_time_increase float

Time, in seconds, added to the attack path recalculation interval when the target is beyond "path_outer_boundary". Defaults to 0.5.

0.5
path_fail_time_increase float

Time, in seconds, added to the attack path recalculation interval when the mob cannot move along the current path. Defaults to 0.75.

0.75
path_inner_boundary int

Distance at which to increase attack path recalculation by "inner_boundary_time_increase". Defaults to 16.

16
path_outer_boundary int

Distance at which to increase attack path recalculation by "outer_boundary_time_increase". Defaults to 32.

32
random_stop_interval int

Defines a 1-in-N chance for the mob to stop its current attack, where N equals "random_stop_interval". Defaults to 0.

0
reach_multiplier int

Used with the base size of the entity to determine minimum target-distance before trying to deal attack damage. Defaults to 2.

2
require_complete_path bool

Specifies whether a full navigation path from the mob to the target is required. Defaults to False.

False
speed_multiplier float

Multiplier applied to the mob's movement speed when moving toward its target. Defaults to 1.

1
track_target bool

Allows the mob to track its target even if it lacks a hard-coded sensing component. Defaults to False.

False
x_max_rotation int

Maximum rotation, in degrees, on the X-axis while the mob is trying to look at its target. Defaults to 30.

30
y_max_head_rotation int

Maximum rotation, in degrees, on the Y-axis while the mob is trying to look at its target. Defaults to 30.

30
can_spread_on_fire bool

Allows the mob, if on fire and empty handed, to ignite its target upon a successful attack. Defaults to False.

False
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_melee_attack

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIMeleeBoxAttack

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(attack_once=False, attack_types=[], can_spread_on_fire=False, cooldown_time=1, horizontal_reach=0.8, inner_boundary_time_increase=0.25, max_path_time=0.55, melee_fov=90, min_path_time=0.2, outer_boundary_time_increase=0.5, path_fail_time_increase=0.75, path_inner_boundary=16, path_outer_boundary=32, random_stop_interval=0, box_increase=2, require_complete_path=False, set_persistent=False, speed_multiplier=1, track_target=False, x_max_rotation=30, y_max_head_rotation=30)

Allows an entity to deal damage through a melee attack with reach calculations based on bounding boxes.

Parameters:

Name Type Description Default
attack_once bool

Allows the mob to perform this melee attack behavior only once during its lifetime. Defaults to False.

False
attack_types list[str]

Defines the entity types this entity will attack. Defaults to [].

[]
can_spread_on_fire bool

Allows the mob, if on fire and empty handed, to ignite its target upon a successful attack. Defaults to False.

False
cooldown_time Seconds

Cooldown time, in seconds, between consecutive attacks. Defaults to 1.

1
horizontal_reach float

The attack reach of the mob will be a box with the size of the mobs bounds increased by this value in all horizontal directions. Defaults to 0.8.

0.8
inner_boundary_time_increase Seconds

Time, in seconds, added to the attack path recalculation interval when the target is beyond "path_inner_boundary". Defaults to 0.25.

0.25
max_path_time Seconds

Maximum base time, in seconds, before recalculating a new attack path to the target (before increases are applied). Defaults to 0.55.

0.55
melee_fov int

Field of view, in degrees, used by the hard-coded sensing component to detect a valid attack target. Defaults to 90.

90
min_path_time Seconds

Minimum base time, in seconds, before recalculating a new attack path to the target (before increases are applied). Defaults to 0.2.

0.2
outer_boundary_time_increase Seconds

Time, in seconds, added to the attack path recalculation interval when the target is beyond "path_outer_boundary". Defaults to 0.5.

0.5
path_fail_time_increase Seconds

Time, in seconds, added to the attack path recalculation interval when the mob cannot move along the current path. Defaults to 0.75.

0.75
path_inner_boundary float

Distance at which to increase attack path recalculation by "inner_boundary_time_increase". Defaults to 16.

16
path_outer_boundary float

Distance at which to increase attack path recalculation by "outer_boundary_time_increase". Defaults to 32.

32
random_stop_interval int

Defines a 1-in-N chance for the mob to stop its current attack, where N equals "random_stop_interval". Defaults to 0.

0
box_increase float

Description. Defaults to 2.

2
require_complete_path bool

Specifies whether a full navigation path from the mob to the target is required. Defaults to False.

False
set_persistent bool

Description. Defaults to False.

False
speed_multiplier float

Multiplier applied to the mob's movement speed when moving toward its target. Defaults to 1.

1
track_target bool

Allows the mob to track its target even if it lacks a hard-coded sensing component. Defaults to False.

False
x_max_rotation int

Maximum rotation, in degrees, on the X-axis while the mob is trying to look at its target. Defaults to 30.

30
y_max_head_rotation int

Maximum rotation, in degrees, on the Y-axis while the mob is trying to look at its target. Defaults to 30.

30
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_melee_box_attack

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIMingle

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(cooldown_time=0.0, duration=1.0, mingle_distance=2.0, mingle_partner_type=[], speed_multiplier=1.0)

Allows an entity to go to the village bell and mingle with other entities.

Parameters:

Name Type Description Default
cooldown_time float

Time in seconds the mob has to wait before using the goal again. Defaults to 0.0.

0.0
duration float

Amount of time in seconds that the entity will chat with another entity. Defaults to 1.0.

1.0
mingle_distance float

The distance from its partner that this entity will mingle. If the entity type is not the same as the entity, this value needs to be identical on both entities. Defaults to 2.0.

2.0
mingle_partner_type list[str]

The entity type that this entity is allowed to mingle with. Defaults to [].

[]
speed_multiplier float

Movement speed multiplier of the mob when using this goal. Defaults to 1.0.

1.0
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_mingle

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIMountPathing

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(speed_multiplier=1.0, target_dist=0.0, track_target=False)

Allows the mob to move around on its own while mounted seeking a target to attack. Also will allow an entity to target another entity for an attack.

Parameters:

Name Type Description Default
speed_multiplier float

Movement speed multiplier of the mob when using this AI Goal. Defaults to 1.0.

1.0
target_dist float

The distance at which this mob wants to be away from its target. Defaults to 0.0.

0.0
track_target bool

If true, this mob will chase after the target as long as it's a valid target. Defaults to False.

False
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_mount_pathing

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIMoveAroundTarget

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(destination_pos_spread_degrees=90.0, destination_position_range=(4.0, 8.0), filters=None, height_difference_limit=10.0, horizontal_search_distance=5, movement_speed=0.6000000238418579, vertical_search_distance=5, *control_flags)

Allows an entity to move around a target.If the entity is too close(i.e.closer than destination range min and height difference limit) it will try to move away from its target.If the entity is too far away from its target it will try to move closer to a random position within the destination range.A randomized amount of those positions will be behind the target, and the spread can be tweaked with 'destination_pos_spread_degrees'.

Parameters:

Name Type Description Default
destination_pos_spread_degrees float

This angle (in degrees) is used for controlling the spread when picking a destination position behind the target. Defaults to 90.0.

90.0
destination_position_range tuple[float, float]

The range of distances from the target entity within which the goal should look for a position to move the owner entity to. Defaults to (4.0, 8.0).

(4.0, 8.0)
filters Filter

Conditions that need to be met for the behavior to start. Defaults to None.

None
height_difference_limit float

Distance in height (in blocks) between the owner entity and the target has to be less than this value when owner checks if it is too close and should move away from the target. Defaults to 10.0.

10.0
horizontal_search_distance int

Horizontal search distance (in blocks) when searching for a position to move away from target. Defaults to 5.

5
movement_speed float

The speed with which the entity should move to its target position. Defaults to 0.6000000238418579.

0.6000000238418579
vertical_search_distance int

Vertical search distance (in blocks) when searching for a position to move away from target. Defaults to 5.

5
Note

Requires a format version of at least 1.21.30.

Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_move_around_target

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIMoveIndoors

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(speed_multiplier=0.8, timeout_cooldown=8.0)

Allows this entity to move indoors.

Parameters:

Name Type Description Default
speed_multiplier float

The movement speed modifier to apply to the entity while it is moving indoors. Defaults to 0.8.

0.8
timeout_cooldown float

The cooldown time in seconds before the goal can be reused after pathfinding fails. Defaults to 8.0.

8.0
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_move_indoors

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIMoveOutdoors

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(goal_radius=2.0, search_count=10, search_height=5, search_range=15, speed_multiplier=0.5, timeout_cooldown=8.0, *control_flags)

Allows this entity to move outdoors.

Parameters:

Name Type Description Default
goal_radius float

The radius away from the target block to count as reaching the goal. Defaults to 2.0.

2.0
search_count int

The amount of times to try finding a random outdoors position before failing. Defaults to 10.

10
search_height int

The y range to search for an outdoors position for. Defaults to 5.

5
search_range int

The x and z range to search for an outdoors position for. Defaults to 15.

15
speed_multiplier float

The movement speed modifier to apply to the entity while it is moving outdoors. Defaults to 0.5.

0.5
timeout_cooldown Seconds

The cooldown time in seconds before the goal can be reused after pathfinding fails. Defaults to 8.0.

8.0
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_move_outdoors

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIMoveThroughVillage

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(only_at_night=False, speed_multiplier=1.0)

Can only be used by Villagers. Allows the villagers to create paths around the village.

Parameters:

Name Type Description Default
only_at_night bool

If true, the mob will only move through the village during night time. Defaults to False.

False
speed_multiplier float

Movement speed multiplier of the mob when using this AI Goal. Defaults to 1.0.

1.0
Note

Can only be used by Villagers.

Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_move_through_village

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIMoveToBlock

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(target_blocks, goal_radius=0.5, search_height=1, search_range=0, speed_multiplier=1.0, start_chance=1.0, stay_duration=0.0, target_offset=(0, 0, 0), target_selection_method='nearest', tick_interval=20)

Allows mob to move towards a block.

Parameters:

Name Type Description Default
target_blocks list[MinecraftBlockDescriptor | str]

Block types to move to.

required
goal_radius float

Distance 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. Defaults to 0.5.

0.5
search_height int

The height in blocks that the mob will look for the block. Defaults to 1.

1
search_range int

The distance in blocks that the mob will look for the block. Defaults to 0.

0
speed_multiplier float

Movement speed multiplier of the mob when using this AI Goal. Defaults to 1.0.

1.0
start_chance float

Chance to start the behavior (applied after each random tick_interval). Defaults to 1.0.

1.0
stay_duration float

Number of ticks needed to complete a stay at the block. Defaults to 0.0.

0.0
target_offset tuple[float, float, float]

Offset to add to the selected target position. Defaults to (0, 0, 0).

(0, 0, 0)
target_selection_method str

Kind of block to find fitting the specification. Valid values are "random" and "nearest". Defaults to 'nearest'.

'nearest'
tick_interval int

Average interval in ticks to try to run this behavior. Defaults to 20.

20
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_move_to_block

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIMoveToLand

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(goal_radius=0.5, search_count=10, search_height=1, search_range=0, speed_multiplier=1)

Allows the mob to move back onto land when in water.

Parameters:

Name Type Description Default
goal_radius float

Distance 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. Value must be > 0. Defaults to 0.5.

0.5
search_count int

The number of randomly selected blocks each tick that the mob will check within its search range and height for a valid block to move to. Defaults to 10.

10
search_height int

Height in blocks the mob will look for land to move towards Value must be > 0. Defaults to 1.

1
search_range int

The distance in blocks it will look for land to move towards Value must be > 0. Defaults to 0.

0
speed_multiplier float

Movement speed multiplier of the mob when using this goal. Defaults to 1.

1
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_move_to_land

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIMoveToLava

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(goal_radius=0.5, search_count=10, search_height=1, search_range=0, speed_multiplier=1)

Important

Parameters:

Name Type Description Default
goal_radius float

Distance 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. Value must be > 0. Defaults to 0.5.

0.5
search_count int

The number of randomly selected blocks each tick that the mob will check within its search range and height for a valid block to move to. Defaults to 10.

10
search_height int

Height in blocks the mob will look for lava to move towards Value must be > 0. Defaults to 1.

1
search_range int

The distance in blocks it will look for lava to move towards Value must be > 0. Defaults to 0.

0
speed_multiplier float

Movement speed multiplier of the mob when using this goal. Defaults to 1.

1
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_move_to_lava

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIMoveToLiquid

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(goal_radius=0.5, material_type='Any', search_count=10, search_height=1, search_range=0, speed_multiplier=1.0, *control_flags)

Allows the mob to move into a liquid when on land.

Parameters:

Name Type Description Default
goal_radius float

Distance 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. Value must be > 0. Defaults to 0.5.

0.5
material_type Literal[Any, Water, Lava, any, water, lava]

The material type of the liquid block to find. Valid values are "Any", "Water", and "Lava". Defaults to "Any".

'Any'
search_count int

The number of randomly selected blocks each tick that the mob will check within its search range and height for a valid block to move to. Defaults to 10.

10
search_height int

Height in blocks the mob will look for the liquid block to move towards Value must be > 0. Defaults to 1.

1
search_range int

The distance in blocks it will look for the liquid block to move towards Value must be > 0. Defaults to 0.

0
speed_multiplier float

Movement speed multiplier of the mob when using this goal. Defaults to 1.0.

1.0
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_move_to_liquid

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIMoveToPOI

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(poi_type, speed_multiplier=1.0, *control_flags)

Allows the mob to move to a POI if able to.

Parameters:

Name Type Description Default
poi_type Literal[bed, jobsite, meeting_area]

Tells the goal what POI type it should be looking for.

required
speed_multiplier float

Movement speed multiplier of the mob when using this goal. Defaults to 1.0.

1.0
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_move_to_poi

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIMoveToRandomBlock

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(block_distance=16, speed_multiplier=1.0, within_radius=0.0)

Allows mob to move towards a random block.

Parameters:

Name Type Description Default
block_distance float

Defines the distance from the mob, in blocks, that the block to move to will be chosen. Defaults to 16.

16
speed_multiplier float

Description. Defaults to 1.0.

1.0
within_radius float

Defines the distance in blocks the mob has to be from the block for the movement to be finished. Defaults to 0.0.

0.0
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_move_to_random_block

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIMoveToVillage

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(cooldown_time=8.0, goal_radius=1.5, search_range=0, speed_multiplier=1.0, *control_flags)

Allows the mob to move into a random location within a village.

Parameters:

Name Type Description Default
cooldown_time Seconds

Time in seconds the mob has to wait before using the goal again. Defaults to 8.0.

8.0
goal_radius float

Distance 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. Defaults to 1.5.

1.5
search_range int

The distance in blocks to search for villages. If <= 0, find the closest village regardless of distance. Defaults to 0.

0
speed_multiplier float

Movement speed multiplier of the mob when using this goal. Defaults to 1.0.

1.0
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_move_to_village

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIMoveToWater

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(goal_radius=0.5, search_count=10, search_height=1, search_range=0, speed_multiplier=1)

Allows the mob to move back into water when on land.

Parameters:

Name Type Description Default
goal_radius float

Distance 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. Value must be > 0. Defaults to 0.5.

0.5
search_count int

The number of randomly selected blocks each tick that the mob will check within its search range and height for a valid block to move to. Defaults to 10.

10
search_height int

Height in blocks the mob will look for water to move towards Value must be > 0. Defaults to 1.

1
search_range int

The distance in blocks it will look for water to move towards Value must be > 0. Defaults to 0.

0
speed_multiplier float

Movement speed multiplier of the mob when using this goal. Defaults to 1.

1
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_move_to_water

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIMoveTowardsDwellingRestriction

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(speed_multiplier=1.0)

Allows entities with the "minecraft:dweller" component to move toward their village area that the entity should be restricted to.

Parameters:

Name Type Description Default
speed_multiplier float

This multiplier modifies the entity's speed when moving towards its restriction. Defaults to 1.0.

1.0
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_move_towards_dwelling_restriction

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIMoveTowardsHomeRestriction

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(speed_multiplier=1.0, *control_flags)

Allows entities with a minecraft:home component to move towards their home position. If restriction_radius is set, entities will be able to run this behavior only if outside of it.

Parameters:

Name Type Description Default
speed_multiplier float

This multiplier modifies the entity's speed when moving towards its restriction. Defaults to 1.0.

1.0
Note

Requires minecraft:home in order to work properly.

Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_move_towards_home_restriction

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIMoveTowardsRestriction

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(speed_multiplier=1.0, *control_flags)

AI goal that drives entities back toward their designated home area when they've wandered too far. Works with components like minecraft:home to define the restriction zone. Used for village-bound mobs, territorial creatures, or any entity that should patrol or return to a specific location.

Parameters:

Name Type Description Default
speed_multiplier float

This multiplier modifies the entity's speed when moving towards its restriction. Defaults to 1.0.

1.0
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_move_towards_restriction

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIMoveTowardsTarget

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(within_radius=0.0, speed_multiplier=1.0)

Allows mob to move towards its current target.

Parameters:

Name Type Description Default
within_radius float

Defines the radius in blocks that the mob tries to be from the target. A value of 0 means it tries to occupy the same block as the target. Defaults to 0.0.

0.0
speed_multiplier float

Description. Defaults to 1.0.

1.0
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_move_towards_target

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAINap

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(can_nap_filters=None, cooldown_max=0.0, cooldown_min=0.0, mob_detect_dist=6.0, mob_detect_height=6.0, wake_mob_exceptions=None)

Allows mobs to occassionally stop and take a nap under certain conditions.

Parameters:

Name Type Description Default
can_nap_filters Filter

Conditions that need to be met for the entity to nap. Defaults to None.

None
cooldown_max Seconds

Maximum time in seconds the mob has to wait before using the goal again. Defaults to 0.0.

0.0
cooldown_min Seconds

Minimum time in seconds the mob has to wait before using the goal again. Defaults to 0.0.

0.0
mob_detect_dist float

The block distance in x and z that will be checked for mobs that this mob detects. Defaults to 6.0.

6.0
mob_detect_height float

The block distance in y that will be checked for mobs that this mob detects. Defaults to 6.0.

6.0
wake_mob_exceptions Filter

Filters for mobs that will not wake this entity from napping. Defaults to None.

None
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_nap

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAINearestAttackableTarget

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(attack_interval=0, attack_interval_min=0, attack_owner=False, must_reach=False, must_see=False, must_see_forget_duration=3.0, persist_time=0.0, reselect_targets=False, scan_interval=10, set_persistent=False, target_invisible_multiplier=0.7, target_search_height=-0.1, target_sneak_visibility_multiplier=0.8, within_radius=0.0, target_acquisition_probability=1.0)

Allows an entity to attack the closest target within a given subset of specific target types.

Parameters:

Name Type Description Default
attack_interval tuple[float, float] | float

String. Defaults to 0.

0
attack_interval_min int

String. Defaults to 0.

0
attack_owner bool

If true, this entity can attack its owner. Defaults to False.

False
must_reach bool

If true, this entity requires a path to the target. Defaults to False.

False
must_see bool

If true, the mob has to be visible to be a valid choice. Defaults to False.

False
must_see_forget_duration float

Determines 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. Defaults to 3.0.

3.0
persist_time float

Time (in seconds) this entity can continue attacking the target after the target is no longer valid. Defaults to 0.0.

0.0
reselect_targets bool

Allows the attacking entity to update the nearest target, otherwise a target is only reselected after each "scan_interval" or "attack_interval". Defaults to False.

False
scan_interval int

If "attack_interval" is 0 or isn't declared, then between attacks: scanning for a new target occurs every amount of ticks equal to "scan_interval", minimum value is 1. Defaults to 10.

10
set_persistent bool

Allows the actor to be set to persist upon targeting a player. Defaults to False.

False
target_invisible_multiplier float

Multiplied with the target's armor coverage percentage to modify "max_dist" when detecting an invisible target. Defaults to 0.7.

0.7
target_search_height float

Maximum vertical target-search distance, if it's greater than the target type's "max_dist". A negative value defaults to "entity_types" greatest "max_dist". Value must be >= -1. Defaults to -0.1.

-0.1
target_sneak_visibility_multiplier float

Multiplied with the target type's "max_dist" when trying to detect a sneaking target. Defaults to 0.8.

0.8
within_radius float

Maximum distance this entity can be from the target when following it, otherwise the target becomes invalid. This value is only used if the entity doesn't declare "minecraft:follow_range". Defaults to 0.0.

0.0
target_acquisition_probability float

Probability (0.0 to 1.0) that this entity will accept a found target. Checked each time a valid target is found during scanning. Defaults to 1.0.

1.0
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_nearest_attackable_target

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAINearestPrioritizedAttackableTarget

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(attack_interval=0, attack_interval_min=0, attack_owner=False, must_reach=False, must_see=False, must_see_forget_duration=3.0, persist_time=0.0, reevaluate_description=False, reselect_targets=False, scan_interval=10, set_persistent=False, target_invisible_multiplier=0.7, target_search_height=-0.1, target_sneak_visibility_multiplier=0.8, within_radius=0.0)

Allows the mob to check for and pursue the nearest valid target.

Parameters:

Name Type Description Default
attack_interval int

Time in seconds before selecting a target. Defaults to 0.

0
attack_interval_min int

Time in seconds before selecting a target. Defaults to 0.

0
attack_owner bool

Description. Defaults to False.

False
must_reach bool

If true, only entities that this mob can path to can be selected as targets. Defaults to False.

False
must_see bool

If true, the mob has to be visible to be a valid choice. Defaults to False.

False
must_see_forget_duration float

Determines 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. Defaults to 3.0.

3.0
persist_time float

Time in seconds for a valid target to stay targeted when it becomes and invalid target. Defaults to 0.0.

0.0
reevaluate_description bool

If true, the mob will stop being targeted if it stops meeting any conditions. Defaults to False.

False
reselect_targets bool

If true, the target will change to the current closest entity whenever a different entity is closer. Defaults to False.

False
scan_interval int

How many ticks to wait between scanning for a target. Defaults to 10.

10
set_persistent bool

Allows the actor to be set to persist upon targeting a player. Defaults to False.

False
target_invisible_multiplier float

Description. Defaults to 0.7.

0.7
target_search_height float

Height in blocks to search for a target mob. -1.0f means the height does not matter. Defaults to -0.1.

-0.1
target_sneak_visibility_multiplier float

Description. Defaults to 0.8.

0.8
within_radius float

Distance in blocks that the target can be within to launch an attack. Defaults to 0.0.

0.0
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_nearest_prioritized_attackable_target

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIOcelotAttack

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(cooldown_time=1, max_distance=15, max_sneak_range=15, max_sprint_range=4, reach_multiplier=2, sneak_speed_multiplier=0.6, sprint_speed_multiplier=1.33, walk_speed_multiplier=0.8, x_max_rotation=30, y_max_head_rotation=30)

Controls specific attack behavior for Ocelots.

Parameters:

Name Type Description Default
cooldown_time int

Time (in seconds) between attacks. Value must be > 0. Defaults to 1.

1
max_distance int

Max distance from the target, this entity will use this attack behavior. Value must be > 0. Defaults to 15.

15
max_sneak_range int

Max distance from the target, this entity starts sneaking. Value must be > 0. Defaults to 15.

15
max_sprint_range int

Max distance from the target, this entity starts sprinting (sprinting takes priority over sneaking). Value must be > 0. Defaults to 4.

4
reach_multiplier int

Used with the base size of the entity to determine minimum target-distance before trying to deal attack damage. Value must be > 0. Defaults to 2.

2
sneak_speed_multiplier float

Modifies the attacking entity's movement speed while sneaking. Value must be > 0. Defaults to 0.6.

0.6
sprint_speed_multiplier float

Modifies the attacking entity's movement speed while sprinting. Value must be > 0. Defaults to 1.33.

1.33
walk_speed_multiplier float

Modifies the attacking entity's movement speed when not sneaking or sprinting, but still within attack range. Value must be > 0. Defaults to 0.8.

0.8
x_max_rotation int

Maximum rotation (in degrees), on the X-axis, this entity can rotate while trying to look at the target. Value must be > 0. Defaults to 30.

30
y_max_head_rotation int

Maximum rotation (in degrees), on the Y-axis, this entity's head can rotate while trying to look at the target. Value must be > 0. Defaults to 30.

30
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_ocelotattack

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIOcelotSitOnBlock

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(speed_multiplier=1.0, *control_flags)

Allows to mob to be able to sit in place like the ocelot.

Parameters:

Name Type Description Default
speed_multiplier float

Movement speed multiplier of the mob when using this goal. Defaults to 1.0.

1.0
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_ocelot_sit_on_block

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIOfferFlower

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(chance_to_start=0.0001250000059371814, filters=None, max_head_rotation_y=30.0, max_offer_flower_duration=20.0, max_rotation_x=30.0, search_area=(6, 2, 6), *control_flags)

Allows the mob to offer a flower to another mob with the minecraft:take_flower behavior.

Parameters:

Name Type Description Default
chance_to_start float

Percent chance that the mob will start this goal from 0.0 to 1.0 (where 1.0 = 100%). Value must be <= 1. Defaults to 0.0001250000059371814.

0.0001250000059371814
filters Filter

Conditions that need to be met for the behavior to start. Defaults to None.

None
max_head_rotation_y float

Maximum rotation (in degrees), on the Y-axis, this entity can rotate its head while trying to look at the target. Defaults to 30.0.

30.0
max_offer_flower_duration Seconds

The max amount of time (in seconds) that the mob will offer the flower for before exiting the Goal. Defaults to 20.0.

20.0
max_rotation_x float

Maximum rotation (in degrees), on the X-axis, this entity can rotate while trying to look at the target. Defaults to 30.0.

30.0
search_area Coordinates

The dimensions of the AABB used to search for a potential mob to offer flower to. Defaults to (6, 2, 6).

(6, 2, 6)
Note

Requires a flower item to be held by the entity.

Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_offer_flower

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIOpenDoor

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(close_door_after=True)

Allows the mob to open doors. Requires the mob to be able to path through doors, otherwise the mob won't even want to try opening them.

Parameters:

Name Type Description Default
close_door_after bool

If true, the mob will close the door after opening it and going through it. Defaults to True.

True
Note

Requires the mob to be able to path through doors, otherwise the mob will not try opening them.

Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_open_door

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIOwnerHurtByTarget

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(entity_types=None, cooldown=0, filters=None, max_dist=16, must_see=False, must_see_forget_duration=3.0, reevaluate_description=False, sprint_speed_multiplier=1.0, walk_speed_multiplier=1.0)

Allows the mob to target another mob that hurts their owner.

Parameters:

Name Type Description Default
entity_types Filter

List of entity types that this mob can target if they hurt their owner. Defaults to None.

None
cooldown Seconds

Description. Defaults to 0.

0
filters Filter

Description. Defaults to None.

None
max_dist int

Description. Defaults to 16.

16
must_see bool

Description. Defaults to False.

False
must_see_forget_duration float

Description. Defaults to 3.0.

3.0
reevaluate_description bool

If true, the targeting entity will continuously reevaluate the target and stop attacking if the target no longer meets the filter conditions. Defaults to False.

False
sprint_speed_multiplier float

Description. Defaults to 1.0.

1.0
walk_speed_multiplier float

Description. Defaults to 1.0.

1.0
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_owner_hurt_by_target

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIOwnerHurtTarget

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(entity_types=None, cooldown=0, filters=None, max_dist=16, must_see=False, must_see_forget_duration=3.0, reevaluate_description=False, sprint_speed_multiplier=1.0, walk_speed_multiplier=1.0)

Allows the mob to target a mob that is hurt by their owner.

Parameters:

Name Type Description Default
entity_types Filter

List of entity types that this entity can target if the potential target is hurt by this mob's owner. Defaults to None.

None
cooldown Seconds

The amount of time in seconds that the mob has to wait before selecting a target of the same type again. Defaults to 0.

0
filters Filter

Conditions that make this entry in the list valid. Defaults to None.

None
max_dist int

Maximum distance this mob can be away to be a valid choice. Defaults to 16.

16
must_see bool

If true, the mob has to be visible to be a valid choice. Defaults to False.

False
must_see_forget_duration float

Determines 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. Defaults to 3.0.

3.0
reevaluate_description bool

If true, the mob will stop being targeted if it stops meeting any conditions. Defaults to False.

False
sprint_speed_multiplier float

Multiplier for the running speed. A value of 1.0 means the speed is unchanged. Defaults to 1.0.

1.0
walk_speed_multiplier float

Multiplier for the walking speed. A value of 1.0 means the speed is unchanged. Defaults to 1.0.

1.0
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_owner_hurt_target

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIPanic

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(damage_sources=DamageCause.All, force=False, ignore_mob_damage=False, panic_sound=None, prefer_water=False, sound_interval=0, speed_multiplier=1.0)

Allows the mob to enter the panic state, which makes it run around and away from the damage source that made it enter this state.

Parameters:

Name Type Description Default
damage_sources DamageCause

The list of Entity Damage Sources that will cause this mob to panic. Defaults to DamageCause.All.

All
force bool

If true, this mob will not stop panicking until it can't move anymore or the goal is removed from it. Defaults to False.

False
ignore_mob_damage bool

If true, the mob will not panic in response to damage from other mobs. This overrides the damage types in "damage_sources". Defaults to False.

False
panic_sound str

Description. Defaults to None.

None
prefer_water bool

If true, the mob will prefer water over land. Defaults to False.

False
sound_interval float

Description. Defaults to 0.

0
speed_multiplier float

Movement speed multiplier of the mob when using this AI Goal. Defaults to 1.0.

1.0
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_panic

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIPetSleepWithOwner

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(goal_radius=0.5, search_height=1, search_range=0, speed_multiplier=1.0)

Allows the pet mob to move onto a bed with its owner while sleeping.

Parameters:

Name Type Description Default
goal_radius float

Distance 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. Defaults to 0.5.

0.5
search_height int

Height in blocks from the owner the pet can be to sleep with owner. Defaults to 1.

1
search_range int

The distance in blocks from the owner the pet can be to sleep with owner. Defaults to 0.

0
speed_multiplier float

Movement speed multiplier of the mob when using this AI Goal. Defaults to 1.0.

1.0
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_pet_sleep_with_owner

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIPickupItems

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(can_pickup_any_item=False, can_pickup_to_hand_or_equipment=True, cooldown_after_being_attacked=0.0, excluded_items=[], goal_radius=0.5, max_dist=0.0, pickup_based_on_chance=False, pickup_same_items_as_in_hand=False, search_height=0.0, speed_multiplier=1.0, track_target=False)

Allows the mob to pick up items on the ground.

Parameters:

Name Type Description Default
can_pickup_any_item bool

If true, the mob can pickup any item. Defaults to False.

False
can_pickup_to_hand_or_equipment bool

If true, the mob can pickup items to its hand or armor slots. Defaults to True.

True
cooldown_after_being_attacked float

Description. Defaults to 0.0.

0.0
excluded_items list[str]

List of items this mob will not pick up. Defaults to [].

[]
goal_radius float

Distance 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. Defaults to 0.5.

0.5
max_dist float

Maximum distance this mob will look for items to pick up. Defaults to 0.0.

0.0
pickup_based_on_chance bool

If true, depending on the difficulty, there is a random chance that the mob may not be able to pickup items. Defaults to False.

False
pickup_same_items_as_in_hand bool

If true, the mob will only pick up items that match what it is already holding. Defaults to False.

False
search_height float

Description. Defaults to 0.0.

0.0
speed_multiplier float

Movement speed multiplier of the mob when using this AI Goal. Defaults to 1.0.

1.0
track_target bool

If true, this mob will chase after the target as long as it's a valid target. Defaults to False.

False
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_pickup_items

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIPlaceBlock

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(affected_by_griefing_rule=False, can_place=None, chance=0.0, placeable_carried_blocks=[], xz_range=(0, 0), y_range=(0, 0))

AI goal that makes entities place blocks into the world, like Endermen placing their carried block or snow golems leaving snow trails. Configure which blocks can be placed, where they can be placed, and how often the entity attempts placement. Creates mobs that modify the environment.

Parameters:

Name Type Description Default
affected_by_griefing_rule bool

If true, whether the goal is affected by the mob griefing game rule. Defaults to False.

False
can_place Filter

Filters for if the entity should try to place its block. Self and Target are set. Defaults to None.

None
chance float

Chance each tick for the entity to try and place a block. Defaults to 0.0.

0.0
placeable_carried_blocks list[MinecraftBlockDescriptor]

Block descriptors for which blocks are valid to be placed from the entity's carried item, if empty all blocks are valid. Defaults to [].

[]
xz_range Vector2D

XZ range from which the entity will try and place blocks in. Defaults to (0, 0).

(0, 0)
y_range Vector2D

Y range from which the entity will try and place blocks in. Defaults to (0, 0).

(0, 0)
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_place_block

__iter__()

Iterates over the component's fields.

on_place(event, target=FilterSubject.Self)

Sets the event to be triggered when the entity successfully places a block.

Parameters:

Name Type Description Default
event str

The name of the event to trigger.

required
target FilterSubject

The target of the event. Defaults to FilterSubject.Self.

Self

Returns:

Name Type Description
self

Returns the current instance for method chaining.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

randomly_placeable_block(block, filter, states=None)

Sets the block that the entity can randomly place.

Parameters:

Name Type Description Default
block MinecraftBlockDescriptor

The block descriptor for which the block should be randomly placed.

required
filter Filter

The filter that determines when the block can be placed.

required
states dict[str, Any]

The states of the block to be placed.

None

Returns:

Name Type Description
self

Returns the current instance for method chaining.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIPlay

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(chance_to_start=0.0, follow_distance=2, friend_search_area=(6, 3, 6), friend_types=None, max_play_duration_seconds=50.0, random_pos_search_height=3, random_pos_search_range=16, speed_multiplier=1.0)

Allows the mob to offer a flower to another mob with the minecraft:take_flower behavior.

Parameters:

Name Type Description Default
chance_to_start float

Percent chance that the mob will start this goal, from 0 to 1. Value must be <= 1. Defaults to 0.0.

0.0
follow_distance int

The distance (in blocks) that the mob tries to be in range of the friend it's following. Defaults to 2.

2
friend_search_area Coordinates

The dimensions of the AABB used to search for a potential friend to play with. Defaults to (6, 3, 6).

(6, 3, 6)
friend_types Filter

The entity type(s) to consider when searching for a potential friend to play with. Defaults to None.

None
max_play_duration_seconds float

The max amount of seconds that the mob will play for before exiting the Goal. Defaults to 50.0.

50.0
random_pos_search_height int

The height (in blocks) that the mob will search within to find a random position position to move to. Must be at least 1. Value must be >= 1. Defaults to 3.

3
random_pos_search_range int

The distance (in blocks) on ground that the mob will search within to find a random position to move to. Must be at least 1. Value must be >= 1. Defaults to 16.

16
speed_multiplier float

Movement speed multiplier of the mob when using this AI Goal. Defaults to 1.0.

1.0
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_play

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIPlayDead

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(apply_regeneration=False, damage_sources=None, duration=1.0, filters=None, force_below_health=0, random_damage_range=(0, 0), random_start_chance=1.0, *control_flags)

Allows this entity to pretend to be dead to avoid being targeted by attackers.

Parameters:

Name Type Description Default
apply_regeneration bool

Whether the mob will receive the regeneration effect while playing dead. Defaults to False.

False
damage_sources list[DamageCause]

The list of Entity Damage Sources that will cause this mob to play dead. Defaults to None.

None
duration Seconds

The amount of time the mob will remain playing dead (in seconds). Defaults to 1.0.

1.0
filters Filter

The list of other triggers that are required for the mob to activate play dead. Defaults to None.

None
force_below_health int

The amount of health at which damage will cause the mob to play dead. Defaults to 0.

0
random_damage_range tuple[int, int]

The range of damage that may cause the goal to start depending on randomness. Defaults to (0, 0).

(0, 0)
random_start_chance float

The likelihood of this goal starting upon taking damage. Defaults to 1.0.

1.0
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_play_dead

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIPlayerRideTamed

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

Allows the mob to be ridden by the player after being tamed.

Parameters:

Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_player_ride_tamed

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIRaidGarden

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(blocks=(), eat_delay=2, full_delay=100, goal_radius=0.5, initial_eat_delay=0, max_to_eat=6, search_height=1, search_range=0, speed_multiplier=1.0, *control_flags)

Allows the mob to eat/raid crops out of farms until they are full.

Parameters:

Name Type Description Default
blocks list[MinecraftBlockDescriptor | Identifier] | tuple[MinecraftBlockDescriptor | Identifier, ...]

Blocks that the mob is looking for to eat/raid. Defaults to ().

()
eat_delay int

Time in seconds between each time it eats/raids. Defaults to 2.

2
full_delay int

Amount of time in seconds before this mob wants to eat/raid again after eating its maximum. Defaults to 100.

100
goal_radius float

Distance 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. Value must be > 0. Defaults to 0.5.

0.5
initial_eat_delay int

Time in seconds before starting to eat/raid once it arrives at it. Defaults to 0.

0
max_to_eat int

Maximum number of crops this entity wants to eat/raid. If set to zero or less then it doesn't have a maximum. Defaults to 6.

6
search_height int

Height in blocks the mob will look for crops to eat Value must be > 0. Defaults to 1.

1
search_range int

Distance in blocks the mob will look for crops to eat Value must be > 0. Defaults to 0.

0
speed_multiplier float

Movement speed multiplier of the mob when using this goal. Defaults to 1.0.

1.0
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_raid_garden

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIRamAttack

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(baby_knockback_modifier=0.333333, cooldown_range=[10, 20], knockback_force=5, knockback_height=0.1, min_ram_distance=0.0, pre_ram_sound=None, ram_distance=0.0, ram_impact_sound=None, ram_speed=2.0, run_speed=1.0)

Allows this entity to damage a target by using a running attack.

Parameters:

Name Type Description Default
baby_knockback_modifier float

The modifier to knockback that babies have. Defaults to 0.333333.

0.333333
cooldown_range list[int, int]

Minimum and maximum cooldown time-range (positive, in seconds) between each attempted ram attack. Defaults to [10, 20].

[10, 20]
knockback_force float

The force of the knockback of the ram attack. Defaults to 5.

5
knockback_height float

The height of the knockback of the ram attack. Defaults to 0.1.

0.1
min_ram_distance float

The minimum distance at which the mob can start a ram attack. Defaults to 0.0.

0.0
pre_ram_sound str

The sound to play when an entity is about to perform a ram attack. Defaults to None.

None
ram_distance float

The distance at which the mob start to run with ram speed. Defaults to 0.0.

0.0
ram_impact_sound str

The sound to play when an entity is impacting on a ram attack. Defaults to None.

None
ram_speed float

Sets the entity's speed when charging toward the target. Defaults to 2.0.

2.0
run_speed float

Sets the entity's speed when running toward the target. Defaults to 1.0.

1.0
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_ram_attack

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIRandomBreach

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(interval=120, speed_multiplier=1.0, xz_dist=10, y_dist=7, cooldown_time=10)

Allows the mob to randomly break surface of the water.

Parameters:

Name Type Description Default
interval int

A random value to determine when to randomly move somewhere. This has a 1/interval chance to choose this goal. Defaults to 120.

120
speed_multiplier float

Movement speed multiplier of the mob when using this AI Goal. Defaults to 1.0.

1.0
xz_dist int

Distance in blocks on ground that the mob will look for a new spot to move to. Must be at least 1. Defaults to 10.

10
y_dist int

Distance in blocks that the mob will look up or down for a new spot to move to. Must be at least 1. Defaults to 7.

7
cooldown_time Seconds

Time in seconds the mob has to wait before using the goal again. Defaults to 10.

10
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_random_breach

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIRandomFly

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(avoid_damage_blocks=False, can_land_on_trees=True, speed_multiplier=1.0, xz_dist=10, y_dist=7, y_offset=0.0)

Allows a mob to randomly fly around.

Parameters:

Name Type Description Default
avoid_damage_blocks bool

If true, the mob will avoid blocks that cause damage when flying. Defaults to False.

False
can_land_on_trees bool

If true, the mob can stop flying and land on a tree instead of the ground. Defaults to True.

True
speed_multiplier float

Movement speed multiplier of the mob when using this AI Goal. Defaults to 1.0.

1.0
xz_dist int

Distance in blocks on ground that the mob will look for a new spot to move to. Must be at least 1. Defaults to 10.

10
y_dist int

Distance in blocks that the mob will look up or down for a new spot to move to. Must be at least 1. Defaults to 7.

7
y_offset float

Description. Defaults to 0.0.

0.0
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_random_fly

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIRandomHover

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(hover_height=(0.0, 0.0), interval=120, speed_multiplier=1.0, xz_dist=10, y_dist=7, y_offset=0.0)

Allows the mob to hover around randomly, close to the surface.

Parameters:

Name Type Description Default
hover_height tuple[float, float]

The height above the surface which the mob will try to maintain. Defaults to (0.0, 0.0).

(0.0, 0.0)
interval int

A random value to determine when to randomly move somewhere. This has a 1/interval chance to choose this goal. Defaults to 120.

120
speed_multiplier float

Movement speed multiplier of the mob when using this AI Goal. Defaults to 1.0.

1.0
xz_dist int

Distance in blocks on ground that the mob will look for a new spot to move to. Must be at least 1. Defaults to 10.

10
y_dist int

Distance in blocks that the mob will look up or down for a new spot to move to. Must be at least 1. Defaults to 7.

7
y_offset float

Height in blocks to add to the selected target position. Defaults to 0.0.

0.0
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_random_hover

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIRandomLookAround

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(angle_of_view_horizontal=360, angle_of_view_vertical=360, look_distance=8.0, look_time=(2, 4), probability=0.02, target_distance=0.6)

Allows the mob to randomly look around.

Parameters:

Name Type Description Default
angle_of_view_horizontal int

Description. Defaults to 360.

360
angle_of_view_vertical int

Description. Defaults to 360.

360
look_distance float

Description. Defaults to 8.0.

8.0
look_time tuple[int, int]

The range of time in seconds the mob will stay looking in a random direction before looking elsewhere. Defaults to (2, 4).

(2, 4)
probability float

Description. Defaults to 0.02.

0.02
target_distance float

Description. Defaults to 0.6.

0.6
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_random_look_around

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIRandomLookAroundAndSit

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(continue_if_leashed=False, continue_sitting_on_reload=False, max_angle_of_view_horizontal=30.0, max_look_count=2, max_look_time=40, min_angle_of_view_horizontal=-30.0, min_look_count=1, min_look_time=20, probability=0.02, random_look_around_cooldown=0.0)

Allows the mob to randomly sit and look around for a duration. Note: Must have a sitting animation set up to use this.

Parameters:

Name Type Description Default
continue_if_leashed bool

If the goal should continue to be used as long as the mob is leashed. Defaults to False.

False
continue_sitting_on_reload bool

The mob will stay sitting on reload. Defaults to False.

False
max_angle_of_view_horizontal float

The rightmost angle a mob can look at on the horizontal plane with respect to its initial facing direction. Defaults to 30.0.

30.0
max_look_count int

The max amount of unique looks a mob will have while looking around. Defaults to 2.

2
max_look_time int

The max amount of time (in ticks) a mob will stay looking at a direction while looking around. Defaults to 40.

40
min_angle_of_view_horizontal float

The leftmost angle a mob can look at on the horizontal plane with respect to its initial facing direction. Defaults to -30.0.

-30.0
min_look_count int

The min amount of unique looks a mob will have while looking around. Defaults to 1.

1
min_look_time int

The min amount of time (in ticks) a mob will stay looking at a direction while looking around. Defaults to 20.

20
probability float

The probability of randomly looking around/sitting. Defaults to 0.02.

0.02
random_look_around_cooldown Seconds

The cooldown in seconds before the goal can be used again. Defaults to 0.0.

0.0
Note

Must have a sitting animation set up to use this.

Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_random_look_around_and_sit

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIRandomSearchAndDig

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(cooldown_range=(0, 0), digging_duration_range=(0, 0), find_valid_position_retries=0, goal_radius=1.5, item_table=None, search_range_xz=0, search_range_y=0, spawn_item_after_seconds=0, spawn_item_pos_offset=0, speed_multiplier=0, target_blocks=[], target_dig_position_offset=2.25)

Allows this entity to locate a random target block that it can path find to. Once found, the entity will move towards it and dig up an item. [Default target block types: Dirt, Grass, Podzol, DirtWithRoots, MossBlock, Mud, MuddyMangroveRoots].

Parameters:

Name Type Description Default
cooldown_range tuple[Seconds, Seconds]

Goal cooldown range in seconds. Defaults to (0, 0).

(0, 0)
digging_duration_range tuple[Seconds, Seconds]

Digging duration in seconds. Defaults to (0, 0).

(0, 0)
find_valid_position_retries int

Amount of retries to find a valid target position within search range. Defaults to 0.

0
goal_radius float

Distance in blocks within the entity to considers it has reached it's target position. Defaults to 1.5.

1.5
item_table str

File path relative to the resource pack root for items to spawn list (loot table format). Defaults to None.

None
search_range_xz float

Width and length of the volume around the entity used to find a valid target position. Defaults to 0.

0
search_range_y float

Height of the volume around the entity used to find a valid target position. Defaults to 0.

0
spawn_item_after_seconds Seconds

Digging duration before spawning item in seconds. Defaults to 0.

0
spawn_item_pos_offset float

Distance to offset the item's spawn location in the direction the mob is facing. Defaults to 0.

0
speed_multiplier float

Searching movement speed multiplier. Defaults to 0.

0
target_blocks list[str]

List of target block types the goal will look to dig on. Overrides the default list. Defaults to [].

[]
target_dig_position_offset float

Dig target position offset from the feet position of the mob in their facing direction. Defaults to 2.25.

2.25
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_random_search_and_dig

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIRandomSitting

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(cooldown_time=0, min_sit_time=10, start_chance=0.1, stop_chance=0.3)

Allows the mob to randomly sit for a duration.

Parameters:

Name Type Description Default
cooldown_time float

Time in seconds the mob has to wait before using the goal again. Defaults to 0.

0
min_sit_time float

The minimum amount of time in seconds before the mob can stand back up. Defaults to 10.

10
start_chance float

This is the chance that the mob will start this goal, from 0 to 1. Defaults to 0.1.

0.1
stop_chance float

This is the chance that the mob will stop this goal, from 0 to 1. Defaults to 0.3.

0.3
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_random_sitting

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIRandomStroll

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(interval=120, speed_multiplier=1.0, xz_dist=10, y_dist=7)

Allows a mob to randomly stroll around.

Parameters:

Name Type Description Default
interval int

A random value to determine when to randomly move somewhere. This has a 1/interval chance to choose this goal. Defaults to 120.

120
speed_multiplier float

Movement speed multiplier of the mob when using this AI Goal. Defaults to 1.0.

1.0
xz_dist int

Distance in blocks on ground that the mob will look for a new spot to move to. Must be at least 1. Defaults to 10.

10
y_dist int

Distance in blocks that the mob will look up or down for a new spot to move to. Must be at least 1. Defaults to 7.

7
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_random_stroll

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIRandomSwim

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(avoid_surface=True, interval=120, speed_multiplier=1.0, xz_dist=10, y_dist=7)

Allows an entity to randomly move through water.

Parameters:

Name Type Description Default
avoid_surface bool

If true, the mob will avoid surface water blocks by swimming below them. Defaults to True.

True
interval int

A random value to determine when to randomly move somewhere. This has a 1/interval chance to choose this goal. Defaults to 120.

120
speed_multiplier float

Movement speed multiplier of the mob when using this AI Goal. Defaults to 1.0.

1.0
xz_dist int

Distance in blocks on ground that the mob will look for a new spot to move to. Must be at least 1. Defaults to 10.

10
y_dist int

Distance in blocks that the mob will look up or down for a new spot to move to. Must be at least 1. Defaults to 7.

7
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_random_swim

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIRangedAttack

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(attack_interval=0, attack_interval_max=0, attack_interval_min=0, attack_radius=0, attack_radius_min=0, burst_interval=0, burst_shots=1, charge_charged_trigger=0, charge_shoot_trigger=0, ranged_fov=90, set_persistent=False, speed_multiplier=1, swing=False, target_in_sight_time=1, x_max_rotation=30, y_max_head_rotation=30)

Allows an entity to attack by using ranged shots. "charge_shoot_trigger" must be greater than 0 to enable charged up burst-shot attacks. Requires minecraft:shooter to define projectile behaviour.

Parameters:

Name Type Description Default
attack_interval int

Alternative to "attack_interval_min" & "attack_interval_max". Consistent reload-time (in seconds), when not using a charged shot. Does not scale with target-distance. Defaults to 0.

0
attack_interval_max int

Maximum bound for reload-time range (in seconds), when not using a charged shot. Reload-time range scales with target-distance. Defaults to 0.

0
attack_interval_min int

Minimum bound for reload-time range (in seconds), when not using a charged shot. Reload-time range scales with target-distance. Defaults to 0.

0
attack_radius int

Minimum distance to target before this entity will attempt to shoot. Defaults to 0.

0
attack_radius_min int

Minimum distance the target can be for this mob to fire. If the target is closer, this mob will move first before firing. Defaults to 0.

0
burst_interval int

Time (in seconds) between each individual shot when firing a burst of shots from a charged up attack. Defaults to 0.

0
burst_shots int

Number of shots fired every time the attacking entity uses a charged up attack. Defaults to 1.

1
charge_charged_trigger int

Time (in seconds, then add "charge_shoot_trigger"), before a charged up attack is done charging. Charge-time decays while target is not in sight. Defaults to 0.

0
charge_shoot_trigger int

Amount of time (in seconds, then doubled) a charged shot must be charging before reloading burst shots. Charge-time decays while target is not in sight. Defaults to 0.

0
ranged_fov int

Field of view (in degrees) when using sensing to detect a target for attack. Defaults to 90.

90
set_persistent bool

Allows the actor to be set to persist upon targeting a player. Defaults to False.

False
speed_multiplier int

During attack behavior, this multiplier modifies the entity's speed when moving toward the target. Defaults to 1.

1
swing bool

If a swing animation (using variable.attack_time) exists, this causes the actor to swing their arm(s) upon firing the ranged attack. Defaults to False.

False
target_in_sight_time int

Minimum amount of time (in seconds) the attacking entity needs to see the target before moving toward it. Defaults to 1.

1
x_max_rotation int

Maximum rotation (in degrees), on the X-axis, this entity can rotate while trying to look at the target. Defaults to 30.

30
y_max_head_rotation int

Maximum rotation (in degrees), on the Y-axis, this entity can rotate its head while trying to look at the target. Defaults to 30.

30
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_ranged_attack

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIReceiveLove

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

Allows the villager to stop so another villager can breed with it. Can only be used by a Villager.

Parameters:

Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_receive_love

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIRestrictOpenDoor

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

Allows the mob to stay indoors during night time.

This component has no configurable constructor properties.

Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_restrict_open_door

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIRestrictSun

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

Allows the mob to automatically start avoiding the sun when its a clear day out.

This component has no configurable constructor properties.

Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_restrict_sun

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIRiseToLiquidLevel

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(liquid_y_offset=0.0, rise_delta=0.0, sink_delta=0.0)

Allows the mob to stay at a certain level when in liquid.

Parameters:

Name Type Description Default
liquid_y_offset float

Target distance down from the liquid surface. i.e. Positive values move the target Y down. Defaults to 0.0.

0.0
rise_delta float

Movement up in Y per tick when below the liquid surface. Defaults to 0.0.

0.0
sink_delta float

Movement down in Y per tick when above the liquid surface. Defaults to 0.0.

0.0
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_rise_to_liquid_level

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIRoar

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(duration=0.0)

Allows this entity to roar at another entity based on data in minecraft:anger_level. Once the anger threshold specified in minecraft:anger_level has been reached, this entity will roar for the specified amount of time, look at the other entity, apply anger boost towards it, and finally target it.

Parameters:

Name Type Description Default
duration Seconds

The amount of time to roar for. Defaults to 0.0.

0.0
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_roar

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIRoll

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(probability=None)

This allows the mob to roll forward.

Parameters:

Name Type Description Default
probability float

The probability that the mob will use the goal. Defaults to None.

None
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_roll

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIRunAroundLikeCrazy

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(speed_multiplier=1.0)

Allows the mob to run around aimlessly.

Parameters:

Name Type Description Default
speed_multiplier float

Movement speed multiplier of the mob when using this AI Goal. Defaults to 1.0.

1.0
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_run_around_like_crazy

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIScared

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(sound_interval=0)

Allows the a mob to become scared when the weather outside is thundering.

Parameters:

Name Type Description Default
sound_interval int

The interval in which a sound will play when active in a 1/delay chance to kick off. Defaults to 0.

0
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_scared

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAISendEvent

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

Allows the mob to send an event to another mob.

Parameters:

Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_send_event

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIShareItems

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(entity_types=None, goal_radius=0.5, max_dist=0.0, speed_multiplier=1.0)

Allows the mob to give items it has to others.

Parameters:

Name Type Description Default
entity_types Filter

List of entities this mob will share items with. Defaults to None.

None
goal_radius float

Distance 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. Defaults to 0.5.

0.5
max_dist float

Maximum distance this mob can be away to be a valid choice. Defaults to 0.0.

0.0
speed_multiplier float

Movement speed multiplier of the mob when using this AI Goal. Defaults to 1.0.

1.0
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_share_items

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAISilverfishMergeWithStone

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

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

Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_silverfish_merge_with_stone

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAISilverfishWakeUpFriends

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

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

Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_silverfish_wake_up_friends

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAISkeletonHorseTrap

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(duration=1.0, within_radius=0.0)

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.

Parameters:

Name Type Description Default
duration Seconds

Amount 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. Defaults to 1.0.

1.0
within_radius float

Distance in blocks that the player has to be within to trigger the horse trap. Defaults to 0.0.

0.0
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_skeleton_horse_trap

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAISleep

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(can_sleep_while_riding=False, cooldown_time=0.0, goal_radius=None, sleep_collider_height=1.0, sleep_collider_width=1.0, sleep_y_offset=1.0, speed_multiplier=1.0, timeout_cooldown=8.0)

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

Parameters:

Name Type Description Default
can_sleep_while_riding bool

If true, the mob will be able to use the sleep goal if riding something. Defaults to False.

False
cooldown_time float

Time in seconds the mob has to wait before using the goal again. Defaults to 0.0.

0.0
goal_radius float

Description. Defaults to None.

None
sleep_collider_height float

The height of the mob's collider while sleeping. Defaults to 1.0.

1.0
sleep_collider_width float

The width of the mob's collider while sleeping. Defaults to 1.0.

1.0
sleep_y_offset float

The y offset of the mob's collider while sleeping. Defaults to 1.0.

1.0
speed_multiplier float

Movement speed multiplier of the mob when using this goal. Defaults to 1.0.

1.0
timeout_cooldown float

The cooldown time in seconds before the goal can be reused after a internal failure or timeout condition. Defaults to 8.0.

8.0
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_sleep

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAISlimeAttack

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(grow_tired_cooldown_time=15.0, set_persistent=False, speed_multiplier=1.0, x_max_rotation=10.0, y_max_rotation=10.0, *control_flags)

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

Parameters:

Name Type Description Default
grow_tired_cooldown_time Seconds

Cooldown in seconds before the entity can grow tired again. Defaults to 15.0.

15.0
set_persistent bool

Allows the actor to be set to persist upon targeting a player. Defaults to False.

False
speed_multiplier float

During attack behavior, this multiplier modifies the entity's speed when moving toward the target. Defaults to 1.0.

1.0
x_max_rotation float

Maximum rotation (in degrees), on the X-axis, this entity can rotate while trying to look at the target. Defaults to 10.0.

10.0
y_max_rotation float

Maximum rotation (in degrees), on the Y-axis, this entity can rotate while trying to look at the target. Defaults to 10.0.

10.0
Note

Requires a target-producing behavior, minecraft:attack, and minecraft:variant.

Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_slime_attack

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAISlimeFloat

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(jump_chance_percentage=0.800000011920929, speed_multiplier=1.2000000476837158, *control_flags)

Allow slimes to float in water / lava.

Parameters:

Name Type Description Default
jump_chance_percentage float

Percent chance a slime or magma cube has to jump while in water / lava. Defaults to 0.800000011920929.

0.800000011920929
speed_multiplier float

Determines the multiplier the entity's speed is modified by when moving through water / lava. Defaults to 1.2000000476837158.

1.2000000476837158
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_slime_float

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAISlimeKeepOnJumping

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(speed_multiplier=1.0)

Allows the entity to continuously jump around like a slime.

Parameters:

Name Type Description Default
speed_multiplier float

Determines the multiplier this entity's speed is modified by when jumping around. Defaults to 1.0.

1.0
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_slime_keep_on_jumping

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAISlimeRandomDirection

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(add_random_time_range=3, min_change_direction_time=2.0, turn_range=360, *control_flags)

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

Parameters:

Name Type Description Default
add_random_time_range int

Additional time (in whole seconds), chosen randomly in the range of [0, "add_random_time_range"], to add to "min_change_direction_time". Defaults to 3.

3
min_change_direction_time Seconds

Constant minimum time (in seconds) to wait before choosing a new direction. Defaults to 2.0.

2.0
turn_range int

Maximum rotation angle range (in degrees) when randomly choosing a new direction. Defaults to 360.

360
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_slime_random_direction

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAISnacking

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(items=(), snacking_cooldown=7.5, snacking_cooldown_min=0.5, snacking_stop_chance=0.0017)

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

Parameters:

Name Type Description Default
items list[MinecraftItemDescriptor | Identifier] | tuple[MinecraftItemDescriptor | Identifier, ...]

Items that we are interested in snacking on. Defaults to ().

()
snacking_cooldown Seconds

The cooldown time in seconds before the mob is able to snack again. Defaults to 7.5.

7.5
snacking_cooldown_min Seconds

The minimum time in seconds before the mob is able to snack again. Defaults to 0.5.

0.5
snacking_stop_chance float

This is the chance that the mob will stop snacking, from 0 to 1. Defaults to 0.0017.

0.0017
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_snacking

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAISneeze

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(cooldown_time=0.0, drop_item_chance=1.0, loot_table=None, prepare_sound=None, prepare_time=1.0, probability=0.02, sound=None, within_radius=0.0)

Allows the mob to stop and sneeze possibly startling nearby mobs and dropping an item.

Parameters:

Name Type Description Default
cooldown_time Seconds

Time in seconds the mob has to wait before using the goal again. Defaults to 0.0.

0.0
drop_item_chance float

The probability that the mob will drop an item when it sneezes. Defaults to 1.0.

1.0
loot_table LootTable | str

Loot table to select dropped items from. Defaults to None.

None
prepare_sound str

Sound to play when the sneeze is about to happen. Defaults to None.

None
prepare_time Seconds

The time in seconds that the mob takes to prepare to sneeze (while the prepare_sound is playing). Defaults to 1.0.

1.0
probability float

The probability of sneezing. A value of 1.00 is 100%. Defaults to 0.02.

0.02
sound str

Sound to play when the sneeze occurs. Defaults to None.

None
within_radius float

Distance in blocks that mobs will be startled. Defaults to 0.0.

0.0
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_sneeze

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAISniff

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(cooldown_range=(3.0, 10.0), duration=1.0, sniffing_radius=5.0, suspicion_radius_horizontal=3.0, suspicion_radius_vertical=3.0, *control_flags)

Allows this entity to detect the nearest player within "sniffing_radius" and update its "minecraft:suspect_tracking" component state.

Parameters:

Name Type Description Default
cooldown_range tuple[Seconds, Seconds]

Cooldown range between sniffs in seconds. Defaults to (3.0, 10.0).

(3.0, 10.0)
duration Seconds

Sniffing duration in seconds. Defaults to 1.0.

1.0
sniffing_radius float

Mob detection radius. Defaults to 5.0.

5.0
suspicion_radius_horizontal float

Mob suspicion horizontal radius. When a player is within this radius horizontally, the anger level towards that player is increased. Defaults to 3.0.

3.0
suspicion_radius_vertical float

Mob suspicion vertical radius. When a player is within this radius vertically, the anger level towards that player is increased Value must be >= 1. Defaults to 3.0.

3.0
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_sniff

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAISonicBoom

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(attack_cooldown=5.0, attack_damage=30.0, attack_range_horizontal=15.0, attack_range_vertical=20.0, attack_sound=None, charge_sound=None, duration=0.0, duration_until_attack_sound=1.7000000476837158, knockback_height_cap=0.0, knockback_horizontal_strength=0.0, knockback_vertical_strength=0.0, speed_multiplier=1.0, *control_flags)

Allows this entity to perform a 'sonic boom' ranged attack.

Parameters:

Name Type Description Default
attack_cooldown Seconds

Cooldown in seconds required after using this attack until the entity can use sonic boom again. Defaults to 5.0.

5.0
attack_damage float

Attack damage of the sonic boom. Defaults to 30.0.

30.0
attack_range_horizontal float

Horizontal range (in blocks) at which the sonic boom can damage the target. Defaults to 15.0.

15.0
attack_range_vertical float

Vertical range (in blocks) at which the sonic boom can damage the target. Defaults to 20.0.

20.0
attack_sound str

Sound event for the attack. Defaults to None.

None
charge_sound str

Sound event for the charge up. Defaults to None.

None
duration Seconds

Goal duration in seconds. Defaults to 0.0.

0.0
duration_until_attack_sound Seconds

Duration in seconds until the attack sound is played. Defaults to 1.7000000476837158.

1.7000000476837158
knockback_height_cap float

Height cap of the attack knockback's vertical delta. Defaults to 0.0.

0.0
knockback_horizontal_strength float

Horizontal strength of the attack's knockback applied to the attack target. Defaults to 0.0.

0.0
knockback_vertical_strength float

Vertical strength of the attack's knockback applied to the attack target. Defaults to 0.0.

0.0
speed_multiplier float

This multiplier modifies the attacking entity's speed when moving toward the target. Defaults to 1.0.

1.0
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_sonic_boom

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAISquidDive

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

Allows the squid to dive down in water.

Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_squid_dive

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAISquidFlee

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

Allows the squid to swim away.

Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_squid_flee

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAISquidIdle

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

Allows the squid to swim in place idly.

Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_squid_idle

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAISquidMoveAwayFromGround

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

Allows the squid to move away from ground blocks and back to water.

Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_squid_move_away_from_ground

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAISquidOutOfWater

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

Allows the squid to stick to the ground when outside water.

Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_squid_out_of_water

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIStalkAndPounceOnTarget

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(interest_time=2.0, leap_distance=0.8, leap_height=0.9, max_stalk_dist=10.0, pounce_max_dist=5.0, set_persistent=False, stalk_speed=1.2, strike_dist=2.0, stuck_blocks=None, stuck_time=2.0)

Allows a mob to stalk a target, then once within range pounce onto a target, on success the target will be attacked dealing damage defined by the attack component. On failure, the mob will risk getting stuck.

Parameters:

Name Type Description Default
interest_time Seconds

The amount of time the mob will be interested before pouncing. This happens when the mob is within range of pouncing. Defaults to 2.0.

2.0
leap_distance float

The distance in blocks the mob jumps in the direction of its target. Defaults to 0.8.

0.8
leap_height float

The height in blocks the mob jumps when leaping at its target. Defaults to 0.9.

0.9
max_stalk_dist float

The maximum distance away a target can be before the mob gives up on stalking. Defaults to 10.0.

10.0
pounce_max_dist float

The maximum distance away from the target in blocks to begin pouncing at the target. Defaults to 5.0.

5.0
set_persistent bool

Allows the actor to be set to persist upon targeting a player. Defaults to False.

False
stalk_speed float

The movement speed in which you stalk your target. Defaults to 1.2.

1.2
strike_dist float

The max distance away from the target when landing from the pounce that will still result in damaging the target. Defaults to 2.0.

2.0
stuck_blocks Filter

Block filter describing which landed-on blocks can cause the mob to get stuck. Defaults to None.

None
stuck_time Seconds

The amount of time the mob will be stuck if they fail and land on a block they can be stuck on. Defaults to 2.0.

2.0
Note

Requires a target-producing behavior and minecraft:attack.

Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_stalk_and_pounce_on_target

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIStayNearNoteblock

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(listen_time=30, speed=1.0, start_distance=10.0, stop_distance=2.0, *control_flags)

The entity will attempt to toss the items from its inventory to a nearby recently played noteblock.

Parameters:

Name Type Description Default
listen_time int

Sets the time an entity should stay near a noteblock after hearing it. Defaults to 30.

30
speed float

Sets the entity's speed when moving toward the block. Defaults to 1.0.

1.0
start_distance float

Sets the distance the entity needs to be away from the block to attempt to start the goal. Defaults to 10.0.

10.0
stop_distance float

Sets the distance from the block the entity will attempt to reach. Defaults to 2.0.

2.0
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_stay_near_noteblock

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIStayWhileSitting

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

Allows the mob to stay put while it is in a sitting state instead of doing something else.

Parameters:

Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_stay_while_sitting

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIStompAttack

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(attack_once=False, attack_types=[], cooldown_time=1, inner_boundary_time_increase=0.25, max_path_time=0.55, melee_fov=90, min_path_time=0.2, no_damage_range_multiplier=2, outer_boundary_time_increase=0.5, path_fail_time_increase=0.75, path_inner_boundary=16, path_outer_boundary=32, random_stop_interval=0, reach_multiplier=2, require_complete_path=False, set_persistent=False, speed_multiplier=1, stomp_range_multiplier=2, track_target=False, x_max_rotation=30, y_max_head_rotation=30)

Allows an entity to attack using stomp AoE damage behavior.

Parameters:

Name Type Description Default
attack_once bool

Allows the mob to perform this melee attack behavior only once during its lifetime. Defaults to False.

False
attack_types list[str]

Defines the entity types this entity will attack. Defaults to [].

[]
cooldown_time Seconds

Cooldown time, in seconds, between consecutive attacks. Defaults to 1.

1
inner_boundary_time_increase Seconds

Time, in seconds, added to the attack path recalculation interval when the target is beyond "path_inner_boundary". Defaults to 0.25.

0.25
max_path_time Seconds

Maximum base time, in seconds, before recalculating a new attack path to the target (before increases are applied). Defaults to 0.55.

0.55
melee_fov int

Description. Defaults to 90.

90
min_path_time Seconds

Minimum base time, in seconds, before recalculating a new attack path to the target (before increases are applied). Defaults to 0.2.

0.2
no_damage_range_multiplier float

Multiplied with the final AoE damage range to determine a no damage range. The stomp attack will go on cooldown if target is in this no damage range. Value must be > 0. Defaults to 2.

2
outer_boundary_time_increase Seconds

Time, in seconds, added to the attack path recalculation interval when the target is beyond "path_outer_boundary". Defaults to 0.5.

0.5
path_fail_time_increase Seconds

Time, in seconds, added to the attack path recalculation interval when the mob cannot move along the current path. Defaults to 0.75.

0.75
path_inner_boundary float

Distance at which to increase attack path recalculation by "inner_boundary_time_increase". Defaults to 16.

16
path_outer_boundary float

Distance at which to increase attack path recalculation by "outer_boundary_time_increase". Defaults to 32.

32
random_stop_interval int

Defines a 1-in-N chance for the mob to stop its current attack, where N equals "random_stop_interval". Defaults to 0.

0
reach_multiplier float

Used with the base size of the entity to determine minimum target-distance before trying to deal attack damage. Defaults to 2.

2
require_complete_path bool

Specifies whether a full navigation path from the mob to the target is required. Defaults to False.

False
set_persistent bool

Description. Defaults to False.

False
speed_multiplier float

Multiplier applied to the mob's movement speed when moving toward its target. Defaults to 1.

1
stomp_range_multiplier float

Multiplied with the base size of the entity to determine stomp AoE damage range. Value must be > 0. Defaults to 2.

2
track_target bool

Allows the mob to track its target even if it lacks a hard-coded sensing component. Defaults to False.

False
x_max_rotation int

Maximum rotation, in degrees, on the X-axis while the mob is trying to look at its target. Defaults to 30.

30
y_max_head_rotation int

Maximum rotation, in degrees, on the Y-axis while the mob is trying to look at its target. Defaults to 30.

30
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_stomp_attack

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIStompTurtleEgg

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(goal_radius=0.5, interval=120, search_count=10, search_height=1, search_range=0, speed_multiplier=1.0, *control_flags)

Allows this mob to stomp turtle eggs.

Parameters:

Name Type Description Default
goal_radius float

Distance 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. Value must be > 0. Defaults to 0.5.

0.5
interval int

A random value to determine when to randomly move somewhere. This has a 1/interval chance to choose this goal Value must be > 0. Defaults to 120.

120
search_count int

The number of randomly selected blocks each tick that the mob will check within its search range and height for a valid block to move to. Defaults to 10.

10
search_height int

Height in blocks the mob will look for turtle eggs to move towards Value must be > 0. Defaults to 1.

1
search_range int

The distance in blocks it will look for turtle eggs to move towards Value must be > 0. Defaults to 0.

0
speed_multiplier float

Movement speed multiplier of the mob when using this goal. Defaults to 1.0.

1.0
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_stomp_turtle_egg

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIStrollTowardsVillage

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(cooldown_time=8.0, goal_radius=1.5, search_range=0, speed_multiplier=1.0, start_chance=1.0, *control_flags)

Allows the mob to move into a random location within a village within the search range.

Parameters:

Name Type Description Default
cooldown_time Seconds

Time in seconds the mob has to wait before using the goal again. Defaults to 8.0.

8.0
goal_radius float

Distance 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. Defaults to 1.5.

1.5
search_range int

The distance in blocks to search for villages. If <= 0, find the closest village regardless of distance. Defaults to 0.

0
speed_multiplier float

Movement speed multiplier of the mob when using this goal. Defaults to 1.0.

1.0
start_chance float

Chance that the mob will start this goal, from 0 to 1. Defaults to 1.0.

1.0
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_stroll_towards_village

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAISummonEntity

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

Allows the mob to attack the player by summoning other entities.

Parameters:

Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_summon_entity

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAISwell

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(start_distance=10.0, stop_distance=2.0)

Allows the creeper to swell up when a player is nearby. It can only be used by Creepers.

Parameters:

Name Type Description Default
start_distance float

This mob starts swelling when a target is at least this many blocks away. Defaults to 10.0.

10.0
stop_distance float

This mob stops swelling when a target has moved away at least this many blocks. Defaults to 2.0.

2.0
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_swell

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAISwimIdle

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(idle_time=5.0, success_rate=0.10000000149011612, *control_flags)

Allows the entity go idle, if swimming. Entity must be in water.

Parameters:

Name Type Description Default
idle_time Seconds

Amount of time (in seconds) to stay idle. Defaults to 5.0.

5.0
success_rate float

Percent chance this entity will go idle, 1.0 = 100%. Defaults to 0.10000000149011612.

0.10000000149011612
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_swim_idle

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAISwimUpForBreath

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(material_type='water', search_height=16, search_radius=4, speed_mod=1.4)

Allows the mob to try to move to air once it is close to running out of its total breathable supply. Requires "minecraft:breathable".

Parameters:

Name Type Description Default
material_type str

The material the mob is traveling in. An air block will only be considered valid to move to with a block of this material below it. Options are: "water", "lava", or "any". Defaults to "water".

'water'
search_height int

The height (in blocks) above the mob's current position that it will search for a valid air block to move to. Defaults to 16.

16
search_radius int

The radius (in blocks) around the mob's current position that it will search for a valid air block to move to. Defaults to 4.

4
speed_mod float

Movement speed multiplier of the mob when using this Goal. Defaults to 1.4.

1.4
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_swim_up_for_breath

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAISwimWander

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(interval=0.008329999633133411, look_ahead=5.0, speed_multiplier=1.0, wander_time=5.0, *control_flags)

Allows the entity to wander around while swimming, when not path-finding.

Parameters:

Name Type Description Default
interval float

Percent chance to start wandering, when not path-finding. 1 = 100%. Defaults to 0.008329999633133411.

0.008329999633133411
look_ahead float

Distance to look ahead for obstacle avoidance, while wandering. Defaults to 5.0.

5.0
speed_multiplier float

This multiplier modifies the entity's speed when wandering. Defaults to 1.0.

1.0
wander_time Seconds

Amount of time (in seconds) to wander after wandering behavior was successfully started. Defaults to 5.0.

5.0
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_swim_wander

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAISwimWithEntity

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(catch_up_multiplier=2.5, catch_up_threshold=12.0, chance_to_stop=0.0333, match_direction_threshold=2.0, search_range=20.0, speed_multiplier=1.5, state_check_interval=0.5, stop_distance=5.0, success_rate=0.1)

Allows the entity follow another entity. Both entities must be swimming [ie, in water].

Parameters:

Name Type Description Default
catch_up_multiplier float

The multiplier this entity's speed is modified by when matching another entity's direction. Defaults to 2.5.

2.5
catch_up_threshold float

Distance, from the entity being followed, at which this entity will speed up to reach that entity. Defaults to 12.0.

12.0
chance_to_stop float

Percent chance to stop following the current entity, if they're riding another entity or they're not swimming. 1.0 = 100%. Defaults to 0.0333.

0.0333
match_direction_threshold float

Distance, from the entity being followed, at which this entity will try to match that entity's direction. Defaults to 2.0.

2.0
search_range float

Radius around this entity to search for another entity to follow. Defaults to 20.0.

20.0
speed_multiplier float

The multiplier this entity's speed is modified by when trying to catch up to the entity being followed. Defaults to 1.5.

1.5
state_check_interval Seconds

Time (in seconds) between checks to determine if this entity should catch up to the entity being followed or match the direction of the entity being followed. Defaults to 0.5.

0.5
stop_distance float

Distance, from the entity being followed, at which this entity will stop following that entity. Defaults to 5.0.

5.0
success_rate float

Percent chance to start following another entity, if not already doing so. 1.0 = 100%. Defaults to 0.1.

0.1
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_swim_with_entity

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAISwoopAttack

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(damage_reach=0.2, delay_range=None, speed_multiplier=1.0)

Allows an entity to attack using swoop attack behavior; Ideal for use with flying mobs. The behavior ends if the entity has a horizontal collision or gets hit.

Parameters:

Name Type Description Default
damage_reach float

Added to the base size of the entity, to determine the target's maximum allowable distance, when trying to deal attack damage. Defaults to 0.2.

0.2
delay_range tuple[Seconds, Seconds]

Minimum and maximum cooldown time-range (in seconds) between each attempted swoop attack. Defaults to None.

None
speed_multiplier float

During swoop attack behavior, this determines the multiplier the entity's speed is modified by when moving toward the target. Defaults to 1.0.

1.0
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_swoop_attack

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAITakeBlock

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(affected_by_griefing_rule=False, blocks=[], can_take=None, chance=0.0, requires_line_of_sight=False, xz_range=(0, 0), y_range=(0, 0))

AI goal that makes entities pick up blocks from the world, like Endermen grabbing blocks to carry. Configure which blocks the entity can take and the search radius. Works with place_block behavior to create entities that relocate blocks or harvest materials from the environment.

Parameters:

Name Type Description Default
affected_by_griefing_rule bool

If true, whether the goal is affected by the mob griefing game rule. Defaults to False.

False
blocks list[MinecraftBlockDescriptor]

Block descriptors for which blocks are valid to be taken by the entity, if empty all blocks are valid. Defaults to [].

[]
can_take Filter

Filters for if the entity should try to take a block. Self and Target are set. Defaults to None.

None
chance float

Chance each tick for the entity to try and take a block. Defaults to 0.0.

0.0
requires_line_of_sight bool

If true, whether the entity needs line of sight to the block they are trying to take. Defaults to False.

False
xz_range Vector2D

XZ range from which the entity will try and take blocks from. Defaults to (0, 0).

(0, 0)
y_range Vector2D

Y range from which the entity will try and take blocks from. Defaults to (0, 0).

(0, 0)
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_take_block

__iter__()

Iterates over the component's fields.

on_take(event, target=FilterSubject.Self)

Sets the event to be triggered when the entity successfully takes a block.

Parameters:

Name Type Description Default
event str

The name of the event to trigger.

required
target FilterSubject

The target of the event. Defaults to FilterSubject.Self.

Self

Returns:

Name Type Description
self

Returns the current instance for method chaining.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAITakeFlower

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(filters=None, max_head_rotation_y=30.0, max_rotation_x=30.0, max_wait_time=20.0, min_distance_to_target=2.0, min_wait_time=4.0, search_area=(6, 2, 6), speed_multiplier=0.5, *control_flags)

Allows the mob to accept flowers from another mob with the minecraft:offer_flower behavior.

Parameters:

Name Type Description Default
filters Filter

Filters allow data objects to specify test criteria which allows their use. Defaults to None.

None
max_head_rotation_y float

Maximum rotation (in degrees), on the Y-axis, this entity can rotate its head while trying to look at the target. Value must be > 0. Defaults to 30.0.

30.0
max_rotation_x float

Maximum rotation (in degrees), on the X-axis, this entity can rotate while trying to look at the target. Value must be > 0. Defaults to 30.0.

30.0
max_wait_time Seconds

The maximum amount of time (in seconds) for the mob to randomly wait for before taking the flower. Defaults to 20.0.

20.0
min_distance_to_target float

Minimum distance (in blocks) for the entity to be considered having reached its target. Value must be > 0. Defaults to 2.0.

2.0
min_wait_time Seconds

The minimum amount of time (in seconds) for the mob to randomly wait for before taking the flower. Defaults to 4.0.

4.0
search_area Coordinates

The dimensions of the AABB used to search for a potential mob to take a flower from. Defaults to (6, 2, 6).

(6, 2, 6)
speed_multiplier float

Movement speed multiplier of the mob when using this AI Goal. Defaults to 0.5.

0.5
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_take_flower

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAITeleportToOwner

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(cooldown=1.0, filters=None, *control_flags)

Allows an entity to teleport to its owner.

Parameters:

Name Type Description Default
cooldown Seconds

The time in seconds that must pass for the entity to be able to try to teleport again. Defaults to 1.0.

1.0
filters Filter

Conditions to be satisfied for the entity to teleport to its owner. Defaults to None.

None
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_teleport_to_owner

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAITempt

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(items, can_get_scared=False, can_tempt_vertically=False, can_tempt_while_ridden=False, sound_interval=None, speed_multiplier=1.0, stop_distance=1.5, tempt_sound=None, within_radius=0.0)

Allows a mob to be tempted by a player holding a specific item. Uses pathfinding for movement.

Parameters:

Name Type Description Default
items list[MinecraftItemDescriptor | Identifier]

List of items that can tempt the mob.

required
can_get_scared bool

If true, the mob can stop being tempted if the player moves too fast while close to this mob. Defaults to False.

False
can_tempt_vertically bool

If true, vertical distance to the player will be considered when tempting. Defaults to False.

False
can_tempt_while_ridden bool

If true, the mob can be tempted even if it has a passenger (i.e. if being ridden). Defaults to False.

False
sound_interval int | tuple[int, int]

Range of random ticks to wait between tempt sounds. Can be a number, an array [min, max], or an object with range_min/range_max or min/max. Defaults to None.

None
speed_multiplier float

Movement speed multiplier of the mob when using this AI Goal. Defaults to 1.0.

1.0
stop_distance float

The distance at which the mob will stop following the player. Defaults to 1.5.

1.5
tempt_sound str

Sound to play while the mob is being tempted. Defaults to None.

None
within_radius float

Distance in blocks this mob can get tempted by a player holding an item they like. Defaults to 0.0.

0.0
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_tempt

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAITimerFlag1

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(cooldown_range=(10.0, 10.0), duration_range=(2.0, 2.0), *control_flags)

Fires an event when this behavior starts, then waits for a duration before stopping. When stopping due to that timeout or due to being interrupted by another behavior, fires another event. query.timer_flag_1 will return 1.0 on both the client and server when this behavior is running, and 0.0 otherwise.

Parameters:

Name Type Description Default
cooldown_range tuple[Seconds, Seconds]

Goal cooldown range in seconds. Can be a range object or a single number. Defaults to (10.0, 10.0).

(10.0, 10.0)
duration_range tuple[Seconds, Seconds]

Goal duration range in seconds. Can be a range object or a single number. Defaults to (2.0, 2.0).

(2.0, 2.0)
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_timer_flag_1

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAITimerFlag2

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(cooldown_range=(10.0, 10.0), duration_range=(2.0, 2.0), *control_flags)

Fires an event when this behavior starts, then waits for a duration before stopping. When stopping due to that timeout or due to being interrupted by another behavior, fires another event. query.timer_flag_2 will return 1.0 on both the client and server when this behavior is running, and 0.0 otherwise.

Parameters:

Name Type Description Default
cooldown_range tuple[Seconds, Seconds]

Goal cooldown range in seconds. Can be a range object or a single number. Defaults to (10.0, 10.0).

(10.0, 10.0)
duration_range tuple[Seconds, Seconds]

Goal duration range in seconds. Can be a range object or a single number. Defaults to (2.0, 2.0).

(2.0, 2.0)
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_timer_flag_2

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAITimerFlag3

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(cooldown_range=(10.0, 10.0), duration_range=(2.0, 2.0), *control_flags)

Fires an event when this behavior starts, then waits for a duration before stopping. When stopping due to that timeout or due to being interrupted by another behavior, fires another event. query.timer_flag_3 will return 1.0 on both the client and server when this behavior is running, and 0.0 otherwise.

Parameters:

Name Type Description Default
cooldown_range tuple[Seconds, Seconds]

Goal cooldown range in seconds. Can be a range object or a single number. Defaults to (10.0, 10.0).

(10.0, 10.0)
duration_range tuple[Seconds, Seconds]

Goal duration range in seconds. Can be a range object or a single number. Defaults to (2.0, 2.0).

(2.0, 2.0)
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_timer_flag_3

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAITradeInterest

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(carried_item_switch_time=2.0, cooldown=2.0, interest_time=45.0, remove_item_time=1.0, within_radius=0.0)

Allows the mob to look at a player that is holding a tradable item.

Parameters:

Name Type Description Default
carried_item_switch_time float

The max time in seconds that the trader will hold an item before attempting to switch for a different item that takes the same trade. Defaults to 2.0.

2.0
cooldown float

The time in seconds before the trader can use this goal again. Defaults to 2.0.

2.0
interest_time float

The max time in seconds that the trader will be interested with showing its trade items. Defaults to 45.0.

45.0
remove_item_time float

The max time in seconds that the trader will wait when you no longer have items to trade. Defaults to 1.0.

1.0
within_radius float

Distance in blocks this mob can be interested by a player holding an item they like. Defaults to 0.0.

0.0
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_trade_interest

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAITradeWithPlayer

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(filters=None, max_distance_from_player=8.0)

Allows the player to trade with this mob. When the goal starts, it will stop the mob's navigation.

Parameters:

Name Type Description Default
filters Filter

Conditions that need to be met for the behavior to start. Defaults to None.

None
max_distance_from_player float

The max distance that the mob can be from the player before exiting the goal. Defaults to 8.0.

8.0
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_trade_with_player

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAITransportItems

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(allow_simultaneous_interaction=False, allowed_items=[], destination_container_types=[], disallowed_items=[], idle_cooldown=20, initial_cooldown=0, interaction_time=3.0, max_stack_size=64, max_visited_containers=16, place_strategy='any', search_distance=(64, 32), search_strategy='random', source_container_types=[], *control_flags)

A behavior that enables a mob to transport items from and to containers.

Parameters:

Name Type Description Default
allow_simultaneous_interaction bool

When true the mob will wait until a container is not used by other entities before starting to interact with it. Defaults to False.

False
allowed_items list[MinecraftItemDescriptor | Identifier]

A list of item descriptors that are the only items the mob is allowed to transport. Defaults to [].

[]
destination_container_types list[MinecraftBlockDescriptor | Identifier | dict[str, Any]]

A list of block descriptors that should be container types to put items in. Can be simple block identifier strings or objects with name, states, and tags. Defaults to [].

[]
disallowed_items list[MinecraftItemDescriptor | Identifier]

A list of item descriptors that are the mob is not allowed to transport. If non-empty "allowed_items" must be empty. Defaults to [].

[]
idle_cooldown int

When the mob cannot find a container in which to get or put items, the goal will stop being active for this amount of time in seconds. Defaults to 20.

20
initial_cooldown int

How long the mob will wait after spawning or getting the goal added before the goal can start. Defaults to 0.

0
interaction_time Seconds

The amount of time in seconds spent interacting with the containers. Defaults to 3.0.

3.0
max_stack_size int

The maximum stack size that the mob will try to take from a container. Value must be >= 1. Value must be <= 64. Defaults to 64.

64
max_visited_containers int

The maximum number of containers that the mob will try to take/place items from before going on cooldown and starting over. Defaults to 16.

16
place_strategy str

The strategy to use for placing the transported item. Defaults to "any".

'any'
search_distance Vector2D

The maximum search distance horizontally and vertically at which to find containers for taking or placing items. Defaults to (64, 32).

(64, 32)
search_strategy str

The strategy to use for finding source or destination containers. The nearest valid container or a random valid container in range. Defaults to "random".

'random'
source_container_types list[MinecraftBlockDescriptor | Identifier | dict[str, Any]]

A list of block descriptors that should be container types to take items from. Can be simple block identifier strings or objects with name, states, and tags. Defaults to [].

[]
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_transport_items

__iter__()

Iterates over the component's fields.

add_destination_container_type(container_type, states=None, tags=None)

Adds a destination container type descriptor.

Parameters:

Name Type Description Default
container_type MinecraftBlockDescriptor | Identifier | dict[str, Any]

Block identifier or full descriptor for a destination container.

required
states dict[str, Any]

Block states to match when using a simple identifier. Defaults to None.

None
tags str

Block tags to match when using a simple identifier. Defaults to None.

None

Returns:

Name Type Description
self

Returns the current instance for method chaining.

add_source_container_type(container_type, states=None, tags=None)

Adds a source container type descriptor.

Parameters:

Name Type Description Default
container_type MinecraftBlockDescriptor | Identifier | dict[str, Any]

Block identifier or full descriptor for a source container.

required
states dict[str, Any]

Block states to match when using a simple identifier. Defaults to None.

None
tags str

Block tags to match when using a simple identifier. Defaults to None.

None

Returns:

Name Type Description
self

Returns the current instance for method chaining.

allow_item(item)

Adds an item descriptor the mob is allowed to transport.

Parameters:

Name Type Description Default
item MinecraftItemDescriptor | Identifier

Item descriptor to allow.

required

Returns:

Name Type Description
self

Returns the current instance for method chaining.

disallow_item(item)

Adds an item descriptor the mob is not allowed to transport.

Parameters:

Name Type Description Default
item MinecraftItemDescriptor | Identifier

Item descriptor to disallow.

required

Returns:

Name Type Description
self

Returns the current instance for method chaining.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIUseKineticWeapon

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(approach_distance=None, reposition_distance=None, reposition_speed_multiplier=None, cooldown_distance=None, cooldown_speed_multiplier=None, weapon_reach_multiplier=None, weapon_min_speed_multiplier=None, min_path_time=None, max_path_time=None, path_fail_time_increase=None, inner_boundary_time_increase=None, outer_boundary_time_increase=None, path_inner_boundary=None, path_outer_boundary=None, speed_multiplier=None, require_complete_path=None, track_target=None, cooldown_time=None, melee_fov=None, x_max_rotation=None, y_max_head_rotation=None, random_stop_interval=None, attack_once=None, hijack_mount_navigation=None)

Enables a mob to use kinetic weaponry by intermittently charging at its target and repositioning afterward.

Parameters:

Name Type Description Default
approach_distance float

The distance to the target within which the mob begins using its kinetic weapon. Defaults to None.

None
reposition_distance float

The distance the mob retreats to once the target is closer than the midpoint of the item's "minecraft:kinetic_weapon" component's minimum and maximum "reach". Defaults to None.

None
reposition_speed_multiplier float

Multiplier applied to the mob's movement speed while repositioning. Defaults to None.

None
cooldown_distance float

The distance the mob retreats to after all of the item's "minecraft:kinetic_weapon" component's "max_duration" values have elapsed. Defaults to None.

None
cooldown_speed_multiplier float

Multiplier applied to the mob's movement speed while on cooldown. Defaults to None.

None
weapon_reach_multiplier float

Multiplier applied to the item's "minecraft:kinetic_weapon" component's "reach". Defaults to None.

None
weapon_min_speed_multiplier float

Multiplier applied to each "min_speed" and "min_relative_speed" condition in the item's "minecraft:kinetic_weapon" component. Defaults to None.

None
min_path_time float

Minimum base time, in seconds, before recalculating a new attack path to the target (before increases are applied). Defaults to None.

None
max_path_time float

Maximum base time, in seconds, before recalculating a new attack path to the target (before increases are applied). Defaults to None.

None
path_fail_time_increase float

Time, in seconds, added to the attack path recalculation interval when the mob cannot move along the current path. Defaults to None.

None
inner_boundary_time_increase float

Time, in seconds, added to the attack path recalculation interval when the target is beyond "path_inner_boundary". Defaults to None.

None
outer_boundary_time_increase float

Time, in seconds, added to the attack path recalculation interval when the target is beyond "path_outer_boundary". Defaults to None.

None
path_inner_boundary float

Distance at which to increase attack path recalculation by "inner_boundary_time_increase". Defaults to None.

None
path_outer_boundary float

Distance at which to increase attack path recalculation by "outer_boundary_time_increase". Defaults to None.

None
speed_multiplier float

Multiplier applied to the mob's movement speed when moving toward its target. Defaults to None.

None
require_complete_path bool

Specifies whether a full navigation path from the mob to the target is required. Defaults to None.

None
track_target bool

Allows the mob to track its target even if it lacks a hard-coded sensing component. Defaults to None.

None
cooldown_time float

Cooldown time, in seconds, between consecutive attacks. Defaults to None.

None
melee_fov float

Field of view, in degrees, used by the hard-coded sensing component to detect a valid attack target. Defaults to None.

None
x_max_rotation float

Maximum rotation, in degrees, on the X-axis while the mob is trying to look at its target. Defaults to None.

None
y_max_head_rotation float

Maximum rotation, in degrees, on the Y-axis while the mob is trying to look at its target. Defaults to None.

None
random_stop_interval int

Defines a 1-in-N chance for the mob to stop its current attack, where N equals "random_stop_interval". Defaults to None.

None
attack_once bool

Allows the mob to perform this melee attack behavior only once during its lifetime. Defaults to None.

None
hijack_mount_navigation bool

Allows the mob to override its mount's navigation behavior with the logic defined by this goal. Defaults to None.

None
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_use_kinetic_weapon

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIVexCopyOwnerTarget

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

Allows the mob to target the same entity its owner is targeting.

Note

No longer used for the vex entity.

Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_vex_copy_owner_target

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIVexRandomMove

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

Allows the mob to move around randomly like the Vex.

Note

No longer used for the vex entity.

This component has no configurable constructor properties.

Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_vex_random_move

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIWork

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(active_time=0, can_work_in_rain=False, goal_cooldown=0, on_arrival=None, sound_delay_max=0, sound_delay_min=0, speed_multiplier=0.5, work_in_rain_tolerance=-1)

Allows the NPC to use the POI.

Parameters:

Name Type Description Default
active_time int

The amount of ticks the NPC will stay in their the work location. Defaults to 0.

0
can_work_in_rain bool

If true, this entity can work when their jobsite POI is being rained on. Defaults to False.

False
goal_cooldown int

The amount of ticks the goal will be on cooldown before it can be used again. Defaults to 0.

0
on_arrival str

Event to run when the mob reaches their jobsite. Defaults to None.

None
sound_delay_max int

The max interval in which a sound will play. Defaults to 0.

0
sound_delay_min int

The min interval in which a sound will play. Defaults to 0.

0
speed_multiplier float

Movement speed multiplier of the mob when using this AI Goal Value must be > 0. Defaults to 0.5.

0.5
work_in_rain_tolerance int

If "can_work_in_rain" is false, this is the maximum number of ticks left in the goal where rain will not interrupt the goal. Defaults to -1.

-1
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_work

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAIWorkComposter

Bases: AIGoal

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(active_time=0, block_interaction_max=1, can_empty_composter=True, can_fill_composter=True, can_work_in_rain=False, goal_cooldown=0, items_per_use_max=20, min_item_count=10, on_arrival=None, speed_multiplier=0.5, use_block_max=200, use_block_min=100, work_in_rain_tolerance=-1)

Allows the NPC to use the composter POI to convert excess seeds into bone meal.

Parameters:

Name Type Description Default
active_time int

The amount of ticks the NPC will stay in their the work location. Defaults to 0.

0
block_interaction_max int

The maximum number of times the mob will interact with the composter. Defaults to 1.

1
can_empty_composter bool

Determines whether the mob can empty a full composter. Defaults to True.

True
can_fill_composter bool

Determines whether the mob can add items to a composter given that it is not full. Defaults to True.

True
can_work_in_rain bool

If true, this entity can work when their jobsite POI is being rained on. Defaults to False.

False
goal_cooldown int

The amount of ticks the goal will be on cooldown before it can be used again. Defaults to 0.

0
items_per_use_max int

The maximum number of items which can be added to the composter per block interaction. Defaults to 20.

20
min_item_count int

Limits the amount of each compostable item the mob can use. Any amount held over this number will be composted if possible. Defaults to 10.

10
on_arrival str

Event to run when the mob reaches their jobsite. Defaults to None.

None
speed_multiplier float

Movement speed multiplier of the mob when using this AI Goal Value must be > 0. Defaults to 0.5.

0.5
use_block_max int

The maximum interval in which the mob will interact with the composter. Defaults to 200.

200
use_block_min int

The minimum interval in which the mob will interact with the composter. Defaults to 100.

100
work_in_rain_tolerance int

If "can_work_in_rain" is false, this is the maximum number of ticks left in the goal where rain will not interrupt the goal. Defaults to -1.

-1
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitygoals/minecraftbehavior_work_composter

__iter__()

Iterates over the component's fields.

priority(priority)

The higher the priority, the sooner this behavior will be executed as a goal.

Parameters:

Name Type Description Default
priority int

The higher the priority, the sooner this behavior will be executed as a goal.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAddRider

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(entity_type, spawn_event=None)

Adds a rider to the entity.

Parameters:

Name Type Description Default
entity_type MinecraftEntityDescriptor | Identifier

The entity type that will be riding this entity.

required
spawn_event str

The spawn event that will be used when the riding entity is created. Defaults to None.

None
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_addrider

__iter__()

Iterates over the component's fields.

add_rider(entity_type, spawn_event=None)

Adds an additional rider to the entity. Requires minecraft:rideable..

entity_type : MinecraftEntityDescriptor | Identifier. The type of entity to add as a rider. spawn_event : str, optional. An event to run when the rider is spawned.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAdmireItem

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(cooldown_after_being_attacked, duration=10)

Allows an entity to ignore attackable targets for a given duration.

Parameters:

Name Type Description Default
cooldown_after_being_attacked Seconds

Duration, in seconds, for which mob won't admire items if it was hurt.

required
duration Seconds

Duration, in seconds, that the mob is pacified. Default: 10. Defaults to 10.

10
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_admire_item

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAgeable

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(duration=1200.0, interact_filters=None, result_item=None)

Adds a timer for the entity to grow up. It can be accelerated by giving the entity the items it likes as defined by feed_items.

Parameters:

Name Type Description Default
duration Seconds

Length of time before an entity grows up (-1 to always stay a baby). Defaults to 1200.0.

1200.0
interact_filters Filter

List of conditions to meet so that the entity can be fed. Defaults to None.

None
result_item str

The item identifier. Defaults to None.

None
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_ageable

__iter__()

Iterates over the component's fields.

drop_item(*items)

Adds an item to the list of items the entity drops when it grows up.

Parameters:

Name Type Description Default
item str

The item to add to the list of items the entity drops when it grows up.

required
Returns

Ageable: Returns the Ageable component to allow for method chaining.

required

feed_item_growth(item, growth)

Adds an item to the list of items the entity can be fed.

Parameters:

Name Type Description Default
item str

The item to add to the list of items the entity can be fed.

required
growth float

The amount of growth to add to the entity when fed this item.

required
Returns

Ageable: Returns the Ageable component to allow for method chaining.

required

feed_items(items)

Adds an item to the list of items the entity can be fed.

Parameters:

Name Type Description Default
item str

The item to add to the list of items the entity can be fed.

required
Returns

Ageable: Returns the Ageable component to allow for method chaining.

required

grow_up(event, target=FilterSubject.Self)

Sets the event to initiate when the entity grows up.

Parameters:

Name Type Description Default
event str

Event to initiate when the entity grows up.

required
target FilterSubject

The target of the event. Defaults to FilterSubject.Self.

Self
Returns

Ageable: Returns the Ageable component to allow for method chaining.

required

pause_growth_items(items)

Pauses the growth of the entity when given specific items.

Parameters:

Name Type Description Default
items list[MinecraftItemDescriptor | Identifier]

The items that will pause the entity's growth.

required
Returns

Ageable: Returns the Ageable component to allow for method chaining.

required

reset_growth_items(items)

Resets the growth of the entity when given specific items.

Parameters:

Name Type Description Default
items list[MinecraftItemDescriptor | Identifier]

The items that will reset the entity's growth.

required

Returns:

Name Type Description
Ageable

Returns the Ageable component to allow for method chaining.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAmbientSoundInterval

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(event_name, sound_delay=(8, 16))

Delay for an entity playing its sound.

Parameters:

Name Type Description Default
event_name str

Level sound event to be played as the ambient sound.

required
sound_delay tuple[float, float]

Minimum and maximum delay in seconds between playing the ambient sound. Defaults to (8, 16).

(8, 16)
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_ambient_sound_interval

__iter__()

Iterates over the component's fields.

add_event(event_name, condition)

Adds an additional sound event to be played when the ambient sound plays, with a Molang condition for it to play.

Parameters:

Name Type Description Default
event_name str

Level sound event to be played as the additional sound.

required
condition Molang

Molang condition that must be satisfied for the additional sound to play when the ambient sound plays.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAngerLevel

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(anger_decrement_interval=1.0, angry_boost=20, angry_threshold=80, default_annoyingness=0, default_projectile_annoyingness=0, max_anger=100, nuisance_filter=None, on_increase_sounds=[], remove_targets_below_angry_threshold=True)

Compels the entity to track anger towards a set of nuisances.

Parameters:

Name Type Description Default
anger_decrement_interval Seconds

Anger level will decay over time. Defines how often anger towards all nuisances will decrease by one. Defaults to 1.0.

1.0
angry_boost int

Anger boost applied to angry threshold when mob gets angry Value must be >= 0. Defaults to 20.

20
angry_threshold int

Threshold that define when the mob is considered angry at a nuisance Value must be >= 0. Defaults to 80.

80
default_annoyingness int

The default amount of annoyingness for any given nuisance. Specifies how much to raise anger level on each provocation. Defaults to 0.

0
default_projectile_annoyingness int

The default amount of annoyingness for any given nuisance. Specifies how much to raise anger level on each provocation. Defaults to 0.

0
max_anger int

The maximum anger level that can be reached. Applies to any nuisance Value must be >= 0. Defaults to 100.

100
nuisance_filter Filter

Filter that is applied to determine if a mob can be a nuisance. Defaults to None.

None
on_increase_sounds list[dict[str, str]]

Sounds to play when the entity is getting provoked. Evaluated in order. First matching condition wins. Defaults to [].

[]
remove_targets_below_angry_threshold bool

Defines if the mob should remove target if it falls below 'angry' threshold. Defaults to True.

True
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_anger_level

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAngry

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(angry_sound=None, broadcast_anger=False, broadcast_anger_on_attack=False, broadcast_anger_on_being_attacked=False, broadcast_filters=None, broadcast_range=20, broadcast_targets=[], duration=25, duration_delta=0, filters=None, sound_interval=[0, 0])

Defines an entity's 'angry' state using a timer.

Parameters:

Name Type Description Default
angry_sound str

The sound event to play when the mob is angry. Defaults to None.

None
broadcast_anger bool

If set, other entities of the same entity definition within the broadcastRange will also become angry. Defaults to False.

False
broadcast_anger_on_attack bool

If set, other entities of the same entity definition within the broadcastRange will also become angry whenever this mob attacks. Defaults to False.

False
broadcast_anger_on_being_attacked bool

If true, other entities of the same entity definition within the broadcastRange will also become angry whenever this mob is attacked. Defaults to False.

False
broadcast_filters Filter

Conditions that make this entry in the list valid. Defaults to None.

None
broadcast_range int

Distance in blocks within which other entities of the same entity type will become angry. Defaults to 20.

20
broadcast_targets list[str]

A list of entity families to broadcast anger to. Defaults to [].

[]
duration Seconds

The amount of time in seconds that the entity will be angry. Defaults to 25.

25
duration_delta Seconds

Variance in seconds added to the duration [-delta, delta]. Defaults to 0.

0
filters Filter

Filter out mob types that it should not attack while angry (other Piglins). Defaults to None.

None
sound_interval list[Seconds]

The range of time in seconds to randomly wait before playing the sound again. Defaults to [0, 0].

[0, 0]
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_angry

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAnnotationBreakDoor

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(break_time=12, min_difficulty=Difficulty.Hard)

Allows an entity to break doors, assuming that that flags set up for the component to use in navigation.

Parameters:

Name Type Description Default
break_time int

The time in seconds required to break through doors. Defaults to 12.

12
min_difficulty Difficulty

The minimum difficulty that the world must be on for this entity to break doors. Defaults to Difficulty.Hard.

Hard
Note

Requires the entity's navigation component to have can_break_doors set to true.

Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_annotation_break_door

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAnnotationOpenDoor

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

Allows the entity to open doors.

Parameters:

Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_annotation_open_door

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAreaAttack

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(cause, damage_per_tick=2, damage_range=0.2, damage_cooldown=None)

A component that does damage to entities that get within range.

Parameters:

Name Type Description Default
cause DamageCause

The type of damage that is applied to entities that enter the damage range.

required
damage_per_tick int

How much damage per tick is applied to entities that enter the damage range. Defaults to 2.

2
damage_range float

How close a hostile entity must be to have the damage applied. Defaults to 0.2.

0.2
damage_cooldown Seconds | None

Attack cooldown (in seconds) for how often this entity can attack a target. Defaults to None.

None
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_area_attack

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityArmorEquipmentSlotMapping

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(armor_slot)

It defines to which armor slot an item equipped to 'minecraft:equippable''s second slot should be equipped to. It is automatically applied to all entities for worlds with a version greater than or equal to 1.21.10. For older worlds, 'slot.armor.torso' will be used. It is strongly advised not to explicitly use this component, as no backwards compatibility for it will be provided.

Parameters:

Name Type Description Default
armor_slot Slots

The armor slot an item equipped to 'minecraft:equippable''s second slot should be equipped to.

required
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_entity_armor_equipment_slot_mapping

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAttack

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(damage, effect_duration=None, effect_name=None)

Defines an entity's melee attack damage and any additional status effects applied on hit. Typical damage values range from 3 (zombie, creeper) to 7-21 (iron golem).

Parameters:

Name Type Description Default
damage int

Range of the random amount of damage the melee attack deals.

required
effect_duration int

Duration in seconds of the status ailment applied to the damaged entity. Defaults to None.

None
effect_name str

Identifier of the status ailment to apply to an entity attacked by this entity's melee attack. Defaults to None.

None
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_attack

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityAttackCooldown

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(attack_cooldown_time=None, attack_cooldown_complete_event=None, attack_cooldown_complete_target=FilterSubject.Self)

Adds a cooldown to an entity. The intention of this cooldown is to be used to prevent the entity from attempting to acquire new attack targets.

Parameters:

Name Type Description Default
attack_cooldown_time Seconds | tuple[Seconds, Seconds]

Amount of time in seconds for the cooldown. Can be specified as a number or a pair of numbers (min and max). Defaults to None.

None
attack_cooldown_complete_event str

Event to be run when the cooldown is complete. Can be an object with event and target properties, or a simple event string. Defaults to None.

None
attack_cooldown_complete_target FilterSubject

Target value to serialize when attack_cooldown_complete_event is written as an event object. Defaults to FilterSubject.Self.

Self
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_attack_cooldown

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityBalloonable

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(mass=1.0, max_distance=10.0, soft_distance=2.0)

Allows this entity to have a balloon attached and defines the conditions and events for this entity when is ballooned.

Parameters:

Name Type Description Default
mass float

Mass that this entity will have when computing balloon pull forces. Defaults to 1.0.

1.0
max_distance float

Distance in blocks at which the balloon breaks. Defaults to 10.0.

10.0
soft_distance float

Distance in blocks at which the 'spring' effect that lifts it. Defaults to 2.0.

2.0
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_balloonable

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityBarter

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(barter_table, cooldown_after_being_attacked=0)

Enables the component to drop an item as a barter exchange.

Parameters:

Name Type Description Default
barter_table LootTable | str

Loot table that's used to drop a random item.

required
cooldown_after_being_attacked tuple[int, int] | int

Duration, in seconds, for which mob won't barter items if it was hurt. Defaults to 0.

0
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_barter

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityBlockClimber

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

Allows the player to detect and manuever on the scaffolding block.

This component has no configurable constructor properties.

Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_block_climber

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityBlockSensor

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(sensor_radius=16, sources=None)

Fires off a specified event when a block in the block list is broken within the sensor range.

Parameters:

Name Type Description Default
sensor_radius float

The maximum radial distance in which a specified block can be detected. The biggest radius is 32.0. Defaults to 16.

16
sources Filter

List of sources that break the block to listen for. If none are specified, all block breaks will be detected. Defaults to None.

None
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_block_sensor

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityBodyRotationAlwaysFollowsHead

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

Causes the entity's body rotation to match the one of their head. Does not override the "minecraft:body_rotation_blocked" component.

Parameters:

Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_body_rotation_always_follows_head

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityBodyRotationBlocked

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

When set, the entity will no longer visually rotate their body to match their facing direction.

Parameters:

Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_body_rotation_blocked

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityBoostable

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(duration=3.0, speed_multiplier=1.0)

Defines the conditions and behavior of a rideable entity's boost.

Parameters:

Name Type Description Default
duration Seconds

Time in seconds for the boost. Defaults to 3.0.

3.0
speed_multiplier float

Factor by which the entity's normal speed increases. E.g. 2.0 means go twice as fast. Defaults to 1.0.

1.0
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_boostable

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityBoss

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(name, hud_range=55, should_darken_sky=False)

Defines the current state of the boss for updating the boss HUD.

Parameters:

Name Type Description Default
name str

Description.

required
hud_range int

The max distance from the boss at which the boss's health bar is present on the players screen. Defaults to 55.

55
should_darken_sky bool

Whether the sky should darken in the presence of the boss. Defaults to False.

False
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_boss

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityBreakBlocks

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

Specifies the blocks that the entity can break as it moves around.

This component has no configurable constructor properties. Use add_block to append breakable block identifiers.

Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_break_blocks

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityBreathable

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(breathes_air=True, breathes_lava=True, breathes_solids=False, breathes_water=False, generates_bubbles=True, inhale_time=0.0, suffocate_time=-20, total_supply=15, can_dehydrate=False, breathe_blocks=[], non_breathe_blocks=[])

Defines what blocks this entity can breathe in and gives them the ability to suffocate.

Parameters:

Name Type Description Default
breathes_air bool

If set, this entity can breathe in air. Defaults to True.

True
breathes_lava bool

If set, this entity can breathe in lava. Defaults to True.

True
breathes_solids bool

If set, this entity can breathe in solid blocks. Defaults to False.

False
breathes_water bool

If set, this entity can breathe in water. Defaults to False.

False
generates_bubbles bool

If set, this entity will have visible bubbles while in water. Defaults to True.

True
inhale_time Seconds

Time in seconds to recover breath to maximum. Defaults to 0.0.

0.0
suffocate_time Seconds

Time in seconds between suffocation damage. Defaults to -20.

-20
total_supply Seconds

Time in seconds the entity can hold its breath. Defaults to 15.

15
can_dehydrate bool

Description. Defaults to False.

False
breathe_blocks list[MinecraftBlockDescriptor]

List of blocks this entity can breathe in, in addition to the selected items above. Defaults to [].

[]
non_breathe_blocks list[MinecraftBlockDescriptor]

List of blocks this entity cannot breathe in, in addition to the selected items above. Defaults to [].

[]
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_breathable

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityBreedable

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(allow_sitting=False, breed_cooldown=60, breed_items=None, causes_pregnancy=False, extra_baby_chance=0, love_filters=None, property_inheritance=None, require_full_health=False, require_tame=True, result_item=None)

Allows an entity to establish a way to get into the love state used for breeding.

Parameters:

Name Type Description Default
allow_sitting bool

If true, entities can breed while sitting. Defaults to False.

False
breed_cooldown Seconds

Time in seconds before the Entity can breed again. Defaults to 60.

60
breed_items list[str]

The list of items that can be used to get the entity into the 'love' state. Can be a single item or an array. Defaults to None.

None
causes_pregnancy bool

If true, the entity will become pregnant instead of spawning a baby. Defaults to False.

False
extra_baby_chance float

Chance that up to 16 babies will spawn. Defaults to 0.

0
love_filters Filter

The filters to run when attempting to fall in love. Defaults to None.

None
property_inheritance list[str]

Description. Defaults to None.

None
require_full_health bool

If true, the entity needs to be at full health before it can breed. Defaults to False.

False
require_tame bool

If true, the entities need to be tamed first before they can breed. Defaults to True.

True
result_item str

The entity definition of this entity's babies. Defaults to None.

None
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_breedable

__iter__()

Iterates over the component's fields.

breeds_with(mate_type)

Defines the breeding partner for the entity.

Parameters:

Name Type Description Default
mate_type str

The entity type of the breeding partner.

required
baby_type str

The entity type of the offspring.

required
breed_event str

The event to trigger when breeding occurs.

required

Returns:

Name Type Description
dict dict

A dictionary containing the breeding information.

environment_requirements(block_types, count, radius)

Defines the nearby block requirements for breeding.

Parameters:

Name Type Description Default
block_types list[str]

The block types required nearby for breeding.

required
count int

The number of required block types nearby for breeding.

required
radius float

The radius in blocks to search for the required blocks.

required

Returns:

Name Type Description
dict dict

A dictionary containing the environment requirements information.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityBribeable

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(bribe_items=None, bribe_cooldown=2)

Defines the way an entity can get into the 'bribed' state.

Parameters:

Name Type Description Default
bribe_items str | list[MinecraftItemDescriptor | Identifier]

The list of items that can be used to bribe the entity. Can be an array or a single item string. Defaults to None.

None
bribe_cooldown Seconds

Time in seconds before the Entity can be bribed again. Defaults to 2.

2
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_bribeable

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityBuoyant

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(liquid_blocks, apply_gravity=True, base_buoyancy=1.0, big_wave_probability=0.03, big_wave_speed=10.0, drag_down_on_buoyancy_removed=0.0, movement_type='waves', can_auto_step_from_liquid=False)

Enables an entity to float on the specified liquid blocks.

Parameters:

Name Type Description Default
liquid_blocks list[MinecraftBlockDescriptor]

List of blocks this entity can float on. Must be a liquid block.

required
apply_gravity bool

Applies gravity each tick. Causes "movement_type" to be more impactful, but also gravity to be applied more intensely outside liquids. Defaults to True.

True
base_buoyancy float

Base buoyancy used to calculate how much will a entity float. Defaults to 1.0.

1.0
big_wave_probability float

Probability for a big wave hitting the entity. Only used if "movement_type" is "waves". Defaults to 0.03.

0.03
big_wave_speed float

Multiplier for the speed to make a big wave. Triggered depending on "big_wave_probability". Defaults to 10.0.

10.0
drag_down_on_buoyancy_removed float

How much an entity will be dragged down when the component is removed. Defaults to 0.0.

0.0
movement_type Literal[waves, bobbing, none]

Type of vertical movement applied to the entity: "waves", simulates wave movement based on the entity speed. "bobbing", simulates waves going through. "none", simulates waves going through. Defaults to "waves".

'waves'
can_auto_step_from_liquid bool

Whether the entity can move out of a liquid block to a neighboring solid block if pushed against it. Defaults to False.

False
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_buoyant

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityBurnsInDaylight

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(protection_slot=None)

Specifies that this entity takes fire damage when exposed to direct sunlight. This component is used by undead mobs like zombies, skeletons, and phantoms. The entity will catch fire when in sunlight unless it is wearing armor in the protection slot, standing in water, or in a shaded area.

Parameters:

Name Type Description Default
protection_slot Slots

The equipment slot that provides protection from burning in sunlight. Defaults to None.

None
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_burns_in_daylight

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityCanClimb

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

Allows an entity to climb ladders.

Parameters:

Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_can_climb

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityCanFly

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

Marks the entity as being able to fly, the pathfinder won't be restricted to paths where a solid block is required underneath it.

Parameters:

Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_can_fly

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityCanJoinRaid

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

Specifies if an entity can join a raid.

Parameters:

Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_can_join_raid

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityCanPowerJump

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

Allows the entity to power jump like the Horse does in Vanilla.

Parameters:

Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_can_power_jump

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityCannotBeAttacked

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

When set, blocks entities from attacking the owner entity unless they have the "minecraft:ignore_cannot_be_attacked" component.

Parameters:

Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_cannot_be_attacked

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityCelebrateHunt

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(broadcast=True, celebration_targets=None, celebrate_sound=None, duration=4, radius=16, sound_interval=0)

Specifies hunt celebration behaviour.

Parameters:

Name Type Description Default
broadcast bool

If true, celebration will be broadcasted to other entities in the radius. Defaults to True.

True
celebration_targets Filter

Conditions the hunt target must satisfy to initiate celebration. Defaults to None.

None
celebrate_sound str

The sound event to play when the mob is celebrating. Defaults to None.

None
duration int

Duration, in seconds, of celebration. Defaults to 4.

4
radius float

If broadcast is enabled, specifies the radius in which it will notify other entities for celebration. Defaults to 16.

16
sound_interval int | tuple[int, int]

The range of time in seconds to randomly wait before playing the sound again. Defaults to 0.

0
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_celebrate_hunt

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityCollisionBox

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(height, width)

Sets the width and height of the Entity's collision box.

Parameters:

Name Type Description Default
height float

Height of the collision box in blocks. A negative value will be assumed to be 0.

required
width float

Width of the collision box in blocks. A negative value will be assumed to be 0. Min value is -100000000.000000 Max value is 100000000.000000.

required
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_collision_box

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityColor

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(value)

Defines the entity's main color.

Parameters:

Name Type Description Default
value int

The Palette Color value of the entity.

required
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_color

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityColor2

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(value)

Defines the entity's second texture color.

Parameters:

Name Type Description Default
value int

The second Palette Color value of the entity.

required
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_color2

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityCombatRegeneration

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(apply_to_family=False, apply_to_self=False, regeneration_duration=5)

Gives Regeneration I and removes Mining Fatigue from the mob that kills the entity's attack target.

Parameters:

Name Type Description Default
apply_to_family bool

Determines if the mob will grant mobs of the same type combat buffs if they kill the target. Defaults to False.

False
apply_to_self bool

Determines if the mob will grant itself the combat buffs if it kills the target. Defaults to False.

False
regeneration_duration int | Literal[infinite]

The duration in seconds of Regeneration I added to the mob. Can also be set to "infinite". Defaults to 5.

5
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_combat_regeneration

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityConditionalBandwidthOptimization

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(max_dropped_ticks=0, max_optimized_distance=0, use_motion_prediction_hints=False)

Defines the Conditional Spatial Update Bandwidth Optimizations of this entity.

Parameters:

Name Type Description Default
max_dropped_ticks int

Determines the maximum ticks spatial update packets can be not sent. Defaults to 0.

0
max_optimized_distance int

The maximum distance considered during bandwidth optimizations. Defaults to 0.

0
use_motion_prediction_hints bool

When true, smaller motion packets will be sent during drop packet intervals. Defaults to False.

False
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_conditional_bandwidth_optimization

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityCustomHitTest

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(height, width, pivot=[0, 1, 0])

List of hitboxes for melee and ranged hits against the entity.

Parameters:

Name Type Description Default
height float

Height of the hitbox.

required
width float

Width of the hitbox.

required
pivot list[float, float, float]

Pivot point of the hitbox. Defaults to [0, 1, 0].

[0, 1, 0]
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_custom_hit_test

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityDamageAbsorption

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(absorbable_causes=DamageCause.Nothing)

Allows an item to absorb damage that would otherwise be dealt to its wearer. The item must be equipped in an armor slot for this to happen. The absorbed damage reduces the item's durability, with any excess damage being ignored. The item must also have a minecraft:durability component.

Parameters:

Name Type Description Default
absorbable_causes list[DamageCause]

Description. Defaults to DamageCause.Nothing.

Nothing
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_damage_absorption

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityDamageOverTime

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(damage_per_hurt=1, time_between_hurt=0)

Applies defined amount of damage to the entity at specified intervals.

Parameters:

Name Type Description Default
damage_per_hurt int

Amount of damage caused each hurt. Defaults to 1.

1
time_between_hurt Seconds

Time in seconds between damage. Defaults to 0.

0
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_damage_over_time

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityDamageSensor

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

Defines what events to call when this entity is damaged by specific entities or items.

Parameters:

Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_damage_sensor

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityDash

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(cooldown_time=1.0, horizontal_momentum=1.0, vertical_momentum=1.0)

Ability for a rideable entity to dash.

Parameters:

Name Type Description Default
cooldown_time Seconds

The dash cooldown in seconds. Default value is 1.000000. Defaults to 1.0.

1.0
horizontal_momentum float

Horizontal momentum of the dash. Defaults to 1.0.

1.0
vertical_momentum float

Vertical momentum of the dash. Defaults to 1.0.

1.0
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_dash

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityDashAction

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(direction='entity', cooldown_time=1.0, horizontal_momentum=1.0, vertical_momentum=1.0, can_dash_underwater=False)

Ability for a rideable entity to dash.

Parameters:

Name Type Description Default
direction Literal[entity, passenger]

Should the momentum be applied in the direction of the 'entity' or 'passenger'. Defaults to 'entity'.

'entity'
cooldown_time Seconds

The dash cooldown in seconds. Default value is 1.000000. Defaults to 1.0.

1.0
horizontal_momentum float

Horizontal momentum of the dash. Defaults to 1.0.

1.0
vertical_momentum float

Vertical momentum of the dash. Defaults to 1.0.

1.0
can_dash_underwater bool

Whether the entity can dash underwater. Default value is false. Defaults to False.

False
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_dash_action

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityDefaultLookAngle

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(value=0)

Sets this entity's default head rotation angle.

Parameters:

Name Type Description Default
value float

Angle in degrees. Defaults to 0.

0
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_default_look_angle

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityDespawn

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(despawn_from_chance=True, despawn_from_distance=None, despawn_from_inactivity=True, despawn_from_simulation_edge=True, filters=None, min_range_inactivity_timer=30, min_range_random_chance=800, remove_child_entities=False)

Despawns the Actor when the despawn rules or optional filters evaluate to true.

Parameters:

Name Type Description Default
despawn_from_chance bool

Determines if "min_range_random_chance" is used in the standard despawn rules. Defaults to True.

True
despawn_from_distance tuple[int, int]

Specifies if the 'min_distance' and 'max_distance' are used in the standard despawn rules. Defaults to None.

None
despawn_from_inactivity bool

Determines if the "min_range_inactivity_timer" is used in the standard despawn rules. Defaults to True.

True
despawn_from_simulation_edge bool

Determines if the mob is instantly despawned at the edge of simulation distance in the standard despawn rules. Defaults to True.

True
filters Filter

The list of conditions that must be satisfied before the Actor is despawned. If a filter is defined then standard despawn rules are ignored. Defaults to None.

None
min_range_inactivity_timer int

The amount of time in seconds that the mob must be inactive. Defaults to 30.

30
min_range_random_chance int

A random chance between 1 and the given value. Defaults to 800.

800
remove_child_entities bool

If true, all entities linked to this entity in a child relationship (eg. leashed) will also be despawned. Defaults to False.

False
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_despawn

__iter__()

Iterates over the component's fields.

despawn_from_distance(range=(32, 128))

Sets the despawn distance properties.

Parameters:

Name Type Description Default
range tuple[int, int]

A tuple containing the minimum and maximum distance for despawning. Defaults to (32, 128).

(32, 128)

Returns:

Name Type Description
EntityDespawn

Returns the EntityDespawn component to allow for method chaining.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityDimensionBound

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

Prevents the entity from changing dimension through portals.

Parameters:

Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_dimension_bound

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityDryingOutTimer

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(total_time=0.0, water_bottle_refill_time=0.0)

Adds a timer for drying out that will count down and fire 'dried_out_event' or will stop as soon as the entity will get under rain or water and fire 'stopped_drying_out_event'.

Parameters:

Name Type Description Default
total_time Seconds

Amount of time in seconds to dry out fully. Defaults to 0.0.

0.0
water_bottle_refill_time Seconds

Optional amount of additional time in seconds given by using splash water bottle on entity. Defaults to 0.0.

0.0
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_drying_out_timer

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityDweller

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(can_find_poi=False, can_migrate=False, dweller_role=None, dwelling_bounds_tolerance=0.0, dwelling_type=None, first_founding_reward=0, preferred_profession=None, update_interval_base=0.0, update_interval_variant=0.0)

Compels an entity to join and migrate between villages and other dwellings.

Parameters:

Name Type Description Default
can_find_poi bool

Whether or not the entity can find and add POIs to the dwelling. Defaults to False.

False
can_migrate bool

Determines whether the entity can migrate between dwellings, or only have its initial dwelling. Defaults to False.

False
dweller_role Literal[inhabitant, defender, hostile, passive]

Description. Defaults to None.

None
dwelling_bounds_tolerance float

A padding distance for checking if the entity is within the dwelling. Defaults to 0.0.

0.0
dwelling_type Literal[village]

The type of dwelling the entity wishes to join. Current Types: village. Defaults to None.

None
first_founding_reward int

Determines how much reputation players are rewarded on first founding. Defaults to 0.

0
preferred_profession str

Allows the user to define a starting profession for this particular Dweller, instead of letting them choose organically. (They still need to gain experience from trading before this takes effect.). Defaults to None.

None
update_interval_base float

How often the entity checks on their dwelling status in ticks. Positive values only. Defaults to 0.0.

0.0
update_interval_variant float

The variant value in ticks that will be added to the update_interval_base. Defaults to 0.0.

0.0
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_dweller

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityEconomyTradeTable

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(table, convert_trades_economy=False, cured_discount=None, display_name=None, hero_demand_discount=-4, max_cured_discount=None, max_nearby_cured_discount=-200, nearby_cured_discount=-20, new_screen=False, persist_trades=False, show_trade_screen=True, use_legacy_price_formula=False)

Defines this entity's ability to trade with players.

Parameters:

Name Type Description Default
table TradeTable | str

File path relative to the resource pack root for this entity's trades.

required
convert_trades_economy bool

Determines when the mob transforms, if the trades should be converted when the new mob has a economy_trade_table. Defaults to False.

False
cured_discount list[int]

How much should the discount be modified by when the player has cured the Zombie Villager. Defaults to None.

None
display_name str

Name to be displayed while trading with this entity. Defaults to None.

None
hero_demand_discount int

Used in legacy prices to determine how much should Demand be modified by when the player has the Hero of the Village mob effect. Defaults to -4.

-4
max_cured_discount list[int]

The max the discount can be modified by when the player has cured the Zombie Villager. Defaults to None.

None
max_nearby_cured_discount int

The max the discount can be modified by when the player has cured a nearby Zombie Villager. Only used when use_legacy_price_formula is true, otherwise max_cured_discount (low) is used. Defaults to -200.

-200
nearby_cured_discount int

How much should the discount be modified by when the player has cured a nearby Zombie Villager. Defaults to -20.

-20
new_screen bool

Used to determine if trading with entity opens the new trade screen. Defaults to False.

False
persist_trades bool

Determines if the trades should persist when the mob transforms. Defaults to False.

False
show_trade_screen bool

Show an in game trade screen when interacting with the mob. Defaults to True.

True
use_legacy_price_formula bool

Determines whether the legacy formula is used to determines the trade prices. Defaults to False.

False
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_economy_trade_table

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityEnvironmentSensor

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

Creates a trigger based on environment conditions.

Parameters:

Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_environment_sensor

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityEquipItem

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(can_wear_armor=False, excluded_items=[])

The entity puts on the desired equipment.

Parameters:

Name Type Description Default
can_wear_armor bool

If true, the entity can pick up and wear armor items from the ground. Defaults to False.

False
excluded_items list[MinecraftItemDescriptor]

List of items that the entity should not equip. Defaults to [].

[]
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_equip_item

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityEquipment

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(table)

Sets the Equipment table to use for this Entity.

Parameters:

Name Type Description Default
table LootTable | str

The file path to the equipment table, relative to the behavior pack's root.

required
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_equipment

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

slot_drop_chance(slot, drop_chance=None)

Adds a chance to drop an equipped item from a specific slot.

Parameters:

Name Type Description Default
slot str

The equipment slot name.

required
drop_chance float

The chance to drop the equipped item (0.0 to 1.0). If None, it just adds the slot string.

None

Returns:

Name Type Description
EntityEquipment

Returns the EntityEquipment component to allow for method chaining.

EntityEquippable

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

Defines an entity's behavior for having items equipped to it.

Parameters:

Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_equippable

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

slot(slot, item, accepted_items, interact_text=None, on_equip=None, on_unequip=None)

Adds a slot to the entity's equippable slots.

Parameters:

Name Type Description Default
slot int

The slot number of this slot.

required
item str

Identifier of the item that can be equipped for the slot.

required
accepted_items list[str]

The list of items that can fill this slot.

required
interact_text str

Text to be displayed while playing with touch-screen controls when the entity can be equipped with this item. Defaults to None.

None
on_equip str

Event to trigger when the entity is equipped with the item. Defaults to None.

None
on_unequip str

Event to trigger when the item is removed from the entity. Defaults to None.

None

Returns:

Name Type Description
Equippable

Returns the Equippable component to allow for method chaining.

EntityExhaustionValues

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(attack=0.1, damage=0.1, heal=6, jump=0.05, lunge=4, mine=0.005, sprint=0.01, sprint_jump=0.2, swim=0.01, walk=0.0)

Defines how much exhaustion each player action should take.

Parameters:

Name Type Description Default
attack float

Amount of exhaustion applied when attacking. Defaults to 0.1.

0.1
damage float

Amount of exhaustion applied when taking damage. Defaults to 0.1.

0.1
heal float

Amount of exhaustion applied when healed through food regeneration. Defaults to 6.

6
jump float

Amount of exhaustion applied when jumping. Defaults to 0.05.

0.05
lunge float

Amount of exhaustion applied when triggering the lunge enchantment, multiplied by the enchantment level. Defaults to 4.

4
mine float

Amount of exhaustion applied when mining. Defaults to 0.005.

0.005
sprint float

Amount of exhaustion applied when sprinting. Defaults to 0.01.

0.01
sprint_jump float

Amount of exhaustion applied when sprint jumping. Defaults to 0.2.

0.2
swim float

Amount of exhaustion applied when swimming. Defaults to 0.01.

0.01
walk float

Amount of exhaustion applied when walking. Defaults to 0.0.

0.0
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_exhaustion_values

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityExperienceReward

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(on_bred=0, on_death=0)

.

Parameters:

Name Type Description Default
on_bred int | float | Molang

A Molang expression defining the amount of experience rewarded when this entity is successfully bred. Defaults to 0.

0
on_death int | float | Molang

A Molang expression defining the amount of experience rewarded when this entity dies. Defaults to 0.

0
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_experience_reward

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityExplode

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(breaks_blocks=True, causes_fire=False, destroy_affected_by_griefing=False, fire_affected_by_griefing=False, fuse_length=[0.0, 0.0], fuse_lit=False, max_resistance=3.40282e+38, power=3, damage_scaling=1.0, toggles_blocks=False, knockback_scaling=1.0, particle_effect=ExplosionParticleEffect.Explosion, sound_effect='explode', negates_fall_damage=False, allow_underwater=True)

Defines how the entity explodes.

Parameters:

Name Type Description Default
breaks_blocks bool

If true, the explosion will destroy blocks in the explosion radius. Defaults to True.

True
causes_fire bool

If true, blocks in the explosion radius will be set on fire. Defaults to False.

False
destroy_affected_by_griefing bool

If true, whether the explosion breaks blocks is affected by the mob griefing game rule. Defaults to False.

False
fire_affected_by_griefing bool

If true, whether the explosion causes fire is affected by the mob griefing game rule. Defaults to False.

False
fuse_length tuple[float, float]

The range for the random amount of time the fuse will be lit before exploding, a negative value means the explosion will be immediate. Defaults to [0.0, 0.0].

[0.0, 0.0]
fuse_lit bool

If true, the fuse is already lit when this component is added to the entity. Defaults to False.

False
max_resistance int

A blocks explosion resistance will be capped at this value when an explosion occurs. Defaults to 3.40282e+38.

3.40282e+38
power int

The radius of the explosion in blocks and the amount of damage the explosion deals. Defaults to 3.

3
damage_scaling float

A scale factor applied to the explosion's damage to entities. A value of 0 prevents the explosion from dealing any damage. Negative values cause the explosion to heal entities instead. Defaults to 1.0.

1.0
toggles_blocks bool

If true, the explosion will toggle blocks in the explosion radius. This item requires a format version of at least 1.21.40. Defaults to False.

False
knockback_scaling float

A scale factor applied to the knockback force caused by the explosion. This item requires a format version of at least 1.21.40. Defaults to 1.0.

1.0
particle_effect ExplosionParticleEffect

The name of the particle effect to use. The accepted strings are 'explosion', 'wind_burst', or 'breeze_wind_burst'. This item requires a format version of at least 1.21.40. Defaults to ExplosionParticleEffect.Explosion.

Explosion
sound_effect str

The name of the sound effect played when the explosion triggers. This item requires a format version of at least 1.21.40. Defaults to 'explode'.

'explode'
negates_fall_damage bool

Defines whether the explosion should apply fall damage negation to Players above the point of collision. This item requires a format version of at least 1.21.40. Defaults to False.

False
allow_underwater bool

If true, the explosion will affect blocks and entities under water. This item requires a format version of at least 1.21.40. Defaults to True.

True
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_explode

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityFireImmune

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

Sets that this entity doesn't take damage from fire.

Parameters:

Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_fire_immune

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityFloatsInLiquid

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

Sets that this entity can float in liquid blocks.

This component has no configurable constructor properties.

Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_floats_in_liquid

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityFlocking

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(block_distance=0.0, block_weight=0.0, breach_influence=0.0, cohesion_threshold=1.0, cohesion_weight=1.0, goal_weight=0.0, high_flock_limit=0, in_water=False, influence_radius=0.0, inner_cohesion_threshold=0.0, loner_chance=0.0, low_flock_limit=0, match_variants=False, max_height=0.0, min_height=0.0, separation_threshold=2.0, separation_weight=1.0, use_center_of_mass=False)

Allows entities to flock in groups in water or not.

Parameters:

Name Type Description Default
block_distance float

The amount of blocks away the entity will look at to push away from. Defaults to 0.0.

0.0
block_weight float

The weight of the push back away from blocks. Defaults to 0.0.

0.0
breach_influence float

The amount of push back given to a flocker that breaches out of the water. Defaults to 0.0.

0.0
cohesion_threshold float

The threshold in which to start applying cohesion. Defaults to 1.0.

1.0
cohesion_weight float

The weight applied for the cohesion steering of the flock. Defaults to 1.0.

1.0
goal_weight float

The weight on which to apply on the goal output. Defaults to 0.0.

0.0
high_flock_limit int

Determines the high bound amount of entities that can be allowed in the flock. Defaults to 0.

0
in_water bool

Tells the Flocking Component if the entity exists in water. Defaults to False.

False
influence_radius float

The area around the entity that allows others to be added to the flock. Defaults to 0.0.

0.0
inner_cohesion_threshold float

The distance in which the flocker will stop applying cohesion. Defaults to 0.0.

0.0
loner_chance float

The percentage chance between 0-1 that a fish will spawn and not want to join flocks. Invalid values will be capped at the end points. Defaults to 0.0.

0.0
low_flock_limit int

Determines the low bound amount of entities that can be allowed in the flock. Defaults to 0.

0
match_variants bool

Tells the flockers that they can only match similar entities that also match the variant, mark variants, and color data of the other potential flockers. Defaults to False.

False
max_height float

The max height allowable in the air or water. Defaults to 0.0.

0.0
min_height float

The min height allowable in the air or water. Defaults to 0.0.

0.0
separation_threshold float

The distance that is determined to be to close to another flocking and to start applying separation. Defaults to 2.0.

2.0
separation_weight float

The weight applied to the separation of the flock. Defaults to 1.0.

1.0
use_center_of_mass bool

Tells the flockers that they will follow flocks based on the center of mass. Defaults to False.

False
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_flocking

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityFlyingSpeed

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(value)

Speed in Blocks that this entity flies at.

Parameters:

Name Type Description Default
value int

Flying speed in blocks per tick.

required
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_flying_speed

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityFlyingSpeedMeters

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(value, max=None)

Speed in Blocks that this entity flies at.

Parameters:

Name Type Description Default
value float

Flying speed in blocks per tick.

required
max float

Description. Defaults to None.

None
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_flying_speed

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityFollowRange

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(value, max_range=None)

Defines the maximum range, in blocks, that a mob will pursue a target. This affects AI behaviors like chasing players or attacking.

Parameters:

Name Type Description Default
value int

The default follow range in blocks. Entities will attempt to stay within this radius of their target.

required
max_range int

Maximum follow distance in blocks. The entity will not pursue targets beyond this range. Defaults to None.

None
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_follow_range

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityFreeCameraControlled

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(backwards_movement_modifier=0.5, strafe_speed_modifier=0.4)

When configured as a rideable entity, the entity will be controlled using WASD controls and mouse to move in three dimensions.

Parameters:

Name Type Description Default
backwards_movement_modifier float

Modifies speed going backwards. Defaults to 0.5.

0.5
strafe_speed_modifier float

Modifies the strafe speed. Defaults to 0.4.

0.4
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_free_camera_controlled

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityFrictionModifier

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(value)

Defines how much friction affects this entity.

Parameters:

Name Type Description Default
value int

The higher the number, the more friction affects this entity. A value of 1.0 means regular friction, while 2.0 means twice as much.

required
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_friction_modifier

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityGameEventMovementTracking

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(emit_flap=False, emit_move=True, emit_swim=True)

Allows an entity to emit entityMove, swim and flap game events, depending on the block the entity is moving through. It is added by default to every mob. Add it again to override its behavior.

Parameters:

Name Type Description Default
emit_flap bool

If true, the flap game event will be emitted when the entity moves through air. Defaults to False.

False
emit_move bool

If true, the entityMove game event will be emitted when the entity moves on ground or through a solid. Defaults to True.

True
emit_swim bool

If true, the swim game event will be emitted when the entity moves through a liquid. Defaults to True.

True
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_game_event_movement_tracking

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityGenetics

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(mutation_rate=0.03125)

Defines the way a mob's genes and alleles are passed on to its offspring, and how those traits manifest in the child. Compatible parent genes are crossed together, the alleles are handed down from the parents to the child, and any matching genetic variants fire off JSON events to modify the child and express the traits.

Parameters:

Name Type Description Default
mutation_rate float

If this value is non-negative, overrides the chance for this gene that an allele will be replaced with a random one instead of the parent's allele during birth. Defaults to 0.03125.

0.03125
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_genetics

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityGiveable

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(cooldown=0.0)

Defines sets of items that can be used to trigger events when used on this entity. The item will also be taken and placed in the entity's inventory.

Parameters:

Name Type Description Default
cooldown Seconds

An optional cool down in seconds to prevent spamming interactions. Defaults to 0.0.

0.0
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_giveable

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityGroundOffset

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(value=0)

Sets the offset from the ground that the entity is actually at.

Parameters:

Name Type Description Default
value float

The value of the entity's offset from the terrain, in blocks. Defaults to 0.

0
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_ground_offset

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityGrowsCrop

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(chance=0.0, charges=10)

Could increase crop growth when entity walks over crop.

Parameters:

Name Type Description Default
chance float

Value between 0-1. Chance of success per tick. Defaults to 0.0.

0.0
charges int

Number of charges. Defaults to 10.

10
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_grows_crop

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityHealable

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(filters=None, force_use=False)

How entities heal.

Parameters:

Name Type Description Default
filters Filter

The filter group that defines the conditions for using this item to heal the entity. Defaults to None.

None
force_use bool

Determines if item can be used regardless of entity being at full health. Defaults to False.

False
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_healable

__iter__()

Iterates over the component's fields.

add_heal_item(item, heal_amount, result_item=None)

Adds a healing item to the healable component.

Parameters:

Name Type Description Default
item str

The item that can heal the entity.

required
heal_amount float

The amount of health the item restores.

required

Returns:

Name Type Description
dict dict

A dictionary containing the healing item information.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityHealth

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(value, min=None, max=None)

Defines the health pool for an entity, measured in health points (1 point = half a heart). Typical values: cow (10), zombie (20), iron golem (100), wither (600).

Parameters:

Name Type Description Default
value int

Starting health for this entity in health points (1 point = half a heart).

required
min int

Description. Defaults to None.

None
max int

Maximum health this entity can have. Can be higher than the starting value to allow healing beyond initial health. Defaults to None.

None
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_health

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityHeartbeat

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(interval=1.0, sound_event='heartbeat')

Defines the entity's heartbeat.

Parameters:

Name Type Description Default
interval Molang | str | float

A Molang expression defining the inter-beat interval in seconds. A value of zero or less means no heartbeat. Defaults to 1.0.

1.0
sound_event str

Level sound event to be played as the heartbeat sound. Defaults to "heartbeat".

'heartbeat'
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_heartbeat

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityHide

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

Moves to and hides at their owned POI or the closest nearby.

Parameters:

Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_hide

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityHome

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(home_block_list=None, restriction_radius=0, restriction_type='none')

Saves a home position for when the entity is spawned. This component allows entities like bees to remember and return to a specific location such as a hive or nest.

Parameters:

Name Type Description Default
home_block_list list[MinecraftBlockDescriptor | Identifier]

Optional list of blocks that can be considered a valid home. Defaults to None.

None
restriction_radius int

Optional radius that the entity will be restricted to in relation to its home. Defaults to 0.

0
restriction_type Literal[none, random_movement, all_movement]

Defines how the entity will be restricted to its home position. Defaults to "none".

'none'
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_home

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityHorseJumpStrength

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(range_min, range_max)

Determines the jump height for a horse or similar entity, like a donkey.

Parameters:

Name Type Description Default
range_min float

Defines the minimum strength level.

required
range_max float

Defines the maximum strength level.

required
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_horse.jump_strength?view=minecraft-bedrock-stable

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityHurtOnCondition

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(cause=None, filters=None, damage_per_tick=1)

Defines a set of conditions under which an entity should take damage.

Parameters:

Name Type Description Default
cause DamageCause

The kind of damage that is caused to the entity. Various armors and spells use this to determine if the entity is immune. Defaults to None.

None
filters Filter

The set of conditions that must be satisfied before the entity takes the defined damage. Defaults to None.

None
damage_per_tick int

The amount of damage done each tick that the conditions are met. Defaults to 1.

1
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_hurt_on_condition

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityIgnoreCannotBeAttacked

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(filters=None)

When set, blocks entities from attacking the owner entity unless they have the "minecraft:ignore_cannot_be_attacked" component.

Parameters:

Name Type Description Default
filters Filter

Defines which entities are exceptions and are allowed to be attacked by the owner entity, potentially attacked entity is subject "other". Defaults to None.

None
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_ignore_cannot_be_attacked

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityInputAirControlled

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(backwards_movement_modifier=0.5, strafe_speed_modifier=0.4)

When configured as a rideable entity, the entity will be controlled using WASD controls and mouse to move in three dimensions.

Parameters:

Name Type Description Default
backwards_movement_modifier float

Modifies speed going backwards. Defaults to 0.5.

0.5
strafe_speed_modifier float

Modifies the strafe speed. Defaults to 0.4.

0.4
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_input_air_controlled

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityInputGroundControlled

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

When configured as a rideable entity, the entity will be controlled using WASD controls. Beginning with 1.19.50 the default auto step height for rideable entities is half a block. Consider adding the "minecraft:variable_max_auto_step" component to increase it.

Parameters:

Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_input_ground_controlled

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityInsideBlockNotifier

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

Verifies whether the entity is inside any of the listed blocks.

Parameters:

Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_inside_block_notifier

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityInsomnia

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(days_until_insomnia=3)

Adds a timer since last rested to see if phantoms should spawn.

Parameters:

Name Type Description Default
days_until_insomnia float

Number of days the mob has to stay up until the insomnia effect begins. Defaults to 3.

3
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_insomnia

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityInstantDespawn

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(remove_child_entities=False)

Despawns the Actor immediately.

Parameters:

Name Type Description Default
remove_child_entities bool

If true, all entities linked to this entity in a child relationship (eg. leashed) will also be despawned. Defaults to False.

False
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_instant_despawn

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityInteract

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

Defines interactions with this entity.

Parameters:

Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_interact

__iter__()

Iterates over the component's fields.

add_interaction(event, filter=None, add_items=None, cooldown=0.0, cooldown_after_being_attacked=0.0, drop_item_slot=-1, equip_item_slot=-1, health_amount=0, hurt_item=0, interact_text=None, play_sounds=None, spawn_entities=None, spawn_items=None, swing=True, transform_to_item=None, use_item=False, vibration=Vibrations.EntityInteract, repair_entity_item=None)

Adds an interaction to the entity.

Parameters:

Name Type Description Default
event str

Event to trigger when the interaction occurs.

required
filter Filter

Filter to determine which entities can interact with this entity. Defaults to None.

None
add_items str

File path, relative to the behavior Pack's path, to the loot table file. Defaults to None.

None
cooldown float

Time in seconds before this entity can be interacted with again. Defaults to 0.0.

0.0
cooldown_after_being_attacked float

Time in seconds before this entity can be interacted with after being attacked. Defaults to 0.0.

0.0
drop_item_slot int | Slots

Slot from which the item will be dropped when interacting with this entity. Defaults to -1.

-1
equip_item_slot int | Slots

Slot from which the item will be equipped when interacting with this entity. Defaults to -1.

-1
health_amount int

The amount of health this entity will recover or hurt when interacting with this item. Negative values will harm the entity. Defaults to 0.

0
hurt_item int

The amount of damage the item will take when used to interact with this entity. A value of 0 means the item won't lose durability. Defaults to 0.

0
interact_text str

Text to show while playing with touch-screen controls when the player is able to interact in this way with this entity. Defaults to None.

None
play_sounds str

One or more sound identifiers to play when the interaction occurs. Defaults to None.

None
spawn_entities str

Entity to spawn when the interaction occurs. Defaults to None.

None
spawn_items str

Loot table with items to drop on the ground upon successful interaction. Defaults to None.

None
swing bool

If true, the player will do the 'swing' animation when interacting with this entity. Defaults to False.

True
transform_to_item str

The item used will transform to this item upon successful interaction. Format: itemName:auxValue. Defaults to None.

None
use_item bool

If true, the interaction will use an item. Defaults to False.

False
vibration str

Vibration to emit when the interaction occurs. Admitted values are entity_interact (used by default), shear, and none (no vibration emitted). Defaults to None.

EntityInteract
repair_entity_item tuple[Slots, int]

Slot and amount to repair the item used to interact with this entity. Defaults to None.

None
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_interact?view=minecraft-bedrock-stable#parameter

particle_on_start(particle_type, particle_offset_towards_interactor=False, particle_y_offset=0.0)

Adds a particle effect when the interaction starts.

Parameters:

Name Type Description Default
particle_type str

Name of the particle system to run.

required
particle_offset_towards_interactor bool

Whether or not the particle will appear closer to who performed the interaction. Defaults to False.

False
particle_y_offset float

Vertical offset of the particle system. Defaults to 0.0.

0.0
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_interact?view=minecraft-bedrock-stable#particle_on_start

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityInventory

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(additional_slots_per_strength=0, can_be_siphoned_from=False, container_type=ContainerType.Inventory, inventory_size=5, private=False, restrict_to_owner=False)

Defines this entity's inventory properties.

Parameters:

Name Type Description Default
additional_slots_per_strength int

Number of slots that this entity can gain per extra strength. Defaults to 0.

0
can_be_siphoned_from bool

If true, the contents of this inventory can be removed by a hopper. Defaults to False.

False
container_type ContainerType

Type of container this entity has. Can be horse, minecart_chest, chest_boat, minecart_hopper, inventory, container or hopper. Defaults to ContainerType.Inventory.

Inventory
inventory_size int

Number of slots the container has. Defaults to 5.

5
private bool

If true, the entity will not drop its inventory on death. Defaults to False.

False
restrict_to_owner bool

If true, the entity's inventory can only be accessed by its owner or itself. Defaults to False.

False
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_inventory

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityIsBaby

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

Sets that this entity is a baby. This is used to set the is_baby value for use in query functions like Molang and Filters.

Parameters:

Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_is_baby

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityIsCharged

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

Sets that this entity is charged. This is used to set the is_charged value for use in query functions like Molang and Filters.

Parameters:

Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_is_charged

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityIsChested

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

Sets that this entity is currently carrying a chest.

Parameters:

Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_is_chested

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityIsCollidable

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

Allows other mobs to have vertical and horizontal collisions with this mob. For a collision to occur, both mobs must have a "minecraft:collision_box" component. This component can only be used on mobs and enables collisions exclusively between mobs. Please note that this type of collision is unreliable for moving collidable mobs. It is recommended to use this component only in scenarios where the collidable mob remains stationary. Collidable behavior is closely related to stackable behavior. While the "minecraft:is_collidable" component governs how other mobs interact with the component's owner, the "minecraft:is_stackable" component describes how an entity interacts with others of its own kind.

Parameters:

Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_is_collidable

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityIsHiddenWhenInvisible

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

The entity can hide from hostile mobs while invisible.

Parameters:

Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_is_hidden_when_invisible

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityIsIgnited

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

Sets that this entity is currently on fire.

Parameters:

Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_is_ignited

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityIsIllagerCaptain

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

Sets that this entity is an Illager Captain.

Parameters:

Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_is_illager_captain

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityIsPregnant

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

Sets that this entity is currently pregnant.

This component has no configurable constructor properties.

Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_is_pregnant

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityIsSaddled

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

Sets that this entity is currently saddled.

Parameters:

Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_is_saddled

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityIsShaking

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

Sets that this entity is currently shaking.

This component has no configurable constructor properties.

Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_is_shaking

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityIsSheared

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

Sets that this entity is currently sheared.

Parameters:

Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_is_sheared

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityIsStackable

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

Allows instances of this entity to have vertical and horizontal collisions with each other. For a collision to occur, both instances must have a "minecraft:collision_box" component. Stackable behavior is closely related to collidable behavior. While the "minecraft:is_stackable" component describes how an entity interacts with others of its own kind, the "minecraft:is_collidable" component governs how other mobs interact with the component's owner.

Parameters:

Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_is_stackable

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityIsStunned

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

Sets that this entity is currently stunned.

Parameters:

Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_is_stunned

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityIsTamed

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

Sets that this entity is currently tamed.

Parameters:

Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_is_tamed

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityItemControllable

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

Defines what items can be used to control this entity while ridden.

This component has no configurable constructor properties. Use add_control_item to append valid control items.

Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_item_controllable

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityItemHopper

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

Determines that this entity is an item hopper.

Parameters:

Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_item_hopper

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityJumpDynamic

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

Defines a dynamic type jump control that will change jump properties based on the speed modifier of the mob. Requires minecraft:movement.skip to be used.

Documentation reference:
https://learn.microsoft.com/pt-br/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_jump.dynamic

__iter__()

Iterates over the component's fields.

fast_skip_data(animation_duration, distance_scale, height, jump_delay)

Sets the fast skip data for the entity's jump.

Parameters:

Name Type Description Default
animation_duration float

Duration of the jump animation.

required
distance_scale float

The multiplier applied to horizontal velocity when jumping.

required
height float

The force applied vertically when jumping.

required
jump_delay float

Amount of ticks between sequential jumps.

required

regular_skip_data(animation_duration, distance_scale, height, jump_delay)

Sets the regular skip data for the entity's jump.

Parameters:

Name Type Description Default
animation_duration float

Duration of the jump animation.

required
distance_scale float

The multiplier applied to horizontal velocity when jumping.

required
height float

The force applied vertically when jumping.

required
jump_delay float

Amount of ticks between sequential jumps.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityJumpStatic

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(jump_power=0.42)

Gives the entity the ability to jump.

Parameters:

Name Type Description Default
jump_power float

The initial vertical velocity for the jump. Defaults to 0.42.

0.42
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_jump.static?view=minecraft-bedrock-stable

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityKnockbackResistance

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(value)

Determines an entity's resistance to knockback from melee attacks. A value of 0.0 means no resistance, while 1.0 provides full immunity to knockback (like iron golems).

Parameters:

Name Type Description Default
value float

The amount of knockback resistance, from 0.0 (none) to 1.0 (full immunity).

required
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_knockback_resistance

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityLavaMovement

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(value)

Allows a custom movement speed across lava blocks.

Parameters:

Name Type Description Default
value float

The speed the mob moves over a lava block.

required
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_lava_movement

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityLeashable

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(can_be_cut=True, can_be_stolen=True, hard_distance=6, max_distance=None, soft_distance=4, on_unleash_interact_only=False)

Describes how this mob can be leashed to other items.

Parameters:

Name Type Description Default
can_be_cut bool

If true, players can cut both incoming and outgoing leashes by using shears on the entity. Defaults to True.

True
can_be_stolen bool

If true, players can leash this entity even if it is already leashed to another entity. Defaults to True.

True
hard_distance int

Distance (in blocks) over which the entity starts being pulled towards the leash holder with a spring-like force. Defaults to 6.

6
max_distance int

Distance in blocks at which the leash breaks. Defaults to None.

None
soft_distance int

Distance (in blocks) over which the entity starts pathfinding toward the leash holder, if able. Defaults to 4.

4
on_unleash_interact_only bool

When set to true, "on_unleash" does not trigger when the entity gets unleashed for reasons other than the player directly interacting with it. Defaults to False.

False
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_leashable

__iter__()

Iterates over the component's fields.

on_unleash(event, interact_only=False, target=FilterSubject.Self)

Defines the event to trigger when the entity is unleashed.

Parameters:

Name Type Description Default
event str

The event to trigger when the entity is unleashed.

required
interact_only bool

If true, the event will only trigger when the player directly interacts with the entity. Defaults to False.

False
target FilterSubject

The target of the event. Defaults to FilterSubject.Self.

Self

Returns:

Name Type Description
dict dict

A dictionary containing the unleash information.

preset(filter=None, hard_distance=7, max_distance=12, rotation_adjustment=0, soft_distance=4, spring_type=LeashSpringType.Dampened)

Defines a preset for the leashable component.

Parameters:

Name Type Description Default
filter Filter

Conditions that must be met for this preset to be applied. Defaults to None.

None
hard_distance int

Distance (in blocks) over which the entity starts being pulled toward the leash holder with a spring-like force. Defaults to 7.

7
max_distance int

Distance in blocks at which the leash breaks. Defaults to 12.

12
rotation_adjustment float

Adjusts the rotation at which the entity reaches equilibrium. Defaults to 0.

0
soft_distance float

Distance (in blocks) over which the entity begins pathfinding toward the leash holder. Defaults to 4.

4
spring_type LeashSpringType

Defines the type of spring-like force that pulls the entity towards its leash holder. Defaults to LeashSpringType.Dampened.

Dampened

Returns:

Name Type Description
dict dict

A dictionary containing the preset information.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityLeashableTo

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(can_retrieve_from=False)

Allows players to leash entities to this entity, retrieve entities already leashed to it, or free them using shears. For the last interaction to work, the leashed entities must have "can_be_cut" set to true in their "minecraft:leashable" component.

Parameters:

Name Type Description Default
can_retrieve_from bool

Allows players to retrieve entities that are leashed to this entity. Defaults to False.

False
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_leashable_to

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityLookedAt

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(field_of_view=26, filters=None, find_players_only=False, line_of_sight_obstruction_type=LineOfSightObstructionType.Collision, look_at_locations=None, looked_at_cooldown=(0, 0), looked_at_event=None, not_looked_at_event=None, scale_fov_by_distance=True, search_radius=10, set_target=LootedAtSetTarget.OnceAndStopScanning)

Defines the behavior when another entity looks at the owner entity.

Parameters:

Name Type Description Default
field_of_view float

Defines, in degrees, the width of the field of view for entities looking at the owner entity. Defaults to 26.

26
filters Filter

Defines which entities are considered when searching for entities looking at the owner entity. Defaults to None.

None
find_players_only bool

Limits the search to only the nearest Player that meets the specified "filters" rather than all nearby entities. Defaults to False.

False
line_of_sight_obstruction_type LineOfSightObstructionType

Defines the type of block shape used to check for line of sight obstructions. Valid values: "outline", "collision", "collision_for_camera". Defaults to LineOfSightObstructionType.Collision.

Collision
look_at_locations list[LookAtLocation]

A list of locations on the owner entity towards which line of sight checks are performed. At least one location must be unobstructed for the entity to be considered as looked at. Defaults to None.

None
looked_at_cooldown tuple[Seconds, Seconds]

Specifies the range for the random number of seconds that must pass before the owner entity can check again for entities looking at it, after detecting an entity looking at it. Defaults to (0, 0).

(0, 0)
looked_at_event str

Defines the event to trigger when an entity is detected looking at the owner entity. Defaults to None.

None
not_looked_at_event str

Defines the event to trigger when no entity is found looking at the owner entity. Defaults to None.

None
scale_fov_by_distance bool

When true, the field of view narrows as the distance between the owner entity and the entity looking at it increases. Defaults to True.

True
search_radius float

Maximum distance the owner entity will search for entities looking at it. Defaults to 10.

10
set_target LootedAtSetTarget

Defines if and how the owner entity will set entities that are looking at it as its combat targets. Valid values: 'never', 'once_and_stop_scanning', 'once_and_keep_scanning'. Defaults to LootedAtSetTarget.OnceAndStopScanning.

OnceAndStopScanning
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_looked_at

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityLoot

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(loot_table)

Specifies the loot table that determines what items this entity drops upon death. The table path is relative to the behavior pack's root folder.

Parameters:

Name Type Description Default
loot_table LootTable | str

Path to the loot table JSON file, relative to the behavior pack's root (e.g., 'loot_tables/entities/zombie.json').

required
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_loot

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityManagedWanderingTrader

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

Manages the entity's ability to trade.

This component has no configurable constructor properties.

Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_managed_wandering_trader

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityMarkVariant

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(value)

Mark Variant is typically used as an additional per-type way (besides variant) to express a different visual form of the same mob.

Parameters:

Name Type Description Default
value int

The Id of the mark_variant. By convention, 0 is the Id of the base entity.

required
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_mark_variant

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityMobEffect

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(mob_effect, entity_filter, cooldown_time=0, effect_range=0.2, effect_time=10, ambient=False)

A component that applies a mob effect to entities that get within range.

Parameters:

Name Type Description Default
mob_effect MinecraftEffects

The mob effect that is applied to entities that enter this entities effect range.

required
entity_filter Filter

The set of entities that are valid to apply the mob effect to.

required
cooldown_time int

Time in seconds to wait between each application of the effect. Defaults to 0.

0
effect_range float

How close a hostile entity must be to have the mob effect applied. Defaults to 0.2.

0.2
effect_time int

How long the applied mob effect lasts in seconds. Can also be set to "infinite". Defaults to 10.

10
ambient bool

If the effect is considered an ambient effect (like the ones applied by Beacons or Conduits). Defaults to False.

False
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_mob_effect

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityMobEffectImmunity

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(mob_effects=None)

Entities with this component will have an immunity to the provided mob effects.

Parameters:

Name Type Description Default
mob_effects list[MinecraftEffects | str]

List of names of effects the entity is immune to. Defaults to None.

None
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_mob_effect_immunity

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityMovement

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(value, max=None)

Defines the base movement speed of an entity. Typical values: creeper (0.2), cow (0.25), zombie baby (0.35).

Parameters:

Name Type Description Default
value int

The base movement speed value. Higher values result in faster movement. Can be a single number or a range object with range_min and range_max properties.

required
max int

Maximum movement speed this entity can have. Defaults to None.

None
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_movement

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityMovementMeters

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(value, max=None)

Defines the base movement speed of an entity. Typical values: creeper (0.2), cow (0.25), zombie baby (0.35).

Parameters:

Name Type Description Default
value float

The base movement speed value. Higher values result in faster movement. Can be a single number or a range object with range_min and range_max properties.

required
max float

Maximum movement speed this entity can have. Defaults to None.

None
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_movement

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityMovementSoundDistanceOffset

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(value)

Sets the offset used to determine the next step distance for playing a movement sound.

Parameters:

Name Type Description Default
value float

The higher the number, the less often the movement sound will be played.

required
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_movement.sound_distance_offset?view=minecraft-bedrock-stable

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityMovementType

Amphibious(max_turn=30) staticmethod

Allows the mob to swim in water and walk on land.

Dolphin() staticmethod

Allows the mob to swim in water like a dolphin.

Fly(max_turn=30, start_speed=0.1, speed_when_turning=0.2) staticmethod

Causes the mob to fly.

Generic(max_turn=30) staticmethod

Allows a mob to fly, swim, climb, etc.

Glide(max_turn=30, start_speed=0.1, speed_when_turning=0.2) staticmethod

Is the move control for a flying mob that has a gliding movement.

Hover(max_turn=30) staticmethod

Causes the mob to hover.

Jump(max_turn=30, jump_delay=(0, 0)) staticmethod

Causes the mob to jump as it moves with a specified delay between jumps.

Skip(max_turn=30) staticmethod

Causes the mob to hop as it moves.

Sway(max_turn=30, sway_amplitude=0.05, sway_frequency=0.5) staticmethod

Causes the mob to sway side to side giving the impression it is swimming.

EntityNPC

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(skin_list)

Allows an entity to be an NPC.

Parameters:

Name Type Description Default
skin_list list[int]

Description.

required
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_npc

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityNameable

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(allow_name_tag_renaming=True, always_show=False)

Allows this entity to be named (e.g. using a name tag).

Parameters:

Name Type Description Default
allow_name_tag_renaming bool

If true, this entity can be renamed with name tags. Defaults to True.

True
always_show bool

If true, the name will always be shown. Defaults to False.

False
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_nameable

__iter__()

Iterates over the component's fields.

default_trigger(event, target=FilterSubject.Self)

Sets the default trigger event for the nameable component.

Parameters:

Name Type Description Default
event str

The event to trigger when the entity is named.

required
target FilterSubject

The target of the event. Defaults to FilterSubject.Self.

Self

name_action(name, event, target=FilterSubject.Self)

Adds a name action to the nameable component.

Parameters:

Name Type Description Default
name str

The name that triggers the event.

required
event str

The event to trigger when the entity is named.

required
target FilterSubject

The target of the event. Defaults to FilterSubject.Self.

Self

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityNavigationType

Climb(avoid_damage_blocks=False, avoid_portals=False, avoid_sun=False, avoid_water=False, can_breach=False, can_break_doors=False, can_float=False, can_jump=True, can_open_doors=False, can_open_iron_doors=False, can_pass_doors=True, can_path_from_air=False, can_path_over_lava=False, can_path_over_water=False, can_sink=True, can_swim=False, can_walk=True, can_walk_in_lava=False, is_amphibious=False, blocks_to_avoid=[]) staticmethod

Allows this entity to generate paths that include vertical walls like the vanilla Spiders do.

Float(avoid_damage_blocks=False, avoid_portals=False, avoid_sun=False, avoid_water=False, can_breach=False, can_break_doors=False, can_jump=True, can_float=False, can_open_doors=False, can_open_iron_doors=False, can_pass_doors=True, can_path_from_air=False, can_path_over_lava=False, can_path_over_water=False, can_sink=True, can_swim=False, can_walk=True, can_walk_in_lava=False, is_amphibious=False, blocks_to_avoid=[]) staticmethod

Allows this entity to generate paths by flying around the air like the regular Ghast.

Fly(avoid_damage_blocks=False, avoid_portals=False, avoid_sun=False, avoid_water=False, can_breach=False, can_break_doors=False, can_jump=True, can_float=False, can_open_doors=False, can_open_iron_doors=False, can_pass_doors=True, can_path_from_air=False, can_path_over_lava=False, can_path_over_water=False, can_sink=True, can_swim=False, can_walk=True, can_walk_in_lava=False, is_amphibious=False, blocks_to_avoid=[]) staticmethod

Allows this entity to generate paths in the air like the vanilla Parrots do.

Generic(avoid_damage_blocks=False, avoid_portals=False, avoid_sun=False, avoid_water=False, can_breach=False, can_break_doors=False, can_jump=True, can_float=False, can_open_doors=False, can_open_iron_doors=False, can_pass_doors=True, can_path_from_air=False, can_path_over_lava=False, can_path_over_water=False, can_sink=True, can_swim=False, can_walk=True, can_walk_in_lava=False, is_amphibious=False, blocks_to_avoid=[]) staticmethod

Allows this entity to generate paths by walking, swimming, flying and/or climbing around and jumping up and down a block.

Hover(avoid_damage_blocks=False, avoid_portals=False, avoid_sun=False, avoid_water=False, can_breach=False, can_break_doors=False, can_jump=True, can_float=False, can_open_doors=False, can_open_iron_doors=False, can_pass_doors=True, can_path_from_air=False, can_path_over_lava=False, can_path_over_water=False, can_sink=True, can_swim=False, can_walk=True, can_walk_in_lava=False, is_amphibious=False, blocks_to_avoid=[]) staticmethod

Allows this entity to generate paths in the air like the vanilla Bees do. Keeps them from falling out of the skies and doing predictive movement.

Swim(avoid_damage_blocks=False, avoid_portals=False, avoid_sun=False, avoid_water=False, can_breach=False, can_break_doors=False, can_jump=True, can_float=False, can_open_doors=False, can_open_iron_doors=False, can_pass_doors=True, can_path_from_air=False, can_path_over_lava=False, can_path_over_water=False, can_sink=True, can_swim=False, can_walk=True, can_walk_in_lava=False, is_amphibious=False, blocks_to_avoid=[]) staticmethod

Allows this entity to generate paths that include water.

Walk(avoid_damage_blocks=False, avoid_portals=False, avoid_sun=False, avoid_water=False, can_breach=False, can_break_doors=False, can_jump=True, can_float=False, can_open_doors=False, can_open_iron_doors=False, can_pass_doors=True, can_path_from_air=False, can_path_over_lava=False, can_path_over_water=False, can_sink=True, can_swim=False, can_walk=True, can_walk_in_lava=False, is_amphibious=False, blocks_to_avoid=[]) staticmethod

Allows this entity to generate paths by walking around and jumping up and down a block like regular mobs.

EntityOffspring

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(blend_attributes=True, inherit_tamed=True, mutation_strategy=BreedingMutationStrategy.None_, offspring_pairs=None, combine_parent_colors=None, parent_centric_attribute_blending=None, property_inheritance=None, random_extra_variant_mutation_interval=(0, 0), random_variant_mutation_interval=(0, 0))

Defines the way an entity can create a born offspring.

Parameters:

Name Type Description Default
blend_attributes bool

If true, the entities will blend their attributes in the offspring after they breed. Defaults to True.

True
inherit_tamed bool

If true, the babies will be automatically tamed if its parents are. Defaults to True.

True
mutation_strategy BreedingMutationStrategy

Description. Defaults to BreedingMutationStrategy.None_.

None_
offspring_pairs list[tuple[MinecraftEntityDescriptor | Identifier, MinecraftEntityDescriptor | Identifier]]

The map of entity to offspring definitions that this entity can make offspring with. Defaults to None.

None
combine_parent_colors bool

Description. Defaults to None.

None
parent_centric_attribute_blending list[Component]

List of attributes that should benefit from parent centric attribute blending. For example, horses blend their health, movement, and jump_strength in their offspring. Defaults to None.

None
property_inheritance list[str]

List of Entity Properties that should be inherited from the parent entities and potentially mutated. Defaults to None.

None
random_extra_variant_mutation_interval tuple[int, int]

Range used to determine random extra variant. Defaults to (0, 0).

(0, 0)
random_variant_mutation_interval tuple[int, int]

Range used to determine random variant. Defaults to (0, 0).

(0, 0)
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_offspring

__iter__()

Iterates over the component's fields.

deny_parents_variant(chance, min_variant, max_variant)

Defines the chance of denying the parents' variant.

Parameters:

Name Type Description Default
chance float

The percentage chance of denying the parents' variant.

required
min_variant str

The inclusive minimum of the variant range.

required
max_variant str

The inclusive maximum of the variant range.

required

Returns:

Name Type Description
dict dict

A dictionary containing the deny parents variant information.

mutation_factor(color, extra_variant, variant)

Defines the mutation factor for the entity.

Parameters:

Name Type Description Default
color float

The percentage chance of denying the parents' variant.

required
extra_variant float

The percentage chance of a mutation on the entity's extra variant type.

required
variant float

The percentage chance of a mutation on the entity's variant type.

required

Returns:

Name Type Description
dict dict

A dictionary containing the mutation factor information.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityOnDeath

Bases: EventTrigger

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(event, filters=None, target=FilterSubject.Self)

Adds a trigger to call on this entity's death.

Parameters:

Name Type Description Default
event str

The event to run when the conditions for this trigger are met.

required
filters Filter

The list of conditions for this trigger to execute. Defaults to None.

None
target FilterSubject

The target of the event. Defaults to FilterSubject.Self.

Self
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitytriggers/minecrafttrigger_on_death

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityOnFriendlyAnger

Bases: EventTrigger

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(event, filters=None, target=FilterSubject.Self)

Adds a trigger that will run when a nearby entity of the same type as this entity becomes Angry.

Parameters:

Name Type Description Default
event str

The event to run when the conditions for this trigger are met.

required
filters Filter

The list of conditions for this trigger to execute. Defaults to None.

None
target FilterSubject

The target of the event. Defaults to FilterSubject.Self.

Self
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitytriggers/minecrafttrigger_on_friendly_anger

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityOnHurt

Bases: EventTrigger

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(event, filters=None, target=FilterSubject.Self)

Adds a trigger to call when this entity takes damage.

Parameters:

Name Type Description Default
event str

The event to run when the conditions for this trigger are met.

required
filters Filter

The list of conditions for this trigger to execute. Defaults to None.

None
target FilterSubject

The target of the event. Defaults to FilterSubject.Self.

Self
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitytriggers/minecrafttrigger_on_hurt

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityOnHurtByPlayer

Bases: EventTrigger

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(event, filters=None, target=FilterSubject.Self)

Adds a trigger to call when this entity is attacked by the player.

Parameters:

Name Type Description Default
event str

The event to run when the conditions for this trigger are met.

required
filters Filter

The list of conditions for this trigger to execute. Defaults to None.

None
target FilterSubject

The target of the event. Defaults to FilterSubject.Self.

Self
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitytriggers/minecrafttrigger_on_hurt_by_player

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityOnIgnite

Bases: EventTrigger

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(event, filters=None, target=FilterSubject.Self)

Adds a trigger to call when this entity is set on fire.

Parameters:

Name Type Description Default
event str

The event to run when the conditions for this trigger are met.

required
filters Filter

The list of conditions for this trigger to execute. Defaults to None.

None
target FilterSubject

The target of the event. Defaults to FilterSubject.Self.

Self
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitytriggers/minecrafttrigger_on_ignite

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityOnStartLanding

Bases: EventTrigger

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(event, filters=None, target=FilterSubject.Self)

Only usable by the Ender Dragon. Adds a trigger to call when this entity lands.

Parameters:

Name Type Description Default
event str

The event to run when the conditions for this trigger are met.

required
filters Filter

The list of conditions for this trigger to execute. Defaults to None.

None
target FilterSubject

The target of the event. Defaults to FilterSubject.Self.

Self
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitytriggers/minecrafttrigger_on_start_landing

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityOnStartTakeoff

Bases: EventTrigger

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(event, filters=None, target=FilterSubject.Self)

Only usable by the Ender Dragon. Adds a trigger to call when this entity starts flying.

Parameters:

Name Type Description Default
event str

The event to run when the conditions for this trigger are met.

required
filters Filter

The list of conditions for this trigger to execute. Defaults to None.

None
target FilterSubject

The target of the event. Defaults to FilterSubject.Self.

Self
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitytriggers/minecrafttrigger_on_start_takeoff

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityOnTargetAcquired

Bases: EventTrigger

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(event, filters=None, target=FilterSubject.Self)

Adds a trigger to call when this entity finds a target.

Parameters:

Name Type Description Default
event str

The event to run when the conditions for this trigger are met.

required
filters Filter

The list of conditions for this trigger to execute. Defaults to None.

None
target FilterSubject

The target of the event. Defaults to FilterSubject.Self.

Self
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitytriggers/minecrafttrigger_on_target_acquired

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityOnTargetEscaped

Bases: EventTrigger

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(event, filters=None, target=FilterSubject.Self)

Adds a trigger to call when this entity loses the target it currently has.

Parameters:

Name Type Description Default
event str

The event to run when the conditions for this trigger are met.

required
filters Filter

The list of conditions for this trigger to execute. Defaults to None.

None
target FilterSubject

The target of the event. Defaults to FilterSubject.Self.

Self
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitytriggers/minecrafttrigger_on_target_escaped

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityOnWakeWithOwner

Bases: EventTrigger

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(event, filters=None, target=FilterSubject.Self)

A trigger when a mob's tamed onwer wakes up.

Parameters:

Name Type Description Default
event str

The event to run when the conditions for this trigger are met.

required
filters Filter

The list of conditions for this trigger to execute. Defaults to None.

None
target FilterSubject

The target of the event. Defaults to FilterSubject.Self.

Self
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitytriggers/minecrafttrigger_on_wake_with_owner

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityOutOfControl

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

Defines the entity's 'out of control' state.

Parameters:

Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_out_of_control

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityPeek

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

Defines the entity's 'peek' behavior, defining the events that should be called during it.

This component has no configurable constructor properties. Use on_close, on_open, and on_target_open to define the event triggers.

Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_peek

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityPersistent

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

Defines whether an entity should be persistent in the game world.

Parameters:

Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_persistent

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityPhysics

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(has_collision=True, has_gravity=True, push_towards_closest_space=False)

Defines physics properties of an actor, including if it is affected by gravity or if it collides with objects.

Parameters:

Name Type Description Default
has_collision bool

Whether or not the entity collides with things. Defaults to True.

True
has_gravity bool

Whether or not the entity is affected by gravity. Defaults to True.

True
push_towards_closest_space bool

Whether or not the entity should be pushed towards the nearest open area when stuck inside a block. Defaults to False.

False
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_physics

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityPlayerExhaustion

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(value=0.0, max=20.0)

Defines the player's exhaustion level.

Parameters:

Name Type Description Default
value float

The initial value of a player's exhaustion level. Defaults to 0.0.

0.0
max float

A maximum value for a player's exhaustion. Defaults to 20.0.

20.0
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_player.exhaustion

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityPlayerExperience

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(value=0.0, max=1.0)

Defines how much experience each player action should take.

Parameters:

Name Type Description Default
value float

The initial value of the player experience. Defaults to 0.0.

0.0
max float

The maximum player experience of this entity. Defaults to 1.0.

1.0
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_player.experience

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityPlayerLevel

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(value=0, max=24791)

Defines the player's level.

Parameters:

Name Type Description Default
value int

The initial value of the player level. Defaults to 0.

0
max int

The maximum player level value of the entity. Defaults to 24791.

24791
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_player.level

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityPlayerSaturation

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(value=5.0, max=20.0)

Defines the player's need for food.

Parameters:

Name Type Description Default
value float

The initial value of player saturation. Defaults to 5.0.

5.0
max float

The maximum player saturation value. Defaults to 20.0.

20.0
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_player.saturation

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityPreferredPath

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(default_block_cost=0, jump_cost=0, max_fall_blocks=3)

Specifies costing information for mobs that prefer to walk on preferred paths.

Parameters:

Name Type Description Default
default_block_cost int

Cost for non-preferred blocks. Defaults to 0.

0
jump_cost int

Added cost for jumping up a node. Defaults to 0.

0
max_fall_blocks int

Distance mob can fall without taking damage. Defaults to 3.

3
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_preferred_path

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityProjectile

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

remove_on_hit property

Remove the projectile when it hits something.

Returns:

Type Description

Self for method chaining.

thrown_potion_effect property

Enable thrown potion effect.

Returns:

Type Description

Self for method chaining.

Note

According to Bedrock Wiki, exact behavior is unknown and this may crash Minecraft as it's probably only valid for thrown potions.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(anchor=0, angle_offset=0, catch_fire=False, crit_particle_on_hurt=False, destroy_on_hurt=False, fire_affected_by_griefing=False, gravity=0.05, hit_sound='', hit_ground_sound='', hit_water=False, homing=False, inertia=0.99, is_dangerous=False, knockback=True, lightning=False, liquid_inertia=0.6, multiple_targets=True, offset=(0, 0.5, 0), on_fire_time=5.0, particle='iconcrack', potion_effect=-1, power=1.3, reflect_on_hurt=False, semi_random_diff_damage=False, shoot_sound='', shoot_target=True, should_bounce=False, splash_potion=False, splash_range=4.0, stop_on_hurt=False, uncertainty_base=0.0, uncertainty_multiplier=0.0)

Allows the entity to be a thrown entity.

Parameters:

Name Type Description Default
anchor int

. Defaults to 0.

0
angle_offset float

Determines the angle at which the projectile is thrown. Defaults to 0.

0
catch_fire bool

Determines whether the entity hit will be set on fire. Defaults to False.

False
crit_particle_on_hurt bool

If true, the projectile will produce additional particles when a critical hit happens. Defaults to False.

False
destroy_on_hurt bool

If true, this entity will be destroyed when hit. Defaults to False.

False
fire_affected_by_griefing bool

If true, whether the projectile causes fire is affected by the mob griefing game rule. Defaults to False.

False
gravity float

The gravity applied to this entity when thrown. The higher the value, the faster the entity falls. Defaults to 0.05.

0.05
hit_sound str

The sound that plays when the projectile hits something. Defaults to ''.

''
hit_ground_sound str

. Defaults to ''.

''
hit_water bool

. Defaults to False.

False
homing bool

If true, the projectile homes in to the nearest entity. Defaults to False.

False
inertia float

The fraction of the projectile's speed maintained every frame while traveling in air. Defaults to 0.99.

0.99
is_dangerous bool

If true, the projectile will be treated as dangerous to the players. Defaults to False.

False
knockback bool

If true, the projectile will knock back the entity it hits. Defaults to True.

True
lightning bool

If true, the entity hit will be struck by lightning. Defaults to False.

False
liquid_inertia float

The fraction of the projectile's speed maintained every frame while traveling in water. Defaults to 0.6.

0.6
multiple_targets bool

If true, the projectile can hit multiple entities per flight. Defaults to True.

True
offset Coordinates

The offset from the entity's anchor where the projectile will spawn. Defaults to (0, 0.5, 0).

(0, 0.5, 0)
on_fire_time float

Time in seconds that the entity hit will be on fire for. Defaults to 5.0.

5.0
particle str

Particle to use upon collision. Defaults to 'iconcrack'.

'iconcrack'
potion_effect int

Defines the effect the arrow will apply to the entity it hits. Defaults to -1.

-1
power float

Determines the velocity of the projectile. Defaults to 1.3.

1.3
reflect_on_hurt bool

If true, this entity will be reflected back when hit. Defaults to False.

False
semi_random_diff_damage bool

If true, damage will be randomized based on damage and speed. Defaults to False.

False
shoot_sound str

The sound that plays when the projectile is shot. Defaults to ''.

''
shoot_target bool

If true, the projectile will be shot towards the target of the entity firing it. Defaults to True.

True
should_bounce bool

If true, the projectile will bounce upon hit. Defaults to False.

False
splash_potion bool

If true, the projectile will be treated like a splash potion. Defaults to False.

False
splash_range float

Radius in blocks of the 'splash' effect. Defaults to 4.0.

4.0
stop_on_hurt bool

. Defaults to False.

False
uncertainty_base float

The base accuracy. Accuracy is determined by the formula uncertaintyBase - difficultyLevel * uncertaintyMultiplier. Defaults to 0.0.

0.0
uncertainty_multiplier float

Determines how much difficulty affects accuracy. Accuracy is determined by the formula uncertaintyBase - difficultyLevel * uncertaintyMultiplier. Defaults to 0.0.

0.0
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_projectile

__iter__()

Iterates over the component's fields.

arrow_effect()

Enable arrow effect on hit.

Note

Exact behavior unknown according to Bedrock Wiki.

Returns:

Type Description

Self for method chaining.

definition_event(event, target, affect_projectile=False, affect_shooter=False, affect_splash_area=False, splash_area=0, affect_target=False)

Call an event on hit.

Parameters:

Name Type Description Default
event str

Event to trigger.

required
target FilterSubject

Target of the event.

required
affect_projectile bool

Event will be triggered for projectile entity. Default is False.

False
affect_shooter bool

Event will be triggered for shooter entity. Default is False.

False
affect_splash_area bool

Event will be triggered for all entities in an area. Default is False.

False
splash_area float

Area of entities to affect. Default is 0.

0
affect_target bool

Event will be triggered for hit entity. Default is False.

False

Returns:

Type Description

Self for method chaining.

filter(filter)

Set entity filter for the projectile.

Parameters:

Name Type Description Default
filter Filter

The filter to apply.

required

Returns:

Type Description

Self for method chaining.

freeze_on_hit(size, snap_to_block, shape='sphere')

Freeze water on hit.

Parameters:

Name Type Description Default
size int

The size of the freeze effect.

required
snap_to_block bool

Whether to snap to block.

required
shape str

Shape of the freeze effect. Must be "sphere" or "cube". Default is "sphere".

'sphere'

Returns:

Type Description

Self for method chaining.

Note

Requires Education Edition toggle to be enabled. According to Bedrock Wiki, exact behavior is unknown.

Raises:

Type Description
RuntimeError

If shape is not "sphere" or "cube".

grant_xp(xp)

Grant experience points on hit.

Parameters:

Name Type Description Default
xp int | tuple[int, int]

Experience to grant. If int, grants constant amount. If tuple, grants random amount between min and max.

required

Returns:

Type Description

Self for method chaining.

Note

Despite the name, this actually spawns a number of experience orbs, being worth the amount stated.

Raises:

Type Description
ValueError

If xp is not an int or tuple of two ints.

hurt_owner(owner_damage=0, knockback=False, ignite=False)

Configure projectile to potentially hurt its owner on hit.

Parameters:

Name Type Description Default
owner_damage int

Damage dealt to the owner. Default is 0.

0
knockback bool

Whether to apply knockback to owner. Default is False.

False
ignite bool

Whether to ignite the owner. Default is False.

False

Returns:

Type Description

Self for method chaining.

Note

According to Bedrock Wiki, exact behavior is unknown and this may crash Minecraft with wrong parameters.

impact_damage(filter=None, catch_fire=False, channeling=True, damage=1, destroy_on_hit=False, destroy_on_hit_requires_damage=True, knockback=True, max_critical_damage=5, min_critical_damage=0, power_multiplier=2, semi_random_diff_damage=False, set_last_hurt_requires_damage=False, apply_knockback_to_blocking_targets=False)

Deal damage on impact.

Parameters:

Name Type Description Default
filter str

Entity identifier to affect. Much more primitive than filters used elsewhere, as it cannot "test" for anything other than an identifier. Default is None.

None
catch_fire bool

Whether targets will be engulfed in flames. Default is False.

False
channeling bool

Whether lightning can be channeled through the weapon. Default is True.

True
damage int

Damage dealt to entity on hit. Default is 1.

1
destroy_on_hit bool

Whether projectile is removed on hit. Default is False.

False
destroy_on_hit_requires_damage bool

If true, hit must cause damage to destroy the projectile. Default is True.

True
knockback bool

Whether the projectile will knock back the entity it hits. Default is True.

True
max_critical_damage int

Maximum critical damage. Default is 5.

5
min_critical_damage int

Minimum critical damage. Default is 0.

0
power_multiplier float

How much the base damage is multiplied. Default is 2.

2
semi_random_diff_damage bool

If true, damage will be randomized based on damage and speed. Default is False.

False
set_last_hurt_requires_damage bool

If true, hit must cause damage to update the last hurt property. Default is False.

False
apply_knockback_to_blocking_targets bool

If true, knockback will be applied to any blocking targets. Default is False.

False

Returns:

Type Description

Self for method chaining.

mob_effect(effect, amplifier=1, ambient=False, visible=False, duration=1, durationeasy=0, durationhard=800, durationnormal=200)

Apply a mob effect to the target on hit.

Parameters:

Name Type Description Default
effect MinecraftEffects

The effect to apply.

required
amplifier int

Effect amplifier. Default is 1.

1
ambient bool

Whether the effect is ambient. Default is False.

False
visible bool

Whether the effect is visible. Default is False.

False
duration int

Duration of the effect. Default is 1.

1
durationeasy int

Duration of the effect on easy difficulty. Default is 0.

0
durationhard int

Duration of the effect on hard difficulty. Default is 800.

800
durationnormal int

Duration of the effect on normal difficulty. Default is 200.

200

Returns:

Type Description

Self for method chaining.

on_hit(catch_fire=False, douse_fire=False, ignite=False, teleport_owner=False)

Configure basic on_hit behaviors for the projectile.

Parameters:

Name Type Description Default
catch_fire bool

Determines if the struck object is set on fire. Default is False.

False
douse_fire bool

If the target is on fire, then douse the fire. Default is False.

False
ignite bool

Determines if a fire may be started on a flammable target. Default is False.

False
teleport_owner bool

Determines if the owner is transported on hit. Default is False.

False

Returns:

Type Description

Self for method chaining.

particle_on_hit(particle_type, on_other_hit=False, on_entity_hit=False, num_particles=0)

Spawn particles on hit.

Parameters:

Name Type Description Default
particle_type str

Vanilla particle type to use.

required
on_other_hit bool

Whether it should spawn particles on non-entity hit. Default is False.

False
on_entity_hit bool

Whether it should spawn particles on entity hit. Default is False.

False
num_particles int

Number of particles to spawn. Default is 0.

0

Returns:

Type Description

Self for method chaining.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

spawn_aoe_cloud(affect_owner=True, color=(1, 1, 1), duration=0, particle='', potion=-1, radius=0.0, radius_on_use=-1.0, reapplication_delay=0)

Spawn an area of effect cloud of potion effect on hit.

Parameters:

Name Type Description Default
affect_owner bool

Whether potion effect affects the shooter. Does not appear to apply to the player. Default is True.

True
color tuple[int, int, int]

RGB color of the particles. Default is (1, 1, 1).

(1, 1, 1)
duration int

Duration of the cloud in seconds. Default is 0.

0
particle str

Vanilla particle emitter of the cloud. Only accepts Vanilla Particles. 'dragonbreath' enables the usage of Bottles to obtain Dragon's Breath. Default is "".

''
potion int

Lingering Potion ID. Default is -1.

-1
radius float

Radius of the cloud. Default is 0.0.

0.0
radius_on_use float

Radius change on use. Default is -1.0.

-1.0
reapplication_delay int

Delay in ticks between application of the potion effect. Default is 0.

0

Returns:

Type Description

Self for method chaining.

spawn_chance(spawn_definition, spawn_baby=False, first_spawn_count=0, first_spawn_percent_chance=0, second_spawn_percent_chance=32, second_spawn_count=0)

Spawn an entity on hit with specified chances.

Parameters:

Name Type Description Default
spawn_definition str

ID of the entity to spawn.

required
spawn_baby bool

Whether the spawned entity should be a baby. Default is False.

False
first_spawn_count int

Number of entities to spawn in first spawn. Default is 0.

0
first_spawn_percent_chance int

Percentage chance for first spawn. Default is 0.

0
second_spawn_percent_chance int

Percentage chance for second spawn. Default is 32.

32
second_spawn_count int

Number of entities to spawn in second spawn. Default is 0.

0

Returns:

Type Description

Self for method chaining.

stick_in_ground(shake_time)

Configure projectile to stick into the ground on hit.

Parameters:

Name Type Description Default
shake_time float

Time in seconds the projectile shakes when stuck in ground.

required

Returns:

Type Description

Self for method chaining.

EntityPushThrough

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(value)

Sets the distance through which the entity can push through.

Parameters:

Name Type Description Default
value float

The value of the entity's push-through, in blocks.

required
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_push_through

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityPushable

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(is_pushable=True, is_pushable_by_piston=True)

Defines what can push an entity between other entities and pistons.

Parameters:

Name Type Description Default
is_pushable bool

Whether the entity can be pushed by other entities. Defaults to True.

True
is_pushable_by_piston bool

Whether the entity can be pushed by pistons safely. Defaults to True.

True
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_pushable

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityPushableByBlock

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(value)

Allows the entity to be pushed by certain blocks, like Shulker Boxes and Pistons.

Parameters:

Name Type Description Default
value bool

Description.

required
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_pushable_by_block

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityPushableByEntity

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(value)

Allows an entity to be pushed by other entities.

Parameters:

Name Type Description Default
value bool

Description.

required
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_pushable_by_entity

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityRaidTrigger

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

Attempts to trigger a raid at the entity's location.

This component has no configurable constructor properties. Use triggered_event to define the raid event payload.

Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_raid_trigger

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityRailMovement

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(max_speed=0.4)

Defines the entity's movement on the rails. An entity with this component is only allowed to move on the rail.

Parameters:

Name Type Description Default
max_speed float

Maximum speed that this entity will move at when on the rail. Defaults to 0.4.

0.4
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_rail_movement

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityRailSensor

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(check_block_types=False, eject_on_activate=True, eject_on_deactivate=False, tick_command_block_on_activate=True, tick_command_block_on_deactivate=False)

Enables minecart-type entities to detect powered rails and respond to activation state changes. Triggers events when the entity passes over activated or deactivated rails, enabling custom minecart behaviors like launching at boosted speed, stopping at braking rails, or triggering special effects at detector rails.

Parameters:

Name Type Description Default
check_block_types bool

If true, on tick this entity will trigger its on_deactivate behavior. Defaults to False.

False
eject_on_activate bool

If true, this entity will eject all of its riders when it passes over an activated rail. Defaults to True.

True
eject_on_deactivate bool

If true, this entity will eject all of its riders when it passes over a deactivated rail. Defaults to False.

False
tick_command_block_on_activate bool

If true, command blocks will start ticking when passing over an activated rail. Defaults to True.

True
tick_command_block_on_deactivate bool

If false, command blocks will stop ticking when passing over a deactivated rail. Defaults to False.

False
Note

Use on_activate and on_deactivate to define the event payloads.

Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_rail_sensor

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityRavagerBlocked

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(knockback_strength=3.0)

Defines the ravager's response to their melee attack being blocked.

Parameters:

Name Type Description Default
knockback_strength float

The strength with which blocking entities should be knocked back. Defaults to 3.0.

3.0
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_ravager_blocked

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityReflectProjectiles

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(azimuth_angle=None, elevation_angle=None, reflected_projectiles=None, reflection_scale=None, reflection_sound='reflect')

[EXPERIMENTAL] Allows an entity to reflect projectiles.

Parameters:

Name Type Description Default
azimuth_angle Molang | str

[EXPERIMENTAL] A Molang expression defining the angle in degrees to add to the projectile's y axis rotation. Defaults to None.

None
elevation_angle Molang | str

[EXPERIMENTAL] A Molang expression defining the angle in degrees to add to the projectile's x axis rotation. Defaults to None.

None
reflected_projectiles list[MinecraftEntityDescriptor | Identifier]

[EXPERIMENTAL] An array of strings defining the types of projectiles that are reflected when they hit the entity. Defaults to None.

None
reflection_scale Molang | str

[EXPERIMENTAL] A Molang expression defining the velocity scaling of the reflected projectile. Values below 1 decrease the projectile's velocity, and values above 1 increase it. Defaults to None.

None
reflection_sound str

[EXPERIMENTAL] A string defining the name of the sound event to be played when a projectile is reflected. "reflect" unless specified. Defaults to "reflect".

'reflect'
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_reflect_projectiles

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityRemoveInPeaceful

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

Denotes entities that are not allowed to exist in "Peaceful" difficulty.

This component has no configurable constructor properties.

Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_remove_in_peaceful

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityRendersWhenInvisible

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

When set, the entity will render even when invisible. Appropriate rendering behavior can then be specified in the corresponding "minecraft:client_entity".

Parameters:

Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_renders_when_invisible

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityRideable

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(interact_text='Mount', controlling_seat=0, passenger_max_width=None, crouching_skip_interact=True, pull_in_entities=False, rider_can_interact=False, dismount_mode=RideableDismountMode.Default, on_rider_enter_event=None, on_rider_exit_event=None)

This entity can be ridden.

Parameters:

Name Type Description Default
interact_text str

The text to display when the player can interact with the entity when playing with touch-screen controls. Defaults to 'Mount'.

'Mount'
controlling_seat int

The seat that designates the driver of the entity. Entities with the "minecraft:behavior.controlled_by_player" goal ignore this field and give control to any player in any seat. Defaults to 0.

0
passenger_max_width float

The max width a mob can have to be a rider. A value of 0 ignores this parameter. Defaults to None.

None
crouching_skip_interact bool

If true, this entity can't be interacted with if the entity interacting with it is crouching. Defaults to True.

True
pull_in_entities bool

If true, this entity will pull entities matching the specified "family_types" into any available seats. Defaults to False.

False
rider_can_interact bool

If true, this entity will be picked when looked at by the rider. Defaults to False.

False
dismount_mode RideableDismountMode

Defines where riders are placed when dismounting this entity: - "default", riders are placed on a valid ground position around the entity, or at the center of the entity's collision box if none is found. Defaults to RideableDismountMode.Default.

Default
on_rider_enter_event str

Event to execute on the owner entity when an entity starts riding it. This item requires a format version of at least 1.21.80. Defaults to None.

None
on_rider_exit_event str

Event to execute on the owner entity when an entity stops riding it. This item requires a format version of at least 1.21.80. Defaults to None.

None
Behaviour Observations:
Adding a rider makes them occupy the first available seat on the rideable entity.
Removing a rider at any seat will shift all subsequent riders forward by one seat.
Unless the rider is a Player in which case they will occupy the very first seat and shift all other riders back by one seat.
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_rideable

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityRotationAxisAligned

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

Causes the entity to automatically rotate to align with the nearest cardinal direction based on its current facing direction. Combining this with the "minecraft:body_rotation_blocked" component will cause the entity's body to align with the nearest cardinal direction and remain fixed in that orientation, regardless of changes in its facing direction.

Parameters:

Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_rotation_axis_aligned

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityRotationLockedToVehicle

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

Causes the entity's rotation to match their vehicle's facing direction.

Parameters:

Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_rotation_locked_to_vehicle

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityScale

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(value)

Sets the entity's visual size multiplier. A value of 1.0 means normal size, 0.5 is half size (commonly used for baby mobs), and values above 1.0 make the entity larger.

Parameters:

Name Type Description Default
value int

The scale multiplier for visual size. 1.0 = normal, 0.5 = half (babies), 2.0 = double size.

required
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_scale

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityScaleByAge

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(start_scale, end_scale)

Defines the entity's size interpolation based on the entity's age.

Parameters:

Name Type Description Default
start_scale int

Initial scale of the newborn entity.

required
end_scale int

Ending scale of the entity when it's fully grown.

required
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_scale_by_age

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityScheduler

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(max_delay_secs=0.0, min_delay_secs=0.0)

Fires off scheduled mob events at time of day events.

Parameters:

Name Type Description Default
max_delay_secs float

Description. Defaults to 0.0.

0.0
min_delay_secs float

Description. Defaults to 0.0.

0.0
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_scheduler

__iter__()

Iterates over the component's fields.

add_scheduled_event(event, filters=None)

Adds a scheduled event to the scheduler.

Parameters:

Name Type Description Default
event str

The event to fire.

required
filters Filter

The filters to check before firing the event. Defaults to None.

None

Returns:

Name Type Description
EntityScheduler

The current instance of the class.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntitySensor

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__iter__()

Iterates over the component's fields.

add_sensor(event, event_filters, maximum_count=-1, minimum_count=-1, require_all=False, range=[10, 10], cooldown=-1, y_offset=0.0)

A component that initiates an event when a set of conditions are met by other entities within the defined range.

Parameters:

Name Type Description Default
event str

Event to initiate when the conditions are met.

required
event_filter Filter

The set of conditions that must be satisfied to initiate the event.

required
maximum_count int

The maximum number of entities that must pass the filter conditions for the event to send. Defaults to -1.

-1
minimum_count int

The minimum number of entities that must pass the filter conditions for the event to send. Defaults to -1.

-1
relative_range bool

If true, the sensor range is additive on top of the entity's size. Defaults to True.

required
require_all bool

If true, requires all nearby entities to pass the filter conditions for the event to send. Defaults to False.

False
range range

The maximum horizontal and vertical distance another entity can be from this and have the filters checked against it. Defaults to (10, 10).

[10, 10]
cooldown int

How many seconds should elapse before the subsensor can once again sense for entities. The cooldown is applied on top of the base 1 tick (0.05 seconds) delay. Negative values will result in no cooldown being used. Defaults to -1.

-1
y_offset float

Vertical offset applied to the entity's position when computing the distance from other entities.

0.0
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_entity_sensor

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityShareables

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(all_items=False, all_items_max_amount=-1, all_items_surplus_amount=-1, all_items_want_amount=-1, singular_pickup=False)

Defines a list of items the mob wants to share or pick up. Items can be configured with optional parameters to control pickup, sharing, and inventory behavior.

Parameters:

Name Type Description Default
all_items bool

A bucket for all other items in the game. Note this category is always least priority items. Defaults to False.

False
all_items_max_amount int

Maximum number of this item the mob will hold. Defaults to -1.

-1
all_items_surplus_amount int

Number of this item considered extra that the entity wants to share. Defaults to -1.

-1
all_items_want_amount int

Number of this item this entity wants to share. Defaults to -1.

-1
singular_pickup bool

Boolean value that controls if the mob is able to pick up more of the same item if it is already holding that item. Defaults to False.

False
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_shareables

__iter__()

Iterates over the component's fields.

item(item, admire=False, barter=False, consume_item=False, craft_into=None, max_amount=-1, pickup_limit=-1, pickup_only=False, priority=0, stored_in_inventory=False, surplus_amount=-1, want_amount=-1)

Adds an item to the shareables list.

Parameters:

Name Type Description Default
item str

The identifier of the item.

required
admire bool

Mob will admire the item after picking up by looking at it. Defaults to False.

False
barter bool

Mob will barter for the item after picking it up. Defaults to False.

False
consume_item bool

Determines whether the mob will consume the item or not. Defaults to False.

False
craft_into str

Item to craft this item into. Defaults to None.

None
max_amount int

Maximum number of this item the mob will hold. Defaults to -1.

-1
pickup_limit int

Maximum number items the mob will pick up during a single goal tick. Defaults to -1.

-1
pickup_only bool

Determines whether the mob can only pickup the item and not drop it. Defaults to False.

False
priority int

Prioritizes which items the entity prefers. 0 is the highest priority. Defaults to 0.

0
stored_in_inventory bool

Determines whether the mob will try to put the item in its inventory if it has the inventory component and if it can't be equipped. Defaults to False.

False
surplus_amount int

Number of this item considered extra that the entity wants to share. Defaults to -1.

-1
want_amount int

Number of this item this entity wants to share. Defaults to -1.

-1

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityShooter

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(identifier, magic=False, power=0.0, aux_value=-1, sound=None)

Defines the entity's ranged attack behavior. The "minecraft:behavior.ranged_attack" goal uses this component to determine which projectiles to shoot.

Parameters:

Name Type Description Default
identifier Identifier

Actor definition to use as the default projectile for the ranged attack. The actor definition must have the projectile component to be able to be shot as a projectile.

required
magic bool

Sets whether the projectiles being used are flagged as magic. If set, the ranged attack goal will not be used at the same time as other magic goals, such as minecraft:behavior.drink_potion. Defaults to False.

False
power float

Velocity in which the projectiles will be shot at. A power of 0 will be overwritten by the default projectile throw power. Defaults to 0.0.

0.0
aux_value int

ID of the Potion effect for the default projectile to be applied on hit. Defaults to -1.

-1
sound str

Sound that is played when the shooter shoots a projectile. Defaults to None.

None
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_shooter

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntitySittable

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(sit_event=None, stand_event=None)

Defines the entity's 'sit' state.

Parameters:

Name Type Description Default
sit_event str

Event to run when the entity enters the 'sit' state. Can be an object with event and target properties, or a simple event string. Defaults to None.

None
stand_event str

Event to run when the entity exits the 'sit' state. Can be an object with event and target properties, or a simple event string. Defaults to None.

None
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_sittable

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntitySkinID

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(value)

Skin ID value. Can be used to differentiate skins, such as base skins for villagers.

Parameters:

Name Type Description Default
value int

The ID of the skin. By convention, 0 is the ID of the base skin.

required
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_skin_id

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntitySoundVolume

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(value=1)

Sets the entity's base volume for sound effects.

Parameters:

Name Type Description Default
value float

The value of the volume the entity uses for sound effects. Defaults to 1.

1
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_sound_volume

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntitySpawnEggInteraction

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

Enables interacting with this entity using its own spawn egg to spawn a born child. Runs the "minecraft:entity_born" event on the created entity as well as the defined "on_spawn" event.

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntitySpawnEntity

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

Adds a timer after which this entity will spawn another entity or item (similar to vanilla's chicken's egg-laying behavior).

Parameters:

Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_spawn_entity

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntitySpellEffects

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

Allows an entity to add or remove status effects from itself. Similarly to addrider, this component performs a one-time operation on the entity when added. Removing the component will not change the entity's current effects. Adding different versions of the component multiple times will perform each one in turn. Once the component has been added, it will not provide any further functionality. There is one exception to this behavior: if this component is present on a player, its effects will be re-applied every time the player enters the world. To avoid this, remove the component shortly after adding it, or add an empty component to replace it.

Parameters:

Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_spell_effects

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityStrength

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(value=1, max=5)

Defines the entity's strength to carry items.

Parameters:

Name Type Description Default
value int

The initial value of the strength. Defaults to 1.

1
max int

The maximum strength of this entity. Defaults to 5.

5
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_strength

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntitySuspectTracking

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

Allows this entity to remember suspicious locations.

This component has no configurable constructor properties.

Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_suspect_tracking

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityTameable

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(probability=1.0)

This entity can be tamed.

Parameters:

Name Type Description Default
probability float

The chance of taming the entity with each item use between 0.0 and 1.0, where 1.0 is 100%. Defaults to 1.0.

1.0
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_tameable

__iter__()

Iterates over the component's fields.

add_tame_item(item, result_item=None)

Adds an item to the list of items that can be used to tame the entity.

Parameters:

Name Type Description Default
item str

The item to add to the list of items that can be used to tame the entity.

required
result_item str

The item that the tame item will transform into upon successful taming. Defaults to None.

None
Returns

Tameable: Returns the Tameable component to allow for method chaining.

required

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

tame_event(event, target=FilterSubject.Self)

Sets the event to initiate when the entity becomes tamed.

Parameters:

Name Type Description Default
event str

Event to initiate when the entity becomes tamed.

required
target FilterSubject

The target of the event. Defaults to FilterSubject.Self.

Self
Returns

Tameable: Returns the Tameable component to allow for method chaining.

required

EntityTamemount

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(attempt_temper_mod=5, feed_text=None, max_temper=100, min_temper=0, ride_text=None)

Allows the Entity to be tamed by mounting it.

Parameters:

Name Type Description Default
attempt_temper_mod int

The amount the entity's temper will increase when mounted. Defaults to 5.

5
feed_text str

The text that shows in the feeding interact button. Defaults to None.

None
max_temper int

The maximum value for the entity's random starting temper. Defaults to 100.

100
min_temper int

The minimum value for the entity's random starting temper. Defaults to 0.

0
ride_text str

The text that shows in the riding interact button. Defaults to None.

None
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_tamemount

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityTargetNearbySensor

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(inside_range=1, outside_range=5, must_see=False)

Defines the entity's range within which it can see or sense other entities to target them.

Parameters:

Name Type Description Default
inside_range int

Maximum distance in blocks that another entity will be considered in the 'inside' range. Defaults to 1.

1
outside_range int

Maximum distance in blocks that another entity will be considered in the 'outside' range. Defaults to 5.

5
must_see bool

Whether the other entity needs to be visible to trigger 'inside' events. Defaults to False.

False
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_target_nearby_sensor

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityTeleport

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(dark_teleport_chance=0.01, light_teleport_chance=0.01, max_random_teleport_time=20.0, min_random_teleport_time=0.0, random_teleport_cube=(32, 16, 32), random_teleports=True, target_distance=16.0, target_teleport_chance=1.0)

Defines an entity's teleporting behavior.

Parameters:

Name Type Description Default
dark_teleport_chance float

Modifies the chance that the entity will teleport if the entity is in darkness. Defaults to 0.01.

0.01
light_teleport_chance float

Modifies the chance that the entity will teleport if the entity is in daylight. Defaults to 0.01.

0.01
max_random_teleport_time Seconds

Maximum amount of time in seconds between random teleports. Defaults to 20.0.

20.0
min_random_teleport_time Seconds

Minimum amount of time in seconds between random teleports. Defaults to 0.0.

0.0
random_teleport_cube tuple[float, float, float]

Entity will teleport to a random position within the area defined by this cube. Defaults to (32, 16, 32).

(32, 16, 32)
random_teleports bool

If true, the entity will teleport randomly. Defaults to True.

True
target_distance float

Maximum distance the entity will teleport when chasing a target. Defaults to 16.0.

16.0
target_teleport_chance float

The chance that the entity will teleport between 0.0 and 1.0. 1.0 means 100%. Defaults to 1.0.

1.0
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_teleport

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityTickWorld

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(never_despawn=True, radius=0, distance_to_players=0)

Defines if the entity ticks the world and the radius around it to tick.

Parameters:

Name Type Description Default
never_despawn bool

If true, this entity will not despawn even if players are far away. If false, distance_to_players will be used to determine when to despawn. Defaults to True.

True
radius int

The area around the entity to tick. Value must be >= 2. Value must be <= 6. Defaults to 0.

0
distance_to_players int

The distance at which the closest player has to be before this entity despawns. This option will be ignored if never_despawn is true. Value must be >= 128. Defaults to 0.

0
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_tick_world

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityTimer

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(event, target=FilterSubject.Self, looping=True, randomInterval=True, time=0)

Adds a timer after which an event will fire.

Parameters:

Name Type Description Default
event str

Event to fire when the time on the timer runs out.

required
target FilterSubject

Target for the event that fires when the time on the timer runs out. Defaults to FilterSubject.Self.

Self
looping bool

If true, the timer will restart every time after it fires. Defaults to True.

True
randomInterval bool

If true, the amount of time on the timer will be random between the min and max values specified in time. Defaults to True.

True
time tuple[float, float] | float

Amount of time in seconds for the timer. Can be specified as a number or a pair of numbers (min and max). Incompatible with random_time_choices. Defaults to 0.

0
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_timer

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityTradeResupply

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

Resupplies an entity's trade.

Parameters:

Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_trade_resupply

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityTradeTable

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(table, convert_trades_economy=False, display_name=None, new_screen=False, persist_trades=False)

Defines this entity's ability to trade with players.

Parameters:

Name Type Description Default
table TradeTable | str

File path relative to the behavior pack root for this entity's trades.

required
convert_trades_economy bool

Determines when the mob transforms, if the trades should be converted when the new mob has a economy_trade_table. Defaults to False.

False
display_name str

Name to be displayed while trading with this entity. Defaults to None.

None
new_screen bool

Used to determine if trading with entity opens the new trade screen. Defaults to False.

False
persist_trades bool

Determines if the trades should persist when the mob transforms. Defaults to False.

False
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_trade_table

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityTrail

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(block_type=MinecraftBlockTypes.Air(), spawn_filter=None, spawn_offset=(0, 0, 0))

Causes an entity to leave a trail of blocks as it moves about the world.

Parameters:

Name Type Description Default
block_type MinecraftBlockDescriptor | Identifier

The type of block you wish to be spawned by the entity as it move about the world. Solid blocks may not be spawned at an offset of (0,0,0). Defaults to air.

Air()
spawn_filter Filter

One or more conditions that must be met in order to cause the chosen block type to spawn. Defaults to None.

None
spawn_offset tuple[float, float, float]

The distance from the entities current position to spawn the block. Defaults to (0, 0, 0).

(0, 0, 0)
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_trail

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityTransformation

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(into, transform_event=None, drop_equipment=False, drop_inventory=False, keep_level=False, keep_owner=False, preserve_equipment=False)

Defines an entity's transformation from the current definition into another.

Parameters:

Name Type Description Default
into Identifier

Entity Definition that this entity will transform into.

required
transform_event str

Description. Defaults to None.

None
drop_equipment bool

Cause the entity to drop all equipment upon transformation. Defaults to False.

False
drop_inventory bool

Cause the entity to drop all items in inventory upon transformation. Defaults to False.

False
keep_level bool

If this entity has trades and has leveled up, it should maintain that level after transformation. Defaults to False.

False
keep_owner bool

If this entity is owned by another entity, it should remain owned after transformation. Defaults to False.

False
preserve_equipment bool

Cause the entity to keep equipment after going through transformation. Defaults to False.

False
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_transformation

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityTransient

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

An entity with this component will NEVER persist, and forever disappear when unloaded.

Parameters:

Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_transient

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityTrust

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

Allows this entity to trust multiple players.

This component has no configurable constructor properties.

Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_trust

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityTrusting

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(probability=1.0)

Defines the rules for a mob to trust players.

Parameters:

Name Type Description Default
probability float

The chance of the entity trusting with each item use between 0.0 and 1.0, where 1.0 is 100%. Defaults to 1.0.

1.0
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_trusting

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityTypeFamily

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(family)

Defines the family categories this entity belongs to. Type families are used by filters and other game systems to group entities (e.g., 'mob', 'monster', 'undead', 'zombie').

Parameters:

Name Type Description Default
family list[str]

A set of tags that describe the categories of this entity.

required
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_type_family

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityUnderwaterMountBreathing

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

Pauses this entity's breathing under water.

This component has no configurable constructor properties.

Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_underwater_mount_breathing

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityUnderwaterMovement

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(value)

Defines the speed with which an entity can move through water.

Parameters:

Name Type Description Default
value int

Movement speed of the entity under water.

required
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_underwater_movement

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityUsesLegacyFriction

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

When set, legacy calculations are used when applying "minecraft:friction_modifier". This component is automatically added to legacy content to preserve existing behavior. The legacy calculations are incorrect and should not be used for new content.

This component has no configurable constructor properties.

Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_uses_legacy_friction

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityVariableMaxAutoStep

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(base_value=0.5625, controlled_value=0.5625, jump_prevented_value=0.5625)

Entities with this component will have a maximum auto step height that is different depending on whether they are on a block that prevents jumping. Incompatible with "runtime_identifier": "minecraft:horse".

Parameters:

Name Type Description Default
base_value float

The maximum auto step height when on any other block. Defaults to 0.5625.

0.5625
controlled_value float

The maximum auto step height when on any other block and controlled by the player. Defaults to 0.5625.

0.5625
jump_prevented_value float

The maximum auto step height when on a block that prevents jumping. Defaults to 0.5625.

0.5625
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_variable_max_auto_step

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityVariant

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(value)

Variant is typically used as a per-type way to express a different visual form of the same mob. For example, for cats, variant is a number that defines the breed of cat.

Parameters:

Name Type Description Default
value int

The Id of the variant. By convention, 0 is the Id of the base entity/default appearance.

required
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_variant

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityVerticalMovementAction

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(vertical_velocity=0.5)

When configured as a rideable entity, the entity will move upwards or downwards when the player uses the jump action.

Parameters:

Name Type Description Default
vertical_velocity float

Vertical velocity to apply when jump action is issued. Defaults to 0.5.

0.5
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_vertical_movement.action?view=minecraft-bedrock-stable

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityVibrationDamper

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

Vibrations emitted by an entity with this component will be ignored.

This component has no configurable constructor properties.

Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_vibration_damper

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityVibrationListener

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

Allows the entity to listen to vibration events. This is a largely-internal component, that is only supported on the Warden and Allay mobs.

This component has no configurable constructor properties.

Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_vibration_listener

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityWalkAnimationSpeed

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(value=1)

Sets the speed multiplier for this entity's walk animation speed.

Parameters:

Name Type Description Default
value float

The higher the number, the faster the animation for walking plays. A value of 1.0 means normal speed, while 2.0 means twice as fast. Defaults to 1.

1
Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_walk_animation_speed

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityWantsJockey

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__()

Sets that this entity wants to become a jockey.

This component has no configurable constructor properties.

Documentation reference:
https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_wants_jockey

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required

EntityWaterMovement

Bases: Component

identifier property

Returns the identifier of the addon object in the format 'namespace:name'.

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__export__()

Exports the component as a dictionary.

Returns:

Name Type Description
dict Dict[str, Any]

The exported component.

__init__(drag_factor=0.8)

Customizes how the entity moves through water by adjusting drag coefficient. Lower values let entities glide through water easily like fish, while higher values create resistance for entities that struggle in water. Essential for aquatic mobs, boats, and any entity needing custom underwater physics.

Parameters:

Name Type Description Default
drag_factor float

Drag factor to determine movement speed when in water. Defaults to 0.8.

0.8
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_water_movement

__iter__()

Iterates over the component's fields.

set_identifier_data(data)

Sets the data of the addon object.

Parameters:

Name Type Description Default
data any

The data to be set for the addon object.

required