Skip to main content

Entity component reference (3/23)

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

minecraft:area_attack​

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

A component that does damage to entities that get within range.

Area Attack Properties​

NameDefault ValueTypeDescriptionExample Values
causenot setString from a list of choicesThe type of damage that is applied to entities that enter the damage range.Magma Cube: "entity_attack"
damage_cooldown0Decimal numberAttack cooldown (in seconds) for how often this entity can attack a target.Magma Cube: 0.5
damage_per_tick2Integer numberHow much damage per tick is applied to entities that enter the damage range.Magma Cube: 6, 4, 3
damage_range0.2Decimal numberHow close a hostile entity must be to have the damage applied.Magma Cube: 0.15
death_message_overridenot setStringA localization key to use as the death message when the area attack kills an entity. If empty, the default death message for the damage cause is used.
entity_filternot setMinecraft filterThe set of entities that are valid to apply the damage to when within range.Magma Cube: {"any_of":[{"subject":"other","test":"is_family","value":"player"},{"subject":"other","test":"is_family","value":"irongolem"}]}, Slime: {"any_of":[{"subject":"other","test":"is_family","value":"player"},{"subject":"other","test":"is_family","value":"irongolem"},{"subject":"other","test":"is_family","value":"snowgolem"}]}
play_attack_soundtrueBoolean true/falseIf the entity should play their attack sound when attacking a target.
use_self_as_damage_sourcetrueBoolean true/falseWhether the entity is treated as the source of the area damage.

cause​

The type of damage that is applied to entities that enter the damage range. A list of available damage sources can be found at Entity Damage Sources located in the Vanilla Listings Documentation.

use_self_as_damage_source​

Whether the entity is treated as the source of the area damage. When true (default), other entities can retaliate against the attacking entity. Set to false to apply damage without making the attacker a valid retaliation target. This item requires a format version of at least 1.26.30.

Samples​

Magma Cube​

At /minecraft:entity/component_groups/minecraft:slime_large/minecraft:area_attack/:

"minecraft:area_attack": {
"cause": "entity_attack",
"damage_cooldown": 0.5,
"damage_per_tick": 6,
"damage_range": 0.15,
"entity_filter": {
"any_of": [
{
"subject": "other",
"test": "is_family",
"value": "player"
},
{
"subject": "other",
"test": "is_family",
"value": "irongolem"
}
]
}
}

At /minecraft:entity/component_groups/minecraft:slime_medium/minecraft:area_attack/:

"minecraft:area_attack": {
"cause": "entity_attack",
"damage_cooldown": 0.5,
"damage_per_tick": 4,
"damage_range": 0.15,
"entity_filter": {
"any_of": [
{
"subject": "other",
"test": "is_family",
"value": "player"
},
{
"subject": "other",
"test": "is_family",
"value": "irongolem"
}
]
}
}

At /minecraft:entity/component_groups/minecraft:slime_small/minecraft:area_attack/:

"minecraft:area_attack": {
"cause": "entity_attack",
"damage_cooldown": 0.5,
"damage_per_tick": 3,
"damage_range": 0.15,
"entity_filter": {
"any_of": [
{
"subject": "other",
"test": "is_family",
"value": "player"
},
{
"subject": "other",
"test": "is_family",
"value": "irongolem"
}
]
}
}
Slime​

At /minecraft:entity/component_groups/minecraft:slime_large/minecraft:area_attack/:

"minecraft:area_attack": {
"cause": "entity_attack",
"damage_cooldown": 0.5,
"damage_per_tick": 4,
"damage_range": 0.15,
"entity_filter": {
"any_of": [
{
"subject": "other",
"test": "is_family",
"value": "player"
},
{
"subject": "other",
"test": "is_family",
"value": "irongolem"
},
{
"subject": "other",
"test": "is_family",
"value": "snowgolem"
}
]
}
}

At /minecraft:entity/component_groups/minecraft:slime_medium/minecraft:area_attack/:

"minecraft:area_attack": {
"cause": "entity_attack",
"damage_cooldown": 0.5,
"damage_per_tick": 2,
"damage_range": 0.15,
"entity_filter": {
"any_of": [
{
"subject": "other",
"test": "is_family",
"value": "player"
},
{
"subject": "other",
"test": "is_family",
"value": "irongolem"
},
{
"subject": "other",
"test": "is_family",
"value": "snowgolem"
}
]
}
}

