Skip to content

Actors - Components Module

anvil.api.actors.components

EntityAIAvoidBlock

Bases: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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

Description. Defaults to 1.

1
search_range int

Description. Defaults to 0.

0
search_height int

Description. Defaults to 0.

0
walk_speed_modifier float

Description. Defaults to 1.0.

1.0
sprint_speed_modifier float

Description. Defaults to 1.0.

1.0
avoid_block_sound str

Description. Defaults to None.

None
sound_interval list[float]

Description. Defaults to None.

None
target_selection_method Literal[nearest]

Description. Defaults to 'nearest'.

'nearest'
target_blocks list[MinecraftBlockDescriptor]

Description. 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: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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)

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

Parameters:

Name Type Description Default
avoid_mob_sound str

Description. Defaults to None.

None
avoid_target_xz int

Description. Defaults to 16.

16
avoid_target_y int

Description. Defaults to 7.

7
ignore_visibility bool

Description. Defaults to False.

False
probability_per_strength float

Description. Defaults to 1.0.

1.0
remove_target bool

Description. Defaults to False.

False
sound_interval list[float]

Description. Defaults to [3.0, 8.0].

[3.0, 8.0]
check_if_outnumbered bool

Description. Defaults to False.

False
cooldown float

Description. 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_distance=7.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_distance float

How many blocks within range of its avoid target the entity must be for it to begin sprinting away from the avoid target. Defaults to 7.0.

7.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

EntityAIBreed

Bases: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__(speed_multiplier=1.0)

Allows this mob to breed with other mobs.

Parameters:

Name Type Description Default
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_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

EntityAIChargeAttack

Bases: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

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

Compels an entity to damage a target by using a running attack.

Parameters:

Name Type Description Default
max_distance int

Description. Defaults to 3.

3
min_distance int

Description. Defaults to 2.

2
success_rate float

Description. Defaults to 0.1428.

0.1428
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_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

EntityAIDelayedAttack

Bases: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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)

Compels 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

Description. Defaults to 0.75.

0.75
attack_once bool

Description. Defaults to False.

False
cooldown_time int

Description. Defaults to 1.

1
hit_delay_pct float

Description. Defaults to 0.5.

0.5
inner_boundary_time_increase float

Description. Defaults to 0.25.

0.25
max_path_time float

Description. Defaults to 0.55.

0.55
melee_fov int

Description. Defaults to 90.

90
min_path_time float

Description. Defaults to 0.2.

0.2
outer_boundary_time_increase float

Description. Defaults to 0.5.

0.5
path_fail_time_increase float

Description. Defaults to 0.75.

0.75
path_inner_boundary int

Description. Defaults to 16.

16
path_outer_boundary int

Description. Defaults to 32.

32
random_stop_interval int

Description. Defaults to 0.

0
reach_multiplier int

Description. Defaults to 2.

2
require_complete_path bool

Description. Defaults to False.

False
speed_multiplier float

Description. Defaults to 1.

1
track_target bool

Description. Defaults to False.

False
x_max_rotation int

Description. Defaults to 30.

30
y_max_head_rotation int

Description. Defaults to 30.

30
can_spread_on_fire bool

Description. 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: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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

Description. Defaults to 0.

0
idle_time Seconds

Description. Defaults to 0.

0
allow_dig_when_named bool

Description. Defaults to False.

False
digs_in_daylight bool

Description. Defaults to False.

False
suspicion_is_disturbance bool

Description. Defaults to False.

False
vibration_is_disturbance bool

Description. 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

EntityAIDrinkMilk

Bases: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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

Description. Defaults to 5.

5
filters Filter

Description. 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

EntityAIEquipItem

Bases: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__()

Compels an entity to equip an item.

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: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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

Description. Defaults to (5, 0, 5).

(5, 0, 5)
explore_dist float

Description. Defaults to 5.0.

5.0
max_travel_time float

Description. Defaults to 60.0.

60.0
max_wait_time float

Description. Defaults to 0.0.

0.0
min_dist_from_target float

Description. Defaults to 2.2.

2.2
min_perimeter float

Description. Defaults to 1.0.

1.0
min_wait_time float

Description. Defaults to 3.0.

3.0
next_xz int

Description. Defaults to 5.

5
next_y int

Description. Defaults to 3.

3
speed_multiplier float

Description. Defaults to 1.0.

1.0
timer_ratio float

Description. 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: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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

Description. Defaults to 1.5.

1.5
max_fertilizer_usage int

Description. Defaults to 1.

1
search_cooldown_max_seconds float

Description. Defaults to 8.0.

8.0
search_count int

Description. Defaults to 9.

9
search_height int

Description. Defaults to 1.

1
search_range int

Description. Defaults to 1.

1
speed_multiplier float

Description. 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

EntityAIFloat

Bases: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

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

Allows an entity to float on water. 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

Description. Defaults to False.

False
chance_per_tick_to_float float

Description. Defaults to 0.0.

0.0
time_under_water_to_dismount_passengers Seconds

Description. 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

EntityAIFloatWander

Bases: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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

Description. Defaults to False.

False
allow_navigating_through_liquids bool

Description. Defaults to False.

False
float_duration tuple[Seconds, Seconds]

Description. Defaults to (0.0, 0.0).

(0.0, 0.0)
float_wander_has_move_control bool

Description. Defaults to True.

True
must_reach bool

Description. Defaults to False.

False
navigate_around_surface bool

Description. Defaults to False.

False
random_reselect bool

Description. Defaults to False.

False
surface_xz_dist int

Description. Defaults to 0.

0
surface_y_dist int

Description. Defaults to 0.

0
use_home_position_restriction bool

Description. Defaults to True.

True
xz_dist int

Description. Defaults to 10.

10
y_dist int

Description. 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_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

EntityAIFollowMob

Bases: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__(search_range=0, speed_multiplier=1.0, stop_distance=2)

Compels an entity to follow and gather around other mobs of the same type.

Parameters:

Name Type Description Default
search_range int

Description. Defaults to 0.

0
speed_multiplier float

Description. Defaults to 1.0.

1.0
stop_distance int

Description. Defaults to 2.

2
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: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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)

Compels an entity to follow a player marked as an owner.

Parameters:

Name Type Description Default
can_teleport bool

Description. Defaults to True.

True
ignore_vibration bool

Description. Defaults to True.

True
max_distance float

Description. Defaults to 60.0.

60.0
speed_multiplier float

Description. Defaults to 1.0.

1.0
start_distance float

Description. Defaults to 10.0.

10.0
stop_distance float

Description. Defaults to 2.0.

2.0
post_teleport_distance int

Description. 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: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__(speed_multiplier=1.0)

Compels an entity that has been tagged as a baby to follow their parent around.

Parameters:

Name Type Description Default
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_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

EntityAIHarvestFarmBlock

Bases: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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

Description. Defaults to 1.5.

1.5
max_seconds_before_search float

Description. Defaults to 1.0.

1.0
search_cooldown_max_seconds float

Description. Defaults to 8.0.

8.0
search_count int

Description. Defaults to 0.

0
search_height int

Description. Defaults to 1.

1
search_range int

Description. Defaults to 16.

16
seconds_until_new_task float

Description. Defaults to 0.5.

0.5
speed_multiplier float

Description. 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: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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

Description. Defaults to 1.0.

1.0
poi_type str

