Skip to main content

Entity component reference (5/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:combat_regeneration​

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

Gives Regeneration I and removes Mining Fatigue from the mob that kills the entity's attack target.

Combat Regeneration Properties​

NameDefault ValueTypeDescription
apply_to_familyfalseBoolean true/falseDetermines if the mob will grant mobs of the same type combat buffs if they kill the target.
apply_to_selffalseBoolean true/falseDetermines if the mob will grant itself the combat buffs if it kills the target.
regeneration_duration5Integer numberThe duration in seconds of Regeneration I added to the mob. Can also be set to "infinite"

Samples​

minecraft:conditional_bandwidth_optimization​

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

Defines the Conditional Spatial Update Bandwidth Optimizations of this entity.

Conditional Bandwidth Optimization Properties​

NameDefault ValueTypeDescriptionExample Values
conditional_valuesnot setArray of Conditional Values itemsThe object containing the conditional bandwidth optimization values.
default_valuesnot setDefault Values itemThe object containing the default bandwidth optimization values.Arrow: {"max_dropped_ticks":7,"max_optimized_distance":80,"use_motion_prediction_hints":true}

Conditional Values​

The object containing the conditional bandwidth optimization values.

Conditional Values Properties​

JSON path: conditional_values

NameDefault ValueTypeDescription
conditional_valuesnot setMinecraft filterConditions that must be met for these optimization values to be used.
max_dropped_ticks10Integer numberIn relation to the optimization value, determines the maximum ticks spatial update packets can be not sent. Value must be >= 0.
max_optimized_distance80Decimal numberThe maximum distance considered during bandwidth optimizations.
use_motion_prediction_hintsfalseBoolean true/falseWhen set to true, smaller motion packets will be sent during drop packet intervals, resulting in the same amount of packets being sent as without optimizations but with much less data being sent.
max_optimized_distance​

The maximum distance considered during bandwidth optimizations. Any value below the max is interpolated to find optimization, and any value greater than or equal to this max results in max optimization.

use_motion_prediction_hints​

When set to true, smaller motion packets will be sent during drop packet intervals, resulting in the same amount of packets being sent as without optimizations but with much less data being sent. This should be used when actors are travelling very quickly or teleporting to prevent visual oddities.

Default Values​

Default Values Properties​

JSON path: default_values

NameDefault ValueTypeDescription
max_dropped_ticks10Integer numberDetermines the maximum ticks spatial update packets can be not sent.
max_optimized_distance80Decimal numberThe maximum distance considered during bandwidth optimizations.
use_motion_prediction_hintsfalseBoolean true/falseWhen true, smaller motion packets will be sent during drop packet intervals.

Samples​

Allay​
"minecraft:conditional_bandwidth_optimization": {}
Arrow​
"minecraft:conditional_bandwidth_optimization": {
"default_values": {
"max_dropped_ticks": 7,
"max_optimized_distance": 80,
"use_motion_prediction_hints": true
}
}

minecraft:custom_hit_test​

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

List of hitboxes for melee and ranged hits against the entity.

Custom Hit Test Properties​

NameDefault ValueTypeDescription
hitboxesnot setArray of Hitboxes itemsList of hitboxes for melee and ranged hits against the entity.

Hitboxes​

Hitbox Entry Properties​

JSON path: hitboxes

NameDefault ValueTypeDescription
heightnot setDecimal numberHeight of the hitbox.
pivotnot setx, y, z coordinate arrayPivot point of the hitbox.
widthnot setDecimal numberWidth of the hitbox.

Samples​

minecraft:damage_over_time​

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

Applies defined amount of damage to the entity at specified intervals.

Entity Damage Over Time Properties​

NameDefault ValueTypeDescriptionExample Values
damage_per_hurt1Integer numberAmount of damage caused each hurt.Dolphin: 1
time_between_hurt0Decimal numberTime in seconds between damage.Vex: 1

Samples​

Dolphin​
"minecraft:damage_over_time": {
"damage_per_hurt": 1,
"time_between_hurt": 0
}
Vex​
"minecraft:damage_over_time": {
"damage_per_hurt": 1,
"time_between_hurt": 1
}

minecraft:damage_sensor​

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

Defines what events to call when this entity is damaged by specific entities or items.

Damage Sensor Properties​

NameDefault ValueTypeDescriptionExample Values
deals_damagefalseDeals Damage choicesDefines how received damage affects the entity.
deals_damage (Alternate 1)falseBoolean true/false
triggers (Damage Sensor Trigger)not setTriggers itemList of triggers with the events to call when taking specific kinds of damage.Allay: [{"deals_damage":"no","on_damage":{"filters":{"all_of":[{"subject":"other","test":"is_family","value":"player"},{"subject":"other","test":"is_owner"}]}}}], Bat: {"cause":"fall","deals_damage":"no"}, Breeze: [{"cause":"fall","deals_damage":"no"},{"cause":"projectile","on_damage":{"filters":{"operator":"!=","test":"is_family","subject":"damager","value":"wind_charge"}},"deals_damage":"no"}]
triggers (as Object)not setObject

Deals Damage choices​

ValueTitleDescription
yesYesReceived damage is applied to the entity.
noNoReceived damage is not applied to the entity.
no_but_side_effects_applyNo But Side Effects ApplyReceived damage is not applied to the entity, but the side effects of the attack are. This means that the attacker's weapon loses durability, enchantment side effects are applied, and so on.
no_but_entity_effects_applyNo But Entity Effects ApplyDamage is not applied to the entity, but knockback and enchantments are still applied and the attacker's weapon is used as normal. The entity does not flash red.

Triggers​

Damage Sensor Trigger Properties​

JSON path: triggers

NameDefault ValueTypeDescription
causenoneStringType of damage that triggers the events.
damage_modifier0Decimal numberA modifier that adds/removes to the base damage received from the specified damage cause.
damage_multiplier1Decimal numberA multiplier that modifies the base damage received from the specified damage cause.
deals_damagefalseBoolean true/falseDefines how received damage affects the entity.
deals_damage (as String)not setString
eventnot setStringEvent to emit when the trigger conditions are met.
filtersnot setMinecraft filterFilter conditions for when this trigger applies.
on_damagenot setMinecraft Event TriggerDefines which entities the trigger applies to, and which event to emit when damaged.
on_damage_sound_eventnot setMinecraft Event ReferenceDefines what sound to play when the on_damage filters are met.

Samples​

Allay​
"minecraft:damage_sensor": {
"triggers": [
{
"deals_damage": "no",
"on_damage": {
"filters": {
"all_of": [
{
"subject": "other",
"test": "is_family",
"value": "player"
},
{
"subject": "other",
"test": "is_owner"
}
]
}
}
}
]
}
Bat​
"minecraft:damage_sensor": {
"triggers": {
"cause": "fall",
"deals_damage": "no"
}
}
Breeze​
"minecraft:damage_sensor": {
"triggers": [
{
"cause": "fall",
"deals_damage": "no"
},
{
"cause": "projectile",
"on_damage": {
"filters": {
"operator": "!=",
"test": "is_family",
"subject": "damager",
"value": "wind_charge"
}
},
"deals_damage": "no"
}
]
}

minecraft:dash​

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

Ability for a rideable entity to dash.

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

Dash Properties​

NameDefault ValueTypeDescriptionExample Values
cooldown_time1Decimal numberThe dash cooldown in seconds. Default value is 1.000000.Camel: 2.75
horizontal_momentum1Decimal numberHorizontal momentum of the dash.Camel: 20
vertical_momentum1Decimal numberVertical momentum of the dash.Camel: 0.6

Samples​

Camel​
"minecraft:dash": {
"cooldown_time": 2.75,
"horizontal_momentum": 20,
"vertical_momentum": 0.6
}

minecraft:dash_action​

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

Ability for a rideable entity to dash.

Entity Dash Action Properties​

NameDefault ValueTypeDescription
can_dash_underwaterfalseBoolean true/falseWhether the entity can dash underwater
cooldown_time1Decimal numberThe dash cooldown in seconds
directionentityDirection choicesShould the momentum be applied in the direction of the 'entity' or 'passenger'.
horizontal_momentum1Decimal numberHorizontal momentum of the dash.
vertical_momentum1Decimal numberVertical momentum of the dash.

direction​

Should the momentum be applied in the direction of the 'entity' or 'passenger'. When 'entity' is used the momentum is applied horizontally according to the direction the entity is looking, using only the entity's yaw. When 'passenger' is used the momentum will be applied in the direction the controlling passenger is looking, using the passenger's pitch and yaw.

Direction choices​

ValueTitleDescription
entityEntity
passengerPassenger

Samples​

minecraft:default_look_angle​

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

Sets this entity's default head rotation angle.

Default Look Angle Properties​

NameDefault ValueTypeDescription
value0Decimal numberAngle in degrees.

minecraft:despawn​

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

Despawns the Actor when the despawn rules or optional filters evaluate to true.

Despawn Properties​

NameDefault ValueTypeDescriptionExample Values
despawn_from_chancetrueBoolean true/falseDetermines if "min_range_random_chance" is used in the standard despawn rules
despawn_from_distancenot setDespawn From Distance itemSpecifies if the 'min_distance' and 'max_distance' are used in the standard despawn rules.Bat: {}
despawn_from_inactivitytrueBoolean true/falseDetermines if the "min_range_inactivity_timer" is used in the standard despawn rules.
despawn_from_simulation_edgetrueBoolean true/falseDetermines if the mob is instantly despawned at the edge of simulation distance in the standard despawn rules.
filtersnot setMinecraft filterThe list of conditions that must be satisfied before the Actor is despawned. If a filter is defined then standard despawn rules are ignored.
min_range_inactivity_timer30Integer numberThe amount of time in seconds that the mob must be inactive.
min_range_random_chance800Integer numberA random chance between 1 and the given value.
remove_child_entitiesfalseBoolean true/falseIf true, all entities linked to this entity in a child relationship (eg. leashed) will also be despawned.

Despawn From Distance​

Despawn From Distance Properties​

JSON path: despawn_from_distance

NameDefault ValueTypeDescription
max_distance128Integer numberMaximum distance for standard despawn rules to instantly despawn the mob.
min_distance32Integer numberMinimum distance for standard despawn rules to try to despawn the mob.

Samples​

Bat​
"minecraft:despawn": {
"despawn_from_distance": {}
}

minecraft:dimension_bound​

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

Prevents the entity from changing dimension through portals.

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

Samples​

Arrow​
"minecraft:dimension_bound": {}

minecraft:drying_out_timer​

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

Adds a timer for drying out that will count down and fire 'dried_out_event' or will stop as soon as the entity will get under rain or water and fire 'stopped_drying_out_event'.

Drying Out Timer Properties​

NameDefault ValueTypeDescriptionExample Values
dried_out_eventnot setObjectEvent to fire when the drying out time runs out. Can be an object with event and target properties, or a simple event string.Dolphin: {"event":"dried_out"}
dried_out_event (as String)not setString
recover_after_dried_out_eventnot setObjectEvent to fire when entity was already dried out but received increase in water supply. Can be an object with event and target properties, or a simple event string.Dolphin: {"event":"recover_after_dried_out"}
recover_after_dried_out_event (as String)not setString
stopped_drying_out_eventnot setObjectEvent to fire when entity stopped drying out. Can be an object with event and target properties, or a simple event string.Dolphin: {"event":"stop_dryingout"}
stopped_drying_out_event (as String)not setString
total_time0Decimal numberAmount of time in seconds to dry out fully.Dolphin: 120
water_bottle_refill_time0Decimal numberOptional amount of additional time in seconds given by using splash water bottle on entity.

Samples​

Dolphin​
"minecraft:drying_out_timer": {
"total_time": 120,
"water_bottle_refill_time": 0,
"dried_out_event": {
"event": "dried_out"
},
"stopped_drying_out_event": {
"event": "stop_dryingout"
},
"recover_after_dried_out_event": {
"event": "recover_after_dried_out"
}
}

minecraft:dweller​

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

Compels an entity to join and migrate between villages and other dwellings.

Dweller Properties​

NameDefault ValueTypeDescriptionExample Values
can_find_poinot setBoolean true/falseWhether or not the entity can find and add POIs to the dwelling.
can_migratenot setBoolean true/falseDetermines whether the entity can migrate between dwellings, or only have its initial dwelling.Iron Golem: true
dweller_rolenot setStringIron Golem: "defender"
dwelling_bounds_tolerancenot setDecimal numberA padding distance for checking if the entity is within the dwelling.
dwelling_rolenot setStringThe role of which the entity plays in the dwelling. Current Roles: inhabitant, defender, hostile, passive.
dwelling_typenot setStringThe type of dwelling the entity wishes to join. Current Types: village.Iron Golem: "village"
first_founding_rewardnot setInteger numberDetermines how much reputation players are rewarded on first founding.
preferred_professionnot setStringAllows the user to define a starting profession for this particular Dweller, instead of letting them choose organically. (They still need to gain experience from trading before this takes effect.)
update_interval_basenot setDecimal numberHow often the entity checks on their dwelling status in ticks. Positive values only.Iron Golem: 60
update_interval_variantnot setDecimal numberThe variant value in ticks that will be added to the update_interval_base.Iron Golem: 40

Samples​

Iron Golem​
"minecraft:dweller": {
"dwelling_type": "village",
"can_find_poi": false,
"can_migrate": true,
"dweller_role": "defender",
"first_founding_reward": 0,
"update_interval_base": 60,
"update_interval_variant": 40
}

minecraft:economy_trade_table​

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

Defines this entity's ability to trade with players.

Entity Economy Trade Table Properties​

NameDefault ValueTypeDescription
convert_trades_economyfalseBoolean true/falseWhether legacy trade data is converted into economy trade data.
cured_discount{"max":-20,"min":-25}Cured Discount itemRange of cured villager discounts applied to trade prices.
display_nameStringThe entity localization key used for the trading UI display name.
hero_demand_discount-4Integer numberAdditional demand discount applied while the player has Hero of the Village.
max_cured_discount{"max":-20,"min":-25}Max Cured Discount itemMaximum allowed range for cured villager discounts.
max_nearby_cured_discount-200Integer numberMost negative nearby cured villager discount allowed by legacy pricing.
nearby_cured_discount-20Integer numberNearby cured villager discount step applied by legacy pricing.
new_screenfalseBoolean true/falseWhether this trader uses the newer trade screen implementation.
persist_tradesfalseBoolean true/falseWhether generated offers are persisted with the actor save data.
show_trade_screentrueBoolean true/falseWhether interacting with this trader opens the trade screen.
tableStringPath to the trade table JSON that defines available offers.
use_legacy_price_formulafalseBoolean true/falseWhether legacy price calculations are used instead of the newer pricing formula.

Block IntRange​

Block IntRange Properties​

JSON path: cured_discount

NameDefault ValueTypeDescription
max0Integer number
min0Integer number

Samples​

minecraft:entity_armor_equipment_slot_mapping​

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

It defines to which armor slot an item equipped to 'minecraft:equippable''s second slot should be equipped to. It is automatically applied to all entities for worlds with a version greater than or equal to 1.21.10. For older worlds, 'slot.armor.torso' will be used. It is strongly advised not to explicitly use this component, as no backwards compatibility for it will be provided.

Entity Armor Equipment Slot Mapping Properties​

NameDefault ValueTypeDescription
armor_slotnot setStringThe armor slot an item equipped to 'minecraft:equippable''s second slot should be equipped to.

armor_slot​

The armor slot an item equipped to 'minecraft:equippable''s second slot should be equipped to. It defaults to 'slot.armor.torso' for entities with a format version prior to 1.21.10, and to 'slot.armor.body' otherwise.

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