minecraft:attack​

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

Defines an entity's melee attack damage and any additional status effects applied on hit. Typical damage values range from 3 (zombie, creeper) to 7-21 (iron golem).

Entity Attack Properties​

NameDefault ValueTypeDescription
damage{"max":0,"min":0}Range of floatsRange of the random amount of damage the melee attack deals.
damage (Damage)not setDamage (Damage) item
effect_amplifier0Integer numberAmplifier level (potion tier) of the status ailment applied to the damaged entity.
effect_duration0Decimal numberDuration in seconds of the status ailment applied to the damaged entity.
effect_nameStringIdentifier of the status ailment to apply to an entity attacked by this entity's melee attack.

damage​

Range of the random amount of damage the melee attack deals. A negative value can heal the entity instead of hurting it. Can be a number, an array [min, max], or an object with range_min and range_max properties.

effect_amplifier​

Amplifier level (potion tier) of the status ailment applied to the damaged entity. Higher values increase the strength of the effect. Fixed in format version 1.26.30: effect_amplifier is now actually applied to the inflicted status effect, so amplifier-sensitive effects such as Hunger now scale correctly when triggered by a mob's melee attack. Prior versions silently ignored this value.

Damage (Damage)​

Damage Properties​

JSON path: damage

NameDefault ValueTypeDescription
max0Decimal number
min0Decimal number

Samples​

minecraft:attack_cooldown​

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

Adds a cooldown to an entity. The intention of this cooldown is to be used to prevent the entity from attempting to acquire new attack targets.

Attack Cooldown Properties​

NameDefault ValueTypeDescription
attack_cooldown_complete_eventnot setObjectEvent to be run when the cooldown is complete. Can be an object with event and target properties, or a simple event string.
attack_cooldown_complete_event (as String)not setString
attack_cooldown_timenot setRange of floatsAmount of time in seconds for the cooldown. Can be specified as a number or a pair of numbers (min and max).
attack_cooldown_time (as Decimal number)not setDecimal number

Samples​

minecraft:attack_damage​

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

Specifies how much damage is dealt by the entity when it attacks.

Attack Damage Properties​

NameDefault ValueTypeDescription
valuenot setRange of integersHow much an attack should damage a target.

minecraft:balloonable​

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

Allows this entity to have a balloon attached and defines the conditions and events for this entity when is ballooned.

Balloonable Properties​

NameDefault ValueTypeDescription
mass1Decimal numberMass that this entity will have when computing balloon pull forces.
max_distance10Decimal numberDistance in blocks at which the balloon breaks.
on_balloonnot setMinecraft Event TriggerEvent to call when this entity is ballooned.
on_unballoonnot setMinecraft Event TriggerEvent to call when this entity is unballooned.
soft_distance2Decimal numberDistance in blocks at which the 'spring' effect that lifts it.

minecraft:barter​

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

Enables the component to drop an item as a barter exchange.

Entity Barter Properties​

NameDefault ValueTypeDescription
barter_tableString from a list of choicesLoot table that's used to drop a random item.
cooldown_after_being_attacked10Range of integersDuration, in seconds, for which mob won't barter items if it was hurt.

Samples​

minecraft:block_climber​

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

Allows the player to detect and manuever on the scaffolding block.

Samples​

Endermite​
"minecraft:block_climber": {}

minecraft:block_movement_slowdown_immunity​

(Source: ms-learn, creator/Reference/Content/EntityReference/Examples/EntityComponents/minecraftComponent_block_movement.slowdown_immunity.md)

Prevents specified blocks from contributing to this entity's block movement slowdown. It does not cause other blocks to apply slowdown.

Entity Block Movement Slowdown Immunity Properties​

NameDefault ValueTypeDescriptionExample Values
blocks (Blocks)[]Array of Blocks itemsList of block descriptors whose existing movement slowdown contribution should be ignored. If omitted or empty, no contributions are ignored.Cave Spider: ["minecraft:web"]
blocks (as String)not setString
blocks (as Object)not setObject

Blocks​

Blocks Properties​

JSON path: blocks

NameDefault ValueTypeDescription
nameString
states{}Integer number
states (as String)not setString
states (as Boolean true/false)not setBoolean true/false
tagsString

Samples​