Description. Defaults to None.

None
speed_multiplier float

Description. Defaults to 1.0.

1.0
timeout_cooldown float

Description. 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

EntityAIHurtByTarget

Bases: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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)

Compels an entity to react when hit by set target.

Parameters:

Name Type Description Default
alert_same_type bool

Description. Defaults to False.

False
entity_types 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

Description. 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
hurt_owner bool

Description. 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

EntityAIKnockbackRoar

Bases: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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)

Compels an entity to emit a roar effect that knocks back other entities in a set radius from where the roar was emitted.

Parameters:

Name Type Description Default
attack_time float

Description. Defaults to 0.5.

0.5
cooldown_time float

Description. Defaults to 0.1.

0.1
damage_filters Filter

Description. Defaults to None.

None
duration float

Description. Defaults to 1.

1
knockback_damage int

Description. Defaults to 6.

6
knockback_filters Filter

Description. Defaults to None.

None
knockback_height_cap float

Description. Defaults to 0.4.

0.4
knockback_horizontal_strength int

Description. Defaults to 4.

4
knockback_range int

Description. Defaults to 4.

4
knockback_vertical_strength int

Description. 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: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__(interval=120, random_stop_interval=120)

Compels an entity randomly lay down for a period of time.

Parameters:

Name Type Description Default
interval int

Description. Defaults to 120.

120
random_stop_interval int

Description. 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

EntityAILeapAtTarget

Bases: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

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

Compels an entity to jump towards a target.

Parameters:

Name Type Description Default
must_be_on_ground bool

Description. Defaults to True.

True
set_persistent bool

Description. Defaults to False.

False
target_dist float

Description. Defaults to 0.3.

0.3
yd float

Description. 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

EntityAILookAtPlayer

Bases: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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

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]

Description. 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_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: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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

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]

Description. 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_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: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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

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]

Description. Defaults to None.

None
probability float

Description. 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: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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)

Compels entities to make close combat melee attacks.

Parameters:

Name Type Description Default
attack_once bool

Description. Defaults to False.

False
cooldown_time int

Description. Defaults to 1.

1
inner_boundary_time_increase float

Description. Defaults to 0.25.

0.25
max_path_time float

Description. Defaults to 0.55.

0.55
melee_fov int

Description. Defaults to 90.

90
min_path_time float

Description. Defaults to 0.2.

0.2
outer_boundary_time_increase float

Description. Defaults to 0.5.

0.5
path_fail_time_increase float

Description. Defaults to 0.75.

0.75
path_inner_boundary int

Description. Defaults to 16.

16
path_outer_boundary int

Description. Defaults to 32.

32
random_stop_interval int

Description. Defaults to 0.

0
reach_multiplier int

Description. Defaults to 2.

2
require_complete_path bool

Description. Defaults to False.

False
speed_multiplier float

Description. Defaults to 1.

1
track_target bool

Description. Defaults to False.

False
x_max_rotation int

Description. Defaults to 30.

30
y_max_head_rotation int

Description. Defaults to 30.

30
can_spread_on_fire bool

Description. 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: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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)

Compels an entity to attack a target by stomping on them.

Parameters:

Name Type Description Default
attack_once bool

Description. Defaults to False.

False
attack_types list[str]

Description. Defaults to [].

[]
can_spread_on_fire bool

Description. Defaults to False.

False
cooldown_time Seconds

Description. Defaults to 1.

1
horizontal_reach float

Description. Defaults to 0.8.

0.8
inner_boundary_time_increase Seconds

Description. Defaults to 0.25.

0.25
max_path_time Seconds

Description. Defaults to 0.55.

0.55
melee_fov int

Description. Defaults to 90.

90
min_path_time Seconds

Description. Defaults to 0.2.

0.2
outer_boundary_time_increase Seconds

Description. Defaults to 0.5.

0.5
path_fail_time_increase Seconds

Description. Defaults to 0.75.

0.75
path_inner_boundary float

Description. Defaults to 16.

16
path_outer_boundary float

Description. Defaults to 32.

32
random_stop_interval int

Description. Defaults to 0.

0
box_increase float

Description. Defaults to 2.

2
require_complete_path bool

Description. Defaults to False.

False
set_persistent bool

Description. Defaults to False.

False
speed_multiplier float

Description. Defaults to 1.

1
track_target bool

Description. Defaults to False.

False
x_max_rotation int

Description. Defaults to 30.

30
y_max_head_rotation int

Description. 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: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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

Description. Defaults to 0.0.

0.0
duration float

Description. Defaults to 1.0.

1.0
mingle_distance float

Description. Defaults to 2.0.

2.0
mingle_partner_type list[str]

Description. Defaults to [].

[]
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_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

EntityAIMoveIndoors

Bases: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__(speed_multiplier=0.8, timeout_cooldown=8.0)

Allows this entity to move indoors.

Parameters:

Name Type Description Default
speed_multiplier float

Description. Defaults to 0.8.

0.8
timeout_cooldown float

Description. 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

EntityAIMoveToBlock

Bases: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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)

Compels a mob to move towards a block.

Parameters:

Name Type Description Default
target_blocks list[Block | str]

Description.

required
goal_radius float

Description. Defaults to 0.5.

0.5
search_height int

Description. Defaults to 1.

1
search_range int

Description. Defaults to 0.

0
speed_multiplier float

Description. Defaults to 1.0.

1.0
start_chance float

Description. Defaults to 1.0.

1.0
stay_duration float

Description. Defaults to 0.0.

0.0
target_offset tuple[float, float, float]

Description. Defaults to (0, 0, 0).

(0, 0, 0)
target_selection_method str

Description. Defaults to 'nearest'.

'nearest'
tick_interval int

Description. 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: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

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

Compels an entity to move to land when on land.

Parameters:

Name Type Description Default
goal_radius float

Description. Defaults to 0.5.

0.5
search_count int

Description. Defaults to 10.

10
search_height int

Description. Defaults to 1.

1
search_range int

Description. Defaults to 0.

0
speed_multiplier float

Description. 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: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

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

Compels an entity to move to lava when on lava.

Parameters:

Name Type Description Default
goal_radius float

Description. Defaults to 0.5.

0.5
search_count int

Description. Defaults to 10.

10
search_height int

Description. Defaults to 1.

1
search_range int

Description. Defaults to 0.

0
speed_multiplier float

Description. 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

EntityAIMoveToRandomBlock

Bases: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__(block_distance=16, speed_multiplier=1.0, within_radius=0.0)

Compels a mob to move towards a randomly chosen block.

Parameters:

Name Type Description Default
block_distance float

Description. Defaults to 16.

16
speed_multiplier float

Description. Defaults to 1.0.

1.0
within_radius float

Description. 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

EntityAIMoveToWater

Bases: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

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

Compels an entity to move to water when on land.

Parameters:

Name Type Description Default
goal_radius float

Description. Defaults to 0.5.

0.5
search_count int

Description. Defaults to 10.

10
search_height int

Description. Defaults to 1.

1
search_range int

Description. Defaults to 0.

0
speed_multiplier float

Description. 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: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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

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_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

EntityAIMoveTowardsTarget

Bases: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__(within_radius=0.0, speed_multiplier=1.0)

Compels an entity to move towards a target.

Parameters:

Name Type Description Default
within_radius float

Description. 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

EntityAINearestAttackableTarget

