Skip to main content

Entity component reference (9/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:ignore_cannot_be_attacked​

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

Allows the owner entity to ignore the "minecraft:cannot_be_attacked" component on entities that fulfill the filter.

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

Entity Ignore Cannot Be Attacked Properties​

NameDefault ValueTypeDescription
filters (Filters){"AND":null,"NOT":null,"OR":null,"all":null,"all_of":null,"any":null,"any_of":null,"none_of":null}Filters itemDefines which entities are exceptions and are allowed to be attacked by the owner entity, potentially attacked entity is subject "other".
filters (Alternate 1)not setObject

filters​

Defines which entities are exceptions and are allowed to be attacked by the owner entity, potentially attacked entity is subject "other". If this is not specified then all attacks by the owner are allowed.

Filters​

Filters Properties​

JSON path: filters

NameDefault ValueTypeDescription
domainnot setObjectThe domain the test should be performed in.
operatornot setObjectThe comparison to apply with 'value'.
subjectnot setObjectThe subject of this filter test.
testnot setStringThe name of the test to apply.
valuenot setObjectThe value being compared with the test.

minecraft:input_air_controlled​

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

When configured as a rideable entity, the entity will be controlled using WASD controls and mouse to move in three dimensions.

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

Input Air Controlled Properties​

NameDefault ValueTypeDescriptionExample Values
backwards_movement_modifier0.5Decimal numberModifies speed going backwards.Happy Ghast: 0.5
strafe_speed_modifier0.4Decimal numberModifies the strafe speed.Happy Ghast: 1

Samples​

Happy Ghast​
"minecraft:input_air_controlled": {
"strafe_speed_modifier": 1,
"backwards_movement_modifier": 0.5
}

minecraft:input_ground_controlled​

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

When configured as a rideable entity, the entity will be controlled using WASD controls. Beginning with 1.19.50 the default auto step height for rideable entities is half a block. Consider adding the "minecraft:variable_max_auto_step" component to increase it.

Samples​

minecraft:inside_block_notifier​

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

Verifies whether the entity is inside any of the listed blocks.

Inside Block Notifier Properties​

NameDefault ValueTypeDescriptionExample Values
block_listnot setArray of Block List itemsList of blocks, with certain block states, that we are monitoring to see if the entity is inside.Boat: [{"block":{"name":"minecraft:bubble_column","states":{"drag_down":true}},"entered_block_event":{"event":"minecraft:entered_bubble_column_down","target":"self"},"exited_block_event":{"event":"minecraft:exited_bubble_column","target":"self"}},{"block":{"name":"minecraft:bubble_column","states":{"drag_down":false}},"entered_block_event":{"event":"minecraft:entered_bubble_column_up","target":"self"},"exited_block_event":{"event":"minecraft:exited_bubble_column","target":"self"}}]

Block List​

Block Entry Properties​

JSON path: block_list

NameDefault ValueTypeDescription
blocknot setBlock itemThe block to monitor, including name and optional states.
entered_block_eventnot setMinecraft Event TriggerEvent to fire when the entity enters the block.
exited_block_eventnot setMinecraft Event TriggerEvent to fire when the entity exits the block.
Block​
Block Descriptor Properties​

JSON path: block_list > block

NameDefault ValueTypeDescription
namenot setStringThe block identifier.
statesnot setKeyed collection of boolean valuesBlock states to match.

Samples​

Boat​
"minecraft:inside_block_notifier": {
"block_list": [
{
"block": {
"name": "minecraft:bubble_column",
"states": {
"drag_down": true
}
},
"entered_block_event": {
"event": "minecraft:entered_bubble_column_down",
"target": "self"
},
"exited_block_event": {
"event": "minecraft:exited_bubble_column",
"target": "self"
}
},
{
"block": {
"name": "minecraft:bubble_column",
"states": {
"drag_down": false
}
},
"entered_block_event": {
"event": "minecraft:entered_bubble_column_up",
"target": "self"
},
"exited_block_event": {
"event": "minecraft:exited_bubble_column",
"target": "self"
}
}
]
}

minecraft:insomnia​

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

Adds a timer since last rested to see if phantoms should spawn.

Entity Insomnia Properties​

NameDefault ValueTypeDescriptionExample Values
days_until_insomnia3Decimal numberNumber of days the mob has to stay up until the insomnia effect begins.Player: 3

Samples​

Player​
"minecraft:insomnia": {
"days_until_insomnia": 3
}

minecraft:instant_despawn​

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

Despawns the Actor immediately.

Entity Instant Despawn Properties​

NameDefault ValueTypeDescription
remove_child_entitiesfalseBoolean true/falseIf true, all entities linked to this entity in a child relationship (eg. leashed) will also be despawned.

Samples​

minecraft:interact​

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

Defines interactions with this entity.

[!Note] In 1.26.0, the swing field on each interaction entry defaults to true (it previously defaulted to false). Set it explicitly to false to opt out of the player's swing animation.

Entity Interact Properties​

NameDefault ValueTypeDescription
cooldown0Decimal numberTime in seconds before this entity can be interacted with again.
cooldown_after_being_attacked0Decimal numberTime in seconds before this entity can be interacted with after being attacked.
drop_item_slotnot setStringThe entity's slot to remove and drop the item from, if any, upon successful interaction.
drop_item_y_offset0Decimal numberWill offset the item drop position this amount in the y direction. Requires "drop_item_slot" to be specified.
equip_item_slotnot setStringThe entity's slot to equip the item to, if any, upon successful interaction.
health_amount0Integer numberThe amount of health this entity will recover or lose when interacting with this item. Negative values will harm the entity.
hurt_item0Integer numberThe 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.
interact_textnot setStringText to show when the player is able to interact in this way with this entity when playing with touch-screen controls.
interactions (Entity InteractionData)[]Array of Interactions itemsThe list of interactions for this entity.
interactions (as Object)not setObject

drop_item_slot​

The entity's slot to remove and drop the item from, if any, upon successful interaction. Inventory slots are denoted by positive numbers. Equipment slots are denoted by 'slot.weapon.mainhand', 'slot.weapon.offhand', 'slot.armor.head', 'slot.armor.chest', 'slot.armor.legs', 'slot.armor.feet' and 'slot.armor.body'.

equip_item_slot​

The entity's slot to equip the item to, if any, upon successful interaction. Inventory slots are denoted by positive numbers. Equipment slots are denoted by 'slot.weapon.mainhand', 'slot.weapon.offhand', 'slot.armor.head', 'slot.armor.chest', 'slot.armor.legs', 'slot.armor.feet' and 'slot.armor.body'.

Entity InteractionData​

Entity InteractionData Properties​

JSON path: interactions

NameDefault ValueTypeDescription
add_items{"table":""}Add Items itemLoot table with items to add to the player's inventory upon successful interaction.
admirefalseBoolean true/falseIf true, the mob that's interacted with will try to do an admire action after interaction. For this to be successful the mob has to have an Admire component and an Admire goal in place.
barterfalseBoolean true/falseIf true, the mob that's interacted with will try to do a barter action after interaction. For this to be successful the mob has to have a Barter component and a Barter goal in place.
cooldown0Decimal numberTime in seconds before this entity can be interacted with again.
cooldown_after_being_attacked0Decimal numberTime in seconds before this entity can be interacted with after being attacked.
drop_item_slotnot setStringThe entity's slot to remove and drop the item from, if any, upon successful interaction.
drop_item_y_offset0Decimal numberWill offset the item drop position this amount in the y direction. Requires "drop_item_slot" to be specified.
equip_item_slotnot setStringThe entity's slot to equip the item to, if any, upon successful interaction.
give_itemfalseBoolean true/falseIf true, the mob that's interacted with will try to replace its current main-hand item with the interactable item after interaction.
health_amount0Integer numberThe amount of health this entity will recover or lose when interacting with this item. Negative values will harm the entity.
hurt_item0Integer numberThe 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.
interact_textStringText to show when the player is able to interact in this way with this entity when playing with touch-screen controls.
on_interact{"event":"","filters":{"AND":null,"NOT":null,"OR":null,"all":null,"all_of":null,"any":null,"any_of":null,"none_of":null},"target":"self"}Interact itemEvent to fire when the interaction occurs.
particle_on_start{"copper_event":"none","particle_offset_towards_interactor":false,"particle_type":"none","particle_y_offset":0}Particle On Start itemParticle effect that will be triggered at the start of the interaction.
play_sounds[]Array of stringsList of sounds to play when the interaction occurs.
repair_entity_item{"amount":1,"slot":null}Repair Entity Item itemAllows to repair one of the entity's items.
spawn_entities[]Array of stringsList of entities to spawn when the interaction occurs.
spawn_items{"table":"","y_offset":1}Spawn Items itemLoot table with items to drop on the ground upon successful interaction.
swingtrueBoolean true/falseIf true, the player will do the 'swing' animation when interacting with this entity.
take_itemfalseBoolean true/falseIf true, the mob that's interacted with will try to replace its current main-hand item with an empty item, and its current main-hand item will occupy the empty selected slot of the player.
transform_to_itemStringThe item used will transform to this item upon successful interaction. Format: itemName:auxValue
use_itemfalseBoolean true/falseIf true, the interaction will use an item.
vibrationentity_interactVibration choicesVibration to emit when the interaction occurs.
drop_item_slot​

The entity's slot to remove and drop the item from, if any, upon successful interaction. Inventory slots are denoted by positive numbers. Equipment slots are denoted by 'slot.weapon.mainhand', 'slot.weapon.offhand', 'slot.armor.head', 'slot.armor.chest', 'slot.armor.legs', 'slot.armor.feet' and 'slot.armor.body'.

equip_item_slot​

The entity's slot to equip the item to, if any, upon successful interaction. Inventory slots are denoted by positive numbers. Equipment slots are denoted by 'slot.weapon.mainhand', 'slot.weapon.offhand', 'slot.armor.head', 'slot.armor.chest', 'slot.armor.legs', 'slot.armor.feet' and 'slot.armor.body'.

Entity AddItemsData​
Entity AddItemsData Properties​

JSON path: interactions > add_items

NameDefault ValueTypeDescription
tablenot setStringFile path, relative to the Behavior Pack's path, to the loot table file.
Entity ActorDefinitionTrigger​

Triggers an entity event when specified conditions are met. Events activate component groups that change entity behavior—transforming villagers into zombie villagers, switching mobs to aggressive mode, or triggering growth stages. Combine with filters to create conditional state machines that respond to gameplay.

Entity ActorDefinitionTrigger Properties​

JSON path: interactions > on_interact

NameDefault ValueTypeDescription
eventString
filters (Filters){"AND":null,"NOT":null,"OR":null,"all":null,"all_of":null,"any":null,"any_of":null,"none_of":null}Filters itemFilters allow data objects to specify test criteria which allows their use.
filters (Alternate 1)not setObject
targetselfTarget choices
filters​

Filters allow data objects to specify test criteria which allows their use. Filters can be defined by a single object of type (Filter Test), an array of tests, collection groups, or a combination of these objects.

Filters​
Filters Properties​

JSON path: interactions > on_interact > filters

NameDefault ValueTypeDescription
domainnot setObjectThe domain the test should be performed in.
operatornot setObjectThe comparison to apply with 'value'.
subjectnot setObjectThe subject of this filter test.
testnot setStringThe name of the test to apply.
valuenot setObjectThe value being compared with the test.

Target choices​

ValueTitleDescription
babyBaby
blockBlock
damagerDamager
holderHolder
itemItem
otherOther
parentParent
playerPlayer
selfSelf
targetTarget
Entity InteractParticleData​
Entity InteractParticleData Properties​

JSON path: interactions > particle_on_start

NameDefault ValueTypeDescription
copper_eventnoneCopper Event choices
particle_offset_towards_interactorfalseBoolean true/falseWhether or not the particle will appear closer to who performed the interaction.
particle_typenoneParticle Type choicesThe type of particle that will be spawned.
particle_y_offset0Decimal numberWill offset the particle this amount in the y direction.

Copper Event choices​

ValueTitleDescription
noneNone
scrapeScrape
wax_offWax off
wax_onWax on

Particle Type choices​

ValueTitleDescription
balloongasBalloongas
bleachBleach
blockforcefieldBlockforcefield
blueflameBlueflame
breezewindexplosionBreezewindexplosion
bubbleBubble
bubblecolumndownBubblecolumndown
bubblecolumnupBubblecolumnup
bubblemanualBubblemanual
campfiresmokeCampfiresmoke
campfiresmoketallCampfiresmoketall
candleflameCandleflame
carrotboostCarrotboost
coloredflameColoredflame
conduitConduit
creakingcrumbleCreakingcrumble
critCrit
dragonbreathDragonbreath
dragonbreathfireDragonbreathfire
dragonbreathtrailDragonbreathtrail
dragondestroyblockDragondestroyblock
driphoneyDriphoney
driplavaDriplava
dripwaterDripwater
dustplumeDustplume
electricsparkElectricspark
enchantingtableEnchantingtable
endrodEndrod
evaporationEvaporation
explodeExplode
eyeblossomcloseEyeblossomclose
eyeblossomopenEyeblossomopen
fallingborderdustFallingborderdust
fallingdustFallingdust
fireworksFireworks
fireworksoverlayFireworksoverlay
fireworksstarterFireworksstarter
flameFlame
foodFood
greenflameGreenflame
heartHeart
hugeexplosionHugeexplosion
iceballbreakIceballbreak
iconcrackIconcrack
inkInk
largeexplodeLargeexplode
largesmokeLargesmoke
lavaLava
mobappearanceMobappearance
mobflameMobflame
mobspellMobspell
mobspellambientMobspellambient
mobspellinstantaneousMobspellinstantaneous
myceliumdustMyceliumdust
noneNone
noteNote
obsidiantearObsidiantear
orangepoplarleavesOrangepoplarleaves
paleoakleavesPaleoakleaves
pausemobgrowthPausemobgrowth
portalPortal
portalreversePortalreverse
rainsplashRainsplash
reddustReddust
redpoplarleavesRedpoplarleaves
resetmobgrowthResetmobgrowth
risingborderdustRisingborderdust
sculksoulSculksoul
shriekShriek
shulkerbulletShulkerbullet
slimeSlime
smokeSmoke
sneezeSneeze
snowballpoofSnowballpoof
snowflakeSnowflake
sonicexplosionSonicexplosion
soulSoul
sparklerSparkler
spitSpit
stalactitedriplavaStalactitedriplava
stalactitedripwaterStalactitedripwater
sulfurcubeSulfurcube
terrainTerrain
totemTotem
townauraTownaura
trackingemitterTrackingemitter
vaultconnectionVaultconnection
villagerangryVillagerangry
villagerhappyVillagerhappy
watersplashWatersplash
watersplashmanualWatersplashmanual
waterwakeWaterwake
waxWax
whitesmokeWhitesmoke
windexplosionWindexplosion
witchspellWitchspell
wolfarmorcrackWolfarmorcrack
yellowpoplarleavesYellowpoplarleaves
Entity RepairEntityItemData​
Entity RepairEntityItemData Properties​

JSON path: interactions > repair_entity_item

NameDefault ValueTypeDescription
amount1Integer numberHow much of the item durability should be restored upon interaction. Value must be > 0.
slotnot setStringThe entity's slot containing the item to be repaired.
slot​

The entity's slot containing the item to be repaired. Inventory slots are denoted by positive numbers. Equipment slots are denoted by 'slot.weapon.mainhand', 'slot.weapon.offhand', 'slot.armor.head', 'slot.armor.chest', 'slot.armor.legs', 'slot.armor.feet' and 'slot.armor.body'.

Entity SpawnItemsData​
Entity SpawnItemsData Properties​

JSON path: interactions > spawn_items

NameDefault ValueTypeDescription
tableStringFile path, relative to the Behavior Pack's path, to the loot table file.
y_offset1Decimal numberWill offset the items spawn position this amount in the y direction.

Vibration choices​

ValueTitleDescription
entity_actEntity act
entity_dieEntity die
entity_interactEntity interact
noneNone
shearShear

Samples​

minecraft:inventory​

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

Defines this entity's inventory properties.

Entity Inventory Properties​

NameDefault ValueTypeDescription
additional_slots_per_strength0Integer numberNumber of slots that this entity can gain per extra strength.
can_be_siphoned_fromfalseBoolean true/falseIf true, the contents of this inventory can be removed by a hopper.
container_typenoneStringType of container this entity has. Can be horse, minecart_chest, chest_boat, minecart_hopper, inventory, container or hopper.
inventory_size5Integer numberNumber of slots the container has.
privatefalseBoolean true/falseIf true, the entity will not drop its inventory on death.
restrict_to_ownerfalseBoolean true/falseIf true, the entity's inventory can only be accessed by its owner or itself.

Samples​

minecraft:is_baby​

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

Sets that this entity is a baby. This is used to set the is_baby value for use in query functions like Molang and Filters.

Samples​

Chicken​
"minecraft:is_baby": {}

minecraft:is_charged​

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

Sets that this entity is charged. This is used to set the is_charged value for use in query functions like Molang and Filters.

Samples​

minecraft:is_chested​

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

Sets that this entity is currently carrying a chest.

Samples​

Llama​
"minecraft:is_chested": {}

minecraft:is_collidable​

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

Allows other mobs to have vertical and horizontal collisions with this mob. For a collision to occur, both mobs must have a "minecraft:collision_box" component. This component can only be used on mobs and enables collisions exclusively between mobs. Please note that this type of collision is unreliable for moving collidable mobs. It is recommended to use this component only in scenarios where the collidable mob remains stationary. Collidable behavior is closely related to stackable behavior. While the "minecraft:is_collidable" component governs how other mobs interact with the component's owner, the "minecraft:is_stackable" component describes how an entity interacts with others of its own kind.

Samples​

Boat​
"minecraft:is_collidable": {}
Sources
idSourceLicenseCommitAccessed
ms-learnMinecraft Creator documentation (Microsoft Learn)CC BY 4.0 (documentation), MIT (code)a9fd1c02026-11-13