Cave Spider​
"minecraft:block_movement_slowdown_immunity": {
"blocks": [
"minecraft:web"
]
}

minecraft:block_sensor​

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

Fires off a specified event when a block in the block list is broken within the sensor range.

Block Sensor Properties​

NameDefault ValueTypeDescription
on_breaknot setArray of Break itemsList of blocks to watch for being broken to fire off a specified event. If a block is in multiple lists, multiple events will fire.
sensor_radius16Decimal numberThe maximum radial distance in which a specified block can be detected. The biggest radius is 32.0.
sourcesnot setMinecraft filterList of sources that break the block to listen for. If none are specified, all block breaks will be detected.

Break​

Block Break Entry Properties​

JSON path: on_break

NameDefault ValueTypeDescription
block_listnot setArray of stringsList of blocks that trigger the on_block_broken event.
on_block_brokennot setStringEvent to call when a block in block_list is broken.

Samples​

minecraft:body_rotation_always_follows_head​

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

Causes the entity's body rotation to match the one of their head. Does not override the "minecraft:body_rotation_blocked" component.

[!Note] This item requires a format version of at least 1.21.90.

Samples​

minecraft:body_rotation_axis_aligned​

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

Causes the entity's body to automatically rotate to align with the nearest cardinal direction based on its current facing direction. Combining this with the "minecraft:body_rotation_blocked" component will cause the entity to align to the nearest cardinal direction and remain fixed in that orientation, regardless of future changes in its facing direction.

Samples​

Happy Ghast​
"minecraft:body_rotation_axis_aligned": {}

minecraft:body_rotation_blocked​

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

When set, the entity will no longer visually rotate their body to match their facing direction.

[!Note] This item requires a format version of at least 1.20.80.

Samples​

minecraft:body_rotation_locked_to_vehicle​

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

Causes the entity's body rotation to match their vehicle's facing direction.

[!Note] In 1.21.130 this component was renamed to minecraft:rotation_locked_to_vehicle, which now locks both body and overall entity rotation to the vehicle. Existing usages should migrate to the new identifier.

Samples​

Drowned​
"minecraft:body_rotation_locked_to_vehicle": {}

minecraft:boostable​

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

Defines the conditions and behavior of a rideable entity's boost.

Boostable Properties​

NameDefault ValueTypeDescriptionExample Values
boost_itemsnot setArray of Boost Items itemsList of items that can be used to boost while riding this entity.Pig: [{"item":"carrotOnAStick","damage":2,"replace_item":"fishing_rod"}], Strider: [{"item":"warped_fungus_on_a_stick","damage":1,"replace_item":"fishing_rod"}]
duration3Decimal numberTime in seconds for the boost.Pig: 3, Strider: 16
speed_multiplier1Decimal numberFactor by which the entity's normal speed increases. E.g. 2.0 means go twice as fast.Pig: 1.35

Boost Items​

Boost Items Properties​

JSON path: boost_items

NameDefault ValueTypeDescription
damagenot setInteger numberThis is the damage that the item will take each time it is used.
itemnot setStringName of the item that can be used to boost.
replace_itemnot setStringThe item used to boost will become this item once it is used up.

Samples​

Pig​
"minecraft:boostable": {
"speed_multiplier": 1.35,
"duration": 3,
"boost_items": [
{
"item": "carrotOnAStick",
"damage": 2,
"replace_item": "fishing_rod"
}
]
}
Strider​
"minecraft:boostable": {
"speed_multiplier": 1.35,
"duration": 16,
"boost_items": [
{
"item": "warped_fungus_on_a_stick",
"damage": 1,
"replace_item": "fishing_rod"
}
]
}

minecraft:boss​

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

Defines the current state of the boss for updating the boss HUD.

Entity Boss Properties​

NameDefault ValueTypeDescription
hud_range55Integer numberThe max distance from the boss at which the boss's health bar is present on the players screen.
name55StringThe name that will be displayed above the boss's health bar.
should_darken_skyfalseBoolean true/falseWhether the sky should darken in the presence of the boss.

Samples​

minecraft:break_blocks​

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

Specifies the blocks that the entity can break as it moves around.

Break Blocks Properties​

NameDefault ValueTypeDescription
breakable_blocksnot setArray of stringsA list of the blocks that can be broken as this entity moves around.

Samples​

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