Bases: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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

Description. Defaults to 0.

0
attack_interval_min int

Description. Defaults to 0.

0
attack_owner bool

Description. Defaults to False.

False
must_reach bool

Description. Defaults to False.

False
must_see bool

Description. Defaults to False.

False
must_see_forget_duration float

Description. Defaults to 3.0.

3.0
persist_time float

Description. Defaults to 0.0.

0.0
reselect_targets bool

Description. Defaults to False.

False
scan_interval int

Description. Defaults to 10.

10
set_persistent bool

Description. Defaults to False.

False
target_invisible_multiplier float

Description. Defaults to 0.7.

0.7
target_search_height float

Description. Defaults to -0.1.

-0.1
target_sneak_visibility_multiplier float

Description. Defaults to 0.8.

0.8
within_radius float

Description. Defaults to 0.0.

0.0
target_acquisition_probability float

Description. 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: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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 an entity to attack the closest target within a given subset of specific target types.

Parameters:

Name Type Description Default
attack_interval int

Description. Defaults to 0.

0
attack_interval_min int

Description. Defaults to 0.

0
attack_owner bool

Description. Defaults to False.

False
must_reach bool

Description. Defaults to False.

False
must_see bool

Description. Defaults to False.

False
must_see_forget_duration float

Description. Defaults to 3.0.

3.0
persist_time float

Description. Defaults to 0.0.

0.0
reevaluate_description bool

Description. Defaults to False.

False
reselect_targets bool

Description. Defaults to False.

False
scan_interval int

Description. Defaults to 10.

10
set_persistent bool

Description. Defaults to False.

False
target_invisible_multiplier float

Description. Defaults to 0.7.

0.7
target_search_height float

Description. Defaults to -0.1.

-0.1
target_sneak_visibility_multiplier float

Description. Defaults to 0.8.

0.8
within_radius float

Description. 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: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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)

Allows an entity to attack by sneaking and pouncing.

Parameters:

Name Type Description Default
cooldown_time int

Description. Defaults to 1.

1
max_distance int

Description. Defaults to 15.

15
max_sneak_range int

Description. Defaults to 15.

15
max_sprint_range int

Description. Defaults to 4.

4
reach_multiplier int

Description. Defaults to 2.

2
sneak_speed_multiplier float

Description. Defaults to 0.6.

0.6
sprint_speed_multiplier float

Description. Defaults to 1.33.

1.33
walk_speed_multiplier float

Description. Defaults to 0.8.

0.8
x_max_rotation int

Description. Defaults to 30.

30
y_max_head_rotation int

Description. 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

EntityAIOwnerHurtByTarget

Bases: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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)

Compels an entity to react when the owner is hit by a target.

Parameters:

Name Type Description Default
entity_types Filter

Description. 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

Description. 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: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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)

Compels an entity to react when the owner hits a target.

Parameters:

Name Type Description Default
entity_types Filter

Description. 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

Description. 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_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: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__(damage_sources=DamageCause.All, force=False, ignore_mob_damage=False, panic_sound=None, prefer_water=False, sound_interval=0, speed_multiplier=1.0)

Compels an entity to react when it receives damage.

Parameters:

Name Type Description Default
damage_sources DamageCause

Description. Defaults to DamageCause.All.

All
force bool

Description. Defaults to False.

False
ignore_mob_damage bool

Description. Defaults to False.

False
panic_sound str

Description. Defaults to None.

None
prefer_water bool

Description. Defaults to False.

False
sound_interval float

Description. Defaults to 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_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

EntityAIPickupItems

Bases: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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

Description. Defaults to False.

False
can_pickup_to_hand_or_equipment bool

Description. Defaults to True.

True
cooldown_after_being_attacked float

Description. Defaults to 0.0.

0.0
excluded_items list[str]

Description. Defaults to [].

[]
goal_radius float

Description. Defaults to 0.5.

0.5
max_dist float

Description. Defaults to 0.0.

0.0
pickup_based_on_chance bool

Description. Defaults to False.

False
pickup_same_items_as_in_hand bool

Description. Defaults to False.

False
search_height float

Description. Defaults to 0.0.

0.0
speed_multiplier float

Description. Defaults to 1.0.

1.0
track_target bool

Description. 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: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__(affected_by_griefing_rule=False, can_place=None, chance=0.0, placeable_carried_blocks=[], xz_range=(0, 0), y_range=(0, 0))

Compels an entity to place blocks in the world, such as Copper Golems placing statues.

Parameters:

Name Type Description Default
affected_by_griefing_rule bool

Description. Defaults to False.

False
can_place Filter

Description. Defaults to None.

None
chance float

Description. Defaults to 0.0.

0.0
placeable_carried_blocks list[MinecraftBlockDescriptor]

Description. Defaults to [].

[]
xz_range Vector2D

Description. Defaults to (0, 0).

(0, 0)
y_range Vector2D

Description. 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: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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 play with other mobs by chasing each other and moving around randomly.

Parameters:

Name Type Description Default
chance_to_start float

Description. Defaults to 0.0.

0.0
follow_distance int

Description. Defaults to 2.

2
friend_search_area Coordinates

Description. Defaults to (6, 3, 6).

(6, 3, 6)
friend_types Filter

Description. Defaults to None.

None
max_play_duration_seconds float

Description. Defaults to 50.0.

50.0
random_pos_search_height int

Description. Defaults to 3.

3
random_pos_search_range int

Description. Defaults to 16.

16
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_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

EntityAIPlayerRideTamed

Bases: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__()

Allows an entity to be rideable after being tamed by a player.

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

EntityAIRamAttack

Bases: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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)

Compels an entity to search for a random target and, if a direct path exists between the entity and the target, it will perform a charge. If the attack hits, the target will be knocked back based on the entity's speed.

Parameters:

Name Type Description Default
baby_knockback_modifier float

Description. Defaults to 0.333333.

0.333333
cooldown_range list[int, int]

Description. Defaults to [10, 20].

[10, 20]
knockback_force float

Description. Defaults to 5.

5
knockback_height float

Description. Defaults to 0.1.

0.1
min_ram_distance float

Description. Defaults to 0.0.

0.0
pre_ram_sound str

Description. Defaults to None.

None
ram_distance float

Description. Defaults to 0.0.

0.0
ram_impact_sound str

Description. Defaults to None.

None
ram_speed float

Description. Defaults to 2.0.

2.0
run_speed float

Description. 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: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__(interval=120, speed_multiplier=1.0, xz_dist=10, y_dist=7, cooldown_time=10)

Compels an entity to breach the surface of the water at a random interval.

Parameters:

Name Type Description Default
interval int

Description. Defaults to 120.

120
speed_multiplier float

Description. Defaults to 1.0.

1.0
xz_dist int

Description. Defaults to 10.

10
y_dist int

Description. Defaults to 7.

7
cooldown_time Seconds

Description. 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

EntityAIRandomHover

Bases: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__(hover_height=(0.0, 0.0), interval=120, speed_multiplier=1.0, xz_dist=10, y_dist=7, y_offset=0.0)

Compels an entity to hover around randomly, close to the surface.

Parameters:

Name Type Description Default
hover_height tuple[float, float]

Description. Defaults to (0.0, 0.0).

(0.0, 0.0)
interval int

Description. Defaults to 120.

120
speed_multiplier float

Description. Defaults to 1.0.

1.0
xz_dist int

Description. Defaults to 10.

10
y_dist int

Description. 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_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: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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 choose a random direction to look in for a random duration within a range.

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]

Description. 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

EntityAIRandomSearchAndDig

Bases: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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)

Compels an entity to locate a random target block that it can find a path towards. Once found, the entity will move towards the target block and dig up an item.

Parameters:

Name Type Description Default
cooldown_range tuple[Seconds, Seconds]

Description. Defaults to (0, 0).

(0, 0)
digging_duration_range tuple[Seconds, Seconds]

Description. Defaults to (0, 0).

(0, 0)
find_valid_position_retries int

Description. Defaults to 0.

0
goal_radius float

Description. Defaults to 1.5.

1.5
item_table str

Description. Defaults to None.

None
search_range_xz float

Description. Defaults to 0.

0
search_range_y float

Description. Defaults to 0.

0
spawn_item_after_seconds Seconds

Description. Defaults to 0.

0
spawn_item_pos_offset float

Description. Defaults to 0.

0
speed_multiplier float

Description. Defaults to 0.

0
target_blocks list[str]

Description. Defaults to [].

[]
target_dig_position_offset float

Description. 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: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__(cooldown_time=0, min_sit_time=10, start_chance=0.1, stop_chance=0.3)

Compels an entity to stop and sit for a random duration of time.

Parameters:

Name Type Description Default
cooldown_time float

Description. Defaults to 0.

0
min_sit_time float

Description. Defaults to 10.

10
start_chance float

Description. Defaults to 0.1.

0.1
stop_chance float

Description. 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: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__(interval=120, speed_multiplier=1.0, xz_dist=10, y_dist=7)

Compels an entity to choose a random direction to walk towards.

Parameters:

Name Type Description Default
interval int

Description. Defaults to 120.

120
speed_multiplier float

Description. Defaults to 1.0.

1.0
xz_dist int

Description. Defaults to 10.

10
y_dist int

Description. 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: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__(avoid_surface=True, interval=120, speed_multiplier=1.0, xz_dist=10, y_dist=7)

Compels an entity to swim in a random point in water.

Parameters:

Name Type Description Default
avoid_surface bool

Description. Defaults to True.

True
interval int

Description. Defaults to 120.

120
speed_multiplier float

Description. Defaults to 1.0.

1.0
xz_dist int

Description. Defaults to 10.

10
y_dist int

Description. 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: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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 behavior.

Parameters:

Name Type Description Default
attack_interval int

Description. Defaults to 0.

0
attack_interval_max int

Description. Defaults to 0.

0
attack_interval_min int

Description. Defaults to 0.

0
attack_radius int

Description. Defaults to 0.

0
attack_radius_min int

Description. Defaults to 0.

0
burst_interval int

Description. Defaults to 0.

0
burst_shots int

Description. Defaults to 1.

1
charge_charged_trigger int

Description. Defaults to 0.

0
charge_shoot_trigger int

Description. Defaults to 0.

0
ranged_fov int

Description. Defaults to 90.

90
set_persistent bool

Description. Defaults to False.

False
speed_multiplier int

Description. Defaults to 1.

1
swing bool

Description. Defaults to False.

False
target_in_sight_time int

Description. Defaults to 1.

1
x_max_rotation int

Description. Defaults to 30.

30
y_max_head_rotation int

Description. 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: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__()

Allows the villager to receive love from another 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

EntityAIRiseToLiquidLevel

Bases: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__(liquid_y_offset=0.0, rise_delta=0.0, sink_delta=0.0)

Compels an entity to rise to the top of a liquid block if they are located in one or have spawned under a liquid block.

Parameters:

Name Type Description Default
liquid_y_offset float

Description. Defaults to 0.0.

0.0
rise_delta float

Description. Defaults to 0.0.

0.0
sink_delta float

Description. 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: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__(duration=0.0)

Compels the entity to roar at another entity based on data in minecraft:anger_level. When 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

Description. 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

EntityAIRunAroundLikeCrazy

Bases: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__(speed_multiplier=1.0)

Compels an entity to run around without a set goal.

Parameters:

Name Type Description Default
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_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

EntityAISendEvent

Bases: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__()

Compels an entity to send an event to another entity.

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: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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

Description. Defaults to None.

None
goal_radius float

Description. Defaults to 0.5.

0.5
max_dist float

Description. 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_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

EntityAISleep

Bases: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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

Description. Defaults to False.

False
cooldown_time float

Description. Defaults to 0.0.

0.0
goal_radius float

Description. Defaults to None.

None
sleep_collider_height float

Description. Defaults to 1.0.

1.0
sleep_collider_width float

Description. Defaults to 1.0.

1.0
sleep_y_offset float

Description. Defaults to 1.0.

1.0
speed_multiplier float

Description. Defaults to 1.0.

1.0
timeout_cooldown float

Description. 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

EntityAISlimeKeepOnJumping

Bases: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__(speed_multiplier=1.0)

Compels an entity to continuously jump around like a slime.

Parameters:

Name Type Description Default
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_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

EntityAIStayWhileSitting

Bases: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__()

Compels an entity to stay in place while sitting.

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: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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)

Compels an entity to attack a target by stomping on them.

Parameters:

Name Type Description Default
attack_once bool

Description. Defaults to False.

False
attack_types list[str]

Description. Defaults to [].

[]
cooldown_time Seconds

Description. Defaults to 1.

1
inner_boundary_time_increase Seconds

Description. Defaults to 0.25.

0.25
max_path_time Seconds

Description. Defaults to 0.55.

0.55
melee_fov int

Description. Defaults to 90.

90
min_path_time Seconds

Description. Defaults to 0.2.

0.2
no_damage_range_multiplier float

Description. Defaults to 2.

2
outer_boundary_time_increase Seconds

Description. Defaults to 0.5.

0.5
path_fail_time_increase Seconds

Description. Defaults to 0.75.

0.75
path_inner_boundary float

Description. Defaults to 16.

16
path_outer_boundary float

Description. Defaults to 32.

32
random_stop_interval int

Description. Defaults to 0.

0
reach_multiplier float

Description. Defaults to 2.

2
require_complete_path bool

Description. Defaults to False.

False
set_persistent bool

Description. Defaults to False.

False
speed_multiplier float

Description. Defaults to 1.

1
stomp_range_multiplier float

Description. Defaults to 2.

2
track_target bool

Description. Defaults to False.

False
x_max_rotation int

Description. Defaults to 30.

30
y_max_head_rotation int

Description. 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

EntityAISummonEntity

Bases: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__()

compels an entity to attack other entities by summoning new 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

EntityAITakeBlock

Bases: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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))

Compels an entity to take blocks from the world, such as Endermen taking blocks.

Parameters:

Name Type Description Default
affected_by_griefing_rule bool

Description. Defaults to False.

False
blocks list[MinecraftBlockDescriptor]

Description. Defaults to [].

[]
can_take Filter

Description. Defaults to None.

None
chance float

Description. Defaults to 0.0.

0.0
requires_line_of_sight bool

Description. Defaults to False.

False
xz_range Vector2D

Description. Defaults to (0, 0).

(0, 0)
y_range Vector2D

Description. 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

EntityAITimerFlag1

Bases: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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 to due the timeout or due to being interrupted by another behavior, the goal 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]

Description. Defaults to (10.0, 10.0).

(10.0, 10.0)
duration_range tuple[Seconds, Seconds]

Description. 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: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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 to due the timeout or due to being interrupted by another behavior, the goal 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]

Description. Defaults to (10.0, 10.0).

(10.0, 10.0)
duration_range tuple[Seconds, Seconds]

Description. 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: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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 to due the timeout or due to being interrupted by another behavior, the goal 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]

Description. Defaults to (10.0, 10.0).

(10.0, 10.0)
duration_range tuple[Seconds, Seconds]

Description. 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: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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

Description. Defaults to 2.0.

2.0
cooldown float

Description. Defaults to 2.0.

2.0
interest_time float

Description. Defaults to 45.0.

45.0
remove_item_time float

Description. Defaults to 1.0.

1.0
within_radius float

Description. 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: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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

Description. Defaults to None.

None
max_distance_from_player float

Description. 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

EntityAIUseKineticWeapon

Bases: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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)

Allows a mob to make use of items with a "minecraft:kinetic_weapon" item component.

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 a mob to override its mount's navigation behavior with the one defined by this goal. ## Documentation reference:. 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

EntityAIWork

Bases: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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

Description. Defaults to 0.

0
can_work_in_rain bool

Description. Defaults to False.

False
goal_cooldown int

Description. Defaults to 0.

0
on_arrival str

Description. Defaults to None.

None
sound_delay_max int

Description. Defaults to 0.

0
sound_delay_min int

Description. Defaults to 0.

0
speed_multiplier float

Description. Defaults to 0.5.

0.5
work_in_rain_tolerance int

Description. 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: _BaseAIGoal

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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

Description. Defaults to 0.

0
block_interaction_max int

Description. Defaults to 1.

1
can_empty_composter bool

Description. Defaults to True.

True
can_fill_composter bool

Description. Defaults to True.

True
can_work_in_rain bool

Description. Defaults to False.

False
goal_cooldown int

Description. Defaults to 0.

0
items_per_use_max int

Description. Defaults to 20.

20
min_item_count int

Description. Defaults to 10.

10
on_arrival str

Description. Defaults to None.

None
speed_multiplier float

Description. Defaults to 0.5.

0.5
use_block_max int

Description. Defaults to 200.

200
use_block_min int

Description. Defaults to 100.

100
work_in_rain_tolerance int

Description. 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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__(entity_type, spawn_event=None)

Adds a rider to the entity. Requires minecraft:rideable..

Parameters:

Name Type Description Default
entity_type MinecraftEntityDescriptor | Identifier

The type of entity to add as a rider.

required
spawn_event Event

An event to run when the rider is spawned. 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 : Event, 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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__(cooldown_after_being_attacked, duration=10)

Causes the mob 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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__(duration=1200.0, interact_filters=None, result_item=None)

Adds a timer for the entity to grow up. The timer can be accelerated by giving the entity items it likes as defined by feed_items.

Parameters:

Name Type Description Default
duration Seconds

Description. Defaults to 1200.0.

1200.0
interact_filters Filter

Description. Defaults to None.

None
result_item str

Description. 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

set_identifier_data(data)

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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__(event_name, range=16, value=8)

A component that will set the entity's delay between playing its ambient sound.

Parameters:

Name Type Description Default
event_name str

Description.

required
range float

Description. Defaults to 16.

16
value float

Description. Defaults to 8.

8
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.

set_identifier_data(data)

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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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

Description. Defaults to 1.0.

1.0
angry_boost int

Description. Defaults to 20.

20
angry_threshold int

Description. Defaults to 80.

80
default_annoyingness int

Description. Defaults to 0.

0
default_projectile_annoyingness int

Description. Defaults to 0.

0
max_anger int

Description. Defaults to 100.

100
nuisance_filter Filter

Description. Defaults to None.

None
on_increase_sounds list[dict[str, str]]

Description. Defaults to [].

[]
remove_targets_below_angry_threshold bool

Description. 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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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 the entity's 'angry' state using a timer.

Parameters:

Name Type Description Default
angry_sound str

Description. Defaults to None.

None
broadcast_anger bool

Description. Defaults to False.

False
broadcast_anger_on_attack bool

Description. Defaults to False.

False
broadcast_anger_on_being_attacked bool

Description. Defaults to False.

False
broadcast_filters Filter

Description. Defaults to None.

None
broadcast_range int

Description. Defaults to 20.

20
broadcast_targets list[str]

Description. Defaults to [].

[]
duration Seconds

Description. Defaults to 25.

25
duration_delta Seconds

Description. Defaults to 0.

0
filters Filter

Description. Defaults to None.

None
sound_interval list[Seconds]

Description. 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

EntityAnnotationOpenDoor

Bases: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__(cause, damage_per_tick=2, damage_range=0.2)

Is a component that does damage to entities that get within range.

Parameters:

Name Type Description Default
cause DamageCause

Description.

required
damage_per_tick int

Description. Defaults to 2.

2
damage_range float

Description. Defaults to 0.2.

0.2
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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__(armor_slot)

Sets the equipment slot to map to the entity's armor slot.

Parameters:

Name Type Description Default
armor_slot Slots

Description.

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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__(damage, effect_duration=None, effect_name=None)

Defines an entity's melee attack and any additional effects on it.

Parameters:

Name Type Description Default
damage int

Description.

required
effect_duration int

Description. Defaults to None.

None
effect_name str

Description. 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

EntityBodyRotationAlwaysFollowsHead

Bases: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__()

Causes the entity's body to always be automatically rotated to align with the entity's 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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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

EntityBoss

Bases: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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

Description. Defaults to 55.

55
should_darken_sky bool

Description. 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

EntityBreathable

Bases: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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 which blocks an entity can breathe in and defines the ability to suffocate in those blocks.

Parameters:

Name Type Description Default
breathes_air bool

Description. Defaults to True.

True
breathes_lava bool

Description. Defaults to True.

True
breathes_solids bool

Description. Defaults to False.

False
breathes_water bool

Description. Defaults to False.

False
generates_bubbles bool

Description. Defaults to True.

True
inhale_time Seconds

Description. Defaults to 0.0.

0.0
suffocate_time Seconds

Description. Defaults to -20.

-20
total_supply Seconds

Description. Defaults to 15.

15
can_dehydrate bool

Description. Defaults to False.

False
breathe_blocks list[MinecraftBlockDescriptor]

Description. Defaults to [].

[]
non_breathe_blocks list[MinecraftBlockDescriptor]

Description. 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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__(allow_sitting=False, blend_attributes=True, breed_cooldown=60, breed_items=None, causes_pregnancy=False, combine_parent_colors=None, extra_baby_chance=0, inherit_tamed=True, love_filters=None, mutation_strategy=BreedingMutationStrategy.None_, parent_centric_attribute_blending=None, property_inheritance=None, random_extra_variant_mutation_interval=(0, 0), random_variant_mutation_interval=(0, 0), require_full_health=False, require_tame=True, result_item=None)

Allows an entity to get into the 'love' state used for breeding.

Parameters:

Name Type Description Default
allow_sitting bool

Description. Defaults to False.

False
blend_attributes bool

Description. Defaults to True.

True
breed_cooldown Seconds

Description. Defaults to 60.

60
breed_items list[str]

Description. Defaults to None.

None
causes_pregnancy bool

Description. Defaults to False.

False
combine_parent_colors bool

Description. Defaults to None.

None
extra_baby_chance float

Description. Defaults to 0.

0
inherit_tamed bool

Description. Defaults to True.

True
love_filters Filter

Description. Defaults to None.

None
mutation_strategy BreedingMutationStrategy

Description. Defaults to BreedingMutationStrategy.None_.

None_
parent_centric_attribute_blending list[_BaseComponent]

Description. Defaults to None.

None
property_inheritance list[str]

Description. Defaults to None.

None
random_extra_variant_mutation_interval tuple[int, int]

Description. Defaults to (0, 0).

(0, 0)
random_variant_mutation_interval tuple[int, int]

Description. Defaults to (0, 0).

(0, 0)
require_full_health bool

Description. Defaults to False.

False
require_tame bool

Description. Defaults to True.

True
result_item str

Description. 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, baby_type, breed_event, breed_event_target=FilterSubject.Baby, breed_event_filter=None)

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.

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.

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.

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

EntityBuoyant

Bases: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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, simulate_waves=True)

Allows an entity to float on the specified liquid blocks.

Parameters:

Name Type Description Default
liquid_blocks list[MinecraftBlockDescriptor]

Description.

required
apply_gravity bool

Description. Defaults to True.

True
base_buoyancy float

Description. Defaults to 1.0.

1.0
big_wave_probability float

Description. Defaults to 0.03.

0.03
big_wave_speed float

Description. Defaults to 10.0.

10.0
drag_down_on_buoyancy_removed float

Description. Defaults to 0.0.

0.0
simulate_waves bool

Description. Defaults to True.

True
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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__(protection_slot=None)

Compels an entity to burn when it's daylight.

Parameters:

Name Type Description Default
protection_slot Slots

Description. 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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__()

Allows this entity to climb up 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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__()

Determines that a given entity can join an existing 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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__()

An entity with this component will NEVER be attacked by other entities.

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

EntityCollisionBox

Bases: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__(height, width)

Sets the width and height of the Entity's collision box.

Parameters:

Name Type Description Default
height float

Description.

required
width float

Description.

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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__(value)

Defines the entity's main color.

Parameters:

Name Type Description Default
value int

Description.

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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__(value)

Defines the entity's second texture color.

Parameters:

Name Type Description Default
value int

Description.

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

EntityConditionalBandwidthOptimization

Bases: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__(max_dropped_ticks=0, max_optimized_distance=0, use_motion_prediction_hints=False)

Defines the Conditional Spatial Update Bandwidth Optimizations of the entity.

Parameters:

Name Type Description Default
max_dropped_ticks int

Description. Defaults to 0.

0
max_optimized_distance int

Description. Defaults to 0.

0
use_motion_prediction_hints bool

Description. 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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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

Description.

required
width float

Description.

required
pivot list[float, float, float]

Description. 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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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

EntityDamageSensor

Bases: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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

EntityDashAction

Bases: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__(direction='entity', cooldown_time=1.0, horizontal_momentum=1.0, vertical_momentum=1.0, can_dash_underwater=False)

Determines a rideable entity's ability to dash.

Parameters:

Name Type Description Default
direction Literal[entity, passenger]

Description. Defaults to 'entity'.

'entity'
cooldown_time Seconds

Description. Defaults to 1.0.

1.0
horizontal_momentum float

Description. Defaults to 1.0.

1.0
vertical_momentum float

Description. Defaults to 1.0.

1.0
can_dash_underwater bool

Description. 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

EntityDimensionBound

Bases: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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

EntityDweller

Bases: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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

Description. Defaults to False.

False
can_migrate bool

Description. Defaults to False.

False
dweller_role Literal[inhabitant, defender, hostile, passive]

Description. Defaults to None.

None
dwelling_bounds_tolerance float

Description. Defaults to 0.0.

0.0
dwelling_type Literal[village]

Description. Defaults to None.

None
first_founding_reward int

Description. Defaults to 0.

0
preferred_profession str

Description. Defaults to None.

None
update_interval_base float

Description. Defaults to 0.0.

0.0
update_interval_variant float

Description. 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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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

Description.

required
convert_trades_economy bool

Description. Defaults to False.

False
cured_discount list[int]

Description. Defaults to None.

None
display_name str

Description. Defaults to None.

None
hero_demand_discount int

Description. Defaults to -4.

-4
max_cured_discount list[int]

Description. Defaults to None.

None
max_nearby_cured_discount int

Description. Defaults to -200.

-200
nearby_cured_discount int

Description. Defaults to -20.

-20
new_screen bool

Description. Defaults to False.

False
persist_trades bool

Description. Defaults to False.

False
show_trade_screen bool

Description. Defaults to True.

True
use_legacy_price_formula bool

Description. 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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__(can_wear_armor=False, excluded_items=[])

Compels the entity to equip desired equipment.

Parameters:

Name Type Description Default
can_wear_armor bool

Description. Defaults to False.

False
excluded_items list[MinecraftItemDescriptor]

Description. 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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__(table)

Sets the loot table for what items this entity drops upon death.

Parameters:

Name Type Description Default
table LootTable | str

Description.

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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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 this entity generates for various actions.

Parameters:

Name Type Description Default
attack float

Description. Defaults to 0.1.

0.1
damage float

Description. Defaults to 0.1.

0.1
heal float

Description. Defaults to 6.

6
jump float

Description. Defaults to 0.05.

0.05
lunge float

Description. Defaults to 4.

4
mine float

Description. Defaults to 0.005.

0.005
sprint float

Description. Defaults to 0.01.

0.01
sprint_jump float

Description. Defaults to 0.2.

0.2
swim float

Description. Defaults to 0.01.

0.01
walk float

Description. 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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__(on_bred=0, on_death=0)

Defines the amount of experience rewarded when the entity dies or is successfully bred.

Parameters:

Name Type Description Default
on_bred int | float | Molang

Description. Defaults to 0.

0
on_death int | float | Molang

Description. 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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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

Description. Defaults to True.

True
causes_fire bool

Description. Defaults to False.

False
destroy_affected_by_griefing bool

Description. Defaults to False.

False
fire_affected_by_griefing bool

Description. Defaults to False.

False
fuse_length tuple[float, float]

Description. Defaults to [0.0, 0.0].

[0.0, 0.0]
fuse_lit bool

Description. Defaults to False.

False
max_resistance int

Description. Defaults to 3.40282e+38.

3.40282e+38
power int

Description. Defaults to 3.

3
damage_scaling float

Description. Defaults to 1.0.

1.0
toggles_blocks bool

Description. Defaults to False.

False
knockback_scaling float

Description. Defaults to 1.0.

1.0
particle_effect ExplosionParticleEffect

Description. Defaults to ExplosionParticleEffect.Explosion.

Explosion
sound_effect str

Description. Defaults to 'explode'.

'explode'
negates_fall_damage bool

Description. Defaults to False.

False
allow_underwater bool

Description. 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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__()

Allows an entity to take 0 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

EntityFlyingSpeed

Bases: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__(value)

Sets the speed, in Blocks, at which the entity flies.

Parameters:

Name Type Description Default
value int

Description.

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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__(value, max=None)

A component that defines the entity's flying movement speed in meters per second.

Parameters:

Name Type Description Default
value float

Description.

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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__(value, max_range=None)

Defines the range of blocks that a mob will pursue a target.

Parameters:

Name Type Description Default
value int

Description.

required
max_range int

Description. 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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__(backwards_movement_modifier=0.5, strafe_speed_modifier=0.4)

Allows a rideable entity to be controlled in the air using WASD and mouse controls.

Parameters:

Name Type Description Default
backwards_movement_modifier float

Description. Defaults to 0.5.

0.5
strafe_speed_modifier float

Description. 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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__(value)

Defines how much friction affects this entity.

Parameters:

Name Type Description Default
value int

Description.

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

EntityHealable

Bases: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__(filters=None, force_use=False)

Allows the entity to be healed by players using healing items.

Parameters:

Name Type Description Default
filters Filter

Description. Defaults to None.

None
force_use bool

Description. 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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__(value, min=None, max=None)

Sets the amount of health this mob has.

Parameters:

Name Type Description Default
value int

Description.

required
min int

Description. Defaults to None.

None
max int

Description. 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

EntityHide

Bases: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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

EntityHorseJumpStrength

Bases: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__(range_min, range_max)

Allows this mob to jump higher when being ridden by a player.

Parameters:

Name Type Description Default
range_min float

Description.

required
range_max float

Description.

required
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_horse_jump_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

EntityHurtOnCondition

Bases: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__(cause=None, filters=None, damage_per_tick=1)

Causes the entity to take damage when certain conditions are met.

Parameters:

Name Type Description Default
cause DamageCause

Description. Defaults to None.

None
filters Filter

Description. Defaults to None.

None
damage_per_tick int

Description. 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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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

Description. 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

EntityInputGroundControlled

Bases: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__()

Allows a ridable entity the ability to be controlled using keyboard controls when ridden by a player.

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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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

EntityInstantDespawn

Bases: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__(remove_child_entities=False)

Despawns the Actor immediately.

Parameters:

Name Type Description Default
remove_child_entities bool

Description. 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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__()

Defines the interactions that can be used with an 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=False, 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.

False
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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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 how an entity's inventory is managed.

Parameters:

Name Type Description Default
additional_slots_per_strength int

Description. Defaults to 0.

0
can_be_siphoned_from bool

Description. Defaults to False.

False
container_type ContainerType

Description. Defaults to ContainerType.Inventory.

Inventory
inventory_size int

Description. Defaults to 5.

5
private bool

Description. Defaults to False.

False
restrict_to_owner bool

Description. 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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__()

Sets that this entity is a baby.

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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__()

Sets that this entity is charged.

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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__()

Allows other mobs to have vertical and horizontal collisions with this mob.

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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__()

Causes the entity to be completely hidden when it has the invisibility effect.

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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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

EntityIsSaddled

Bases: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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

EntityIsSheared

Bases: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__()

Sets that this entity can be stacked.

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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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

EntityItemHopper

Bases: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__()

Allows an entity to function like a hopper block.

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

EntityJumpStatic

Bases: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__(jump_power=0.42)

Gives the entity the ability to jump.

Parameters:

Name Type Description Default
jump_power float

Description. Defaults to 0.42.

0.42
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_jump_static

__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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__(value)

Determines the amount of knockback resistance that the item has.

Parameters:

Name Type Description Default
value float

Description.

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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__(value)

Defines the speed with which an entity can move through lava.

Parameters:

Name Type Description Default
value float

Description.

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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__(can_be_cut=True, can_be_stolen=True, hard_distance=6, max_distance=None, soft_distance=4, on_unleash_interact_only=False)

Defines how this mob can be leashed to other items.

Parameters:

Name Type Description Default
can_be_cut bool

Description. Defaults to True.

True
can_be_stolen bool

Description. Defaults to True.

True
hard_distance int

Description. Defaults to 6.

6
max_distance int

Description. Defaults to None.

None
soft_distance int

Description. Defaults to 4.

4
on_unleash_interact_only bool

Description. 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

EntityLookedAt

Bases: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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

Description. Defaults to 26.

26
filters Filter

Description. Defaults to None.

None
find_players_only bool

Description. Defaults to False.

False
line_of_sight_obstruction_type LineOfSightObstructionType

Description. Defaults to LineOfSightObstructionType.Collision.

Collision
look_at_locations list[LookAtLocation]

Description. Defaults to None.

None
looked_at_cooldown tuple[Seconds, Seconds]

Description. Defaults to (0, 0).

(0, 0)
looked_at_event str

Description. Defaults to None.

None
not_looked_at_event str

Description. Defaults to None.

None
scale_fov_by_distance bool

Description. Defaults to True.

True
search_radius float

Description. Defaults to 10.

10
set_target LootedAtSetTarget

Description. 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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__(loot_table)

Sets the loot table for what items this entity drops upon death.

Parameters:

Name Type Description Default
loot_table LootTable | str

Description.

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

EntityMarkVariant

Bases: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__(value)

Additional variant value. Can be used to further differentiate variants.

Parameters:

Name Type Description Default
value int

Description.

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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__(mob_effect, entity_filter, cooldown_time=0, effect_range=0.2, effect_time=10, ambient=False)

Applies a mob effect to entities that get within range.

Parameters:

Name Type Description Default
mob_effect MinecraftEffects

Description.

required
entity_filter Filter

Description.

required
cooldown_time int

Description. Defaults to 0.

0
effect_range float

Description. Defaults to 0.2.

0.2
effect_time int

Description. Defaults to 10.

10
ambient bool

Description. 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

EntityMovement

Bases: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__(value, max=None)

Defined the movement speed of the entity in block/tick.

Parameters:

Name Type Description Default
value int

Description.

required
max int

Description. 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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__(value, max=None)

A component that defines the entity's movement speed in meters per second.

Parameters:

Name Type Description Default
value float

Description.

required
max float

Description. 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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__(value)

Sets the offset used to determine the next step distance for playing a movement sound.

Parameters:

Name Type Description Default
value float

Description.

required
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_movement_sound_distance_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

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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__(allow_name_tag_renaming=True, always_show=False)

Allows the entity to have a custom name.

Parameters:

Name Type Description Default
allow_name_tag_renaming bool

Description. Defaults to True.

True
always_show bool

Description. 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.

EntityOnDeath

Bases: _BaseEventTrigger

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__(event, filters=None, target=FilterSubject.Self)

Add a trigger to run when the entity dies.

Parameters:

Name Type Description Default
event Event

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: _BaseEventTrigger

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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 Event

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: _BaseEventTrigger

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__(event, filters=None, target=FilterSubject.Self)

Add a trigger to run when the entity is hurt.

Parameters:

Name Type Description Default
event Event

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: _BaseEventTrigger

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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 Event

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: _BaseEventTrigger

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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 Event

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: _BaseEventTrigger

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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 Event

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: _BaseEventTrigger

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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 Event

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: _BaseEventTrigger

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__(event, filters=None, target=FilterSubject.Self)

Adds a trigger to call when this entity finds a target.

Parameters:

Name Type Description Default
event Event

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: _BaseEventTrigger

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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 Event

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: _BaseEventTrigger

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__(event, filters=None, target=FilterSubject.Self)

A trigger when a mob's tamed onwer wakes up.

Parameters:

Name Type Description Default
event Event

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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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

EntityPersistent

Bases: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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

Description. Defaults to True.

True
has_gravity bool

Description. Defaults to True.

True
push_towards_closest_space bool

Description. 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

EntityPreferredPath

Bases: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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

Description. Defaults to 0.

0
jump_cost int

Description. Defaults to 0.

0
max_fall_blocks int

Description. 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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of 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.

__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

. Defaults to 0.

0
catch_fire bool

. Defaults to False.

False
crit_particle_on_hurt bool

. Defaults to False.

False
destroy_on_hurt bool

. Defaults to False.

False
fire_affected_by_griefing bool

. Defaults to False.

False
gravity float

. Defaults to 0.05.

0.05
hit_sound str

. Defaults to ''.

''
hit_ground_sound str

. Defaults to ''.

''
hit_water bool

. Defaults to False.

False
homing bool

. Defaults to False.

False
inertia float

. Defaults to 0.99.

0.99
is_dangerous bool

. Defaults to False.

False
knockback bool

. Defaults to True.

True
lightning bool

. Defaults to False.

False
liquid_inertia float

. Defaults to 0.6.

0.6
multiple_targets bool

. Defaults to True.

True
offset Coordinates

. Defaults to (0, 0.5, 0).

(0, 0.5, 0)
on_fire_time float

. Defaults to 5.0.

5.0
particle str

. Defaults to 'iconcrack'.

'iconcrack'
potion_effect int

. Defaults to -1.

-1
power float

. Defaults to 1.3.

1.3
reflect_on_hurt bool

. Defaults to False.

False
semi_random_diff_damage bool

. Defaults to False.

False
shoot_sound str

. Defaults to ''.

''
shoot_target bool

. Defaults to True.

True
should_bounce bool

. Defaults to False.

False
splash_potion bool

. Defaults to False.

False
splash_range float

. Defaults to 4.0.

4.0
stop_on_hurt bool

. Defaults to False.

False
uncertainty_base float

. Defaults to 0.0.

0.0
uncertainty_multiplier float

Description. 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 Event

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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__(value)

Sets the distance through which the entity can push through.

Parameters:

Name Type Description Default
value float

The distance in blocks that the entity can push through. It can be thought of as a "buffer zone" that the entity creates around itself to navigate through crowded spaces. The default value is 0.0, which means the entity follows the standard collision rules of the game and cannot move through solid entities or blocks. Positive values increase the entity's ability to move through crowds, while negative values are rounded to 0.

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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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

Description. Defaults to True.

True
is_pushable_by_piston bool

Description. Defaults to True.

True
Documentation reference:
https://learn.microsoft.com/en-gb/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

EntityRendersWhenInvisible

Bases: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__(interact_text='Mount', controlling_seat=0, 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)

Determines whether this entity can be ridden. Allows specifying the different seat positions and quantity.

Parameters:

Name Type Description Default
interact_text str

Description. Defaults to 'Mount'.

'Mount'
controlling_seat int

Description. Defaults to 0.

0
crouching_skip_interact bool

Description. Defaults to True.

True
pull_in_entities bool

Description. Defaults to False.

False
rider_can_interact bool

Description. Defaults to False.

False
dismount_mode RideableDismountMode

Description. Defaults to RideableDismountMode.Default.

Default
on_rider_enter_event str

Description. Defaults to None.

None
on_rider_exit_event str

Description. 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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__()

Causes the entity's body to automatically rotate to align with the nearest cardinal direction based on its current 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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__()

Locks the body rotation of this entity to the vehicle it is riding.

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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__(value)

Sets the entity's visual size.

Parameters:

Name Type Description Default
value int

Description.

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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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

Description.

required
end_scale int

Description.

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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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

Description. Defaults to False.

False
all_items_max_amount int

Description. Defaults to -1.

-1
all_items_surplus_amount int

Description. Defaults to -1.

-1
all_items_want_amount int

Description. Defaults to -1.

-1
singular_pickup bool

Description. 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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__(identifier, magic=False, power=0.0, aux_value=-1)

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

Description.

required
magic bool

Description. Defaults to False.

False
power float

Description. Defaults to 0.0.

0.0
aux_value int

Description. Defaults to -1.

-1
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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__(sit_event=None, stand_event=None)

Defines the entity's 'sit' state.

Parameters:

Name Type Description Default
sit_event str

Description. Defaults to None.

None
stand_event str

Description. 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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__(value)

Skin ID value. Can be used to differentiate skins, such as base skins for villagers.

Parameters:

Name Type Description Default
value int

Description.

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

EntitySpawnEntity

Bases: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__()

Defines what mob effects to add and remove to the entity when adding this component.

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

EntityTameable

Bases: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__(probability=1.0)

Defines the rules for an entity to be tamed by the player.

Parameters:

Name Type Description Default
probability float

Description. 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

EntityTargetNearbySensor

Bases: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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

Description. Defaults to 1.

1
outside_range int

Description. Defaults to 5.

5
must_see bool

Description. 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

EntityTickWorld

Bases: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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

Description. Defaults to True.

True
radius int

Description. Defaults to 0.

0
distance_to_players int

Description. 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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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 Event

Description.

required
target FilterSubject

Description. Defaults to FilterSubject.Self.

Self
looping bool

Description. Defaults to True.

True
randomInterval bool

Description. Defaults to True.

True
time tuple[float, float] | float

Description. 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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__()

Allows the entity to resupply its trades.

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

EntityTransformation

Bases: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__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

Description.

required
transform_event str

Description. Defaults to None.

None
drop_equipment bool

Description. Defaults to False.

False
drop_inventory bool

Description. Defaults to False.

False
keep_level bool

Description. Defaults to False.

False
keep_owner bool

Description. Defaults to False.

False
preserve_equipment bool

Description. 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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__()

An entity with this component will NEVER persist, and will 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

EntityTypeFamily

Bases: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__(family)

Defines the families this entity belongs to.

Parameters:

Name Type Description Default
family list[str]

Description.

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

EntityUnderwaterMovement

Bases: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__(value)

A component that defines the entity's movement speed while underwater in block/tick

Parameters:

Name Type Description Default
value int

Description.

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

EntityVariableMaxAutoStep

Bases: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__(base_value=0.5625, controlled_value=0.5625, jump_prevented_value=0.5625)

Allows entities have a maximum auto step height that is different depending on whether they are on a block that prevents jumping.

Parameters:

Name Type Description Default
base_value float

Description. Defaults to 0.5625.

0.5625
controlled_value float

Description. Defaults to 0.5625.

0.5625
jump_prevented_value float

Description. 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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__(value)

Used to differentiate the component group of a variant of an entity from others. (e.g. ocelot, villager).

Parameters:

Name Type Description Default
value int

Description.

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: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__(vertical_velocity=0.5)

When configured as a rideable entity, moves the entity up/down when the player uses the jump action.

Parameters:

Name Type Description Default
vertical_velocity float

Description. Defaults to 0.5.

0.5
Documentation reference:
https://learn.microsoft.com/en-gb/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_vertical_movement_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

EntityWaterMovement

Bases: _BaseComponent

identifier property

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

Returns:

Name Type Description
str Identifier

The identifier of the addon object.

name property

Returns the name of the addon object.

Returns:

Name Type Description
str str

The name of the addon object.

__init__(drag_factor=0.8)

Defines the speed with which an entity can move through water.

Parameters:

Name Type Description Default
drag_factor float

Description. 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