Skip to main content

Entity component reference (18/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:shooter​

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

Defines the entity's ranged attack behavior. The "minecraft:behavior.ranged_attack" goal uses this component to determine which projectiles to shoot.

[!Note] Ammunition used by minecraft:shooter must have the minecraft:projectile component in order to function properly.

[!Note] Expanded in 1.19.60: the projectiles list can now specify multiple projectile definitions with condition filters, and power, magic, and sound are exposed for per-shooter customization.

Shooter Properties​

NameDefault ValueTypeDescriptionExample Values
aux_val-1Integer numberID of the Potion effect for the default projectile to be applied on hit.Bogged: 26
defnot setStringActor definition to use as the default projectile for the ranged attack. The actor definition must have the projectile component to be able to be shot as a projectile.Blaze: "minecraft:small_fireball", Bogged: "minecraft:arrow", Drowned: "minecraft:thrown_trident"
magicfalseBoolean true/falseIf set, the projectiles are flagged as magic and the ranged attack goal will not run at the same time as other magic goals (for example, drink_potion).
power0Decimal numberVelocity at which projectiles will be shot. A power of 0 falls back to the default projectile throw power. This item requires a format version of at least 1.19.60.
projectilesnot setArray of objectsList of projectiles that can be used by the shooter.
soundnot setStringSound that is played when the shooter shoots a projectile.Bogged: "bow", Drowned: "item.trident.throw"

magic​

If set, the projectiles are flagged as magic and the ranged attack goal will not run at the same time as other magic goals (for example, drink_potion). This item requires a format version of at least 1.19.60.

projectiles​

List of projectiles that can be used by the shooter. Each entry can specify its own projectile definition and condition filters; entries are evaluated in order and the first match is used. This item requires a format version of at least 1.19.60.

Samples​

Blaze​
"minecraft:shooter": {
"def": "minecraft:small_fireball"
}
Bogged​

At /minecraft:entity/component_groups/minecraft:ranged_attack/minecraft:shooter/:

"minecraft:shooter": {
"aux_val": 26,
"def": "minecraft:arrow",
"sound": "bow"
}
Drowned​
"minecraft:shooter": {
"def": "minecraft:thrown_trident",
"sound": "item.trident.throw"
}
Ender Dragon​
"minecraft:shooter": {
"def": "minecraft:dragon_fireball"
}
Llama​
"minecraft:shooter": {
"def": "minecraft:llama_spit"
}

minecraft:sittable​

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

Defines the entity's 'sit' state.

Sittable Properties​

NameDefault ValueTypeDescription
sit_eventnot setObjectEvent to run when the entity enters the 'sit' state. Can be an object with event and target properties, or a simple event string.
sit_event (as String)not setString
stand_eventnot setObjectEvent to run when the entity exits the 'sit' state. Can be an object with event and target properties, or a simple event string.
stand_event (as String)not setString

Samples​

Parrot​
"minecraft:sittable": {}

minecraft:skin_id​

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

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

[!Note] Requires multiple texture sets to be set up for the entity.

Skin Id Properties​

NameDefault ValueTypeDescription
value0Integer numberThe ID of the skin. By convention, 0 is the ID of the base skin.

Samples​

minecraft:sound_volume​

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

Sets the entity's base volume for sound effects.

Sound Volume Properties​

NameDefault ValueTypeDescription
value1Decimal numberThe value of the volume the entity uses for sound effects.

minecraft:spawn_egg_interaction​

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

Enables interacting with this entity using its own spawn egg to spawn a born child. Runs the "minecraft:entity_born" event on the created entity as well as the defined "on_spawn" event.

Samples​

Chicken​
"minecraft:spawn_egg_interaction": {}

minecraft:spawn_entity​

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

Adds a timer after which this entity will spawn another entity or item (similar to vanilla's chicken's egg-laying behavior).

Spawn Entity Properties​

NameDefault ValueTypeDescriptionExample Values
entities (Entities)not setArray of Entities itemsList of entity spawn definitions. Can be a single object or an array of objects.Chicken: [{"min_wait_time":300,"max_wait_time":600,"spawn_sound":"plop","spawn_item":"egg","filters":[{"test":"rider_count","subject":"self","operator":"==","value":0},{"test":"enum_property","subject":"self","domain":"minecraft:climate_variant","value":"temperate"}]},{"min_wait_time":300,"max_wait_time":600,"spawn_sound":"plop","spawn_item":"brown_egg","filters":[{"test":"rider_count","subject":"self","operator":"==","value":0},{"test":"enum_property","subject":"self","domain":"minecraft:climate_variant","value":"warm"}]},{"min_wait_time":300,"max_wait_time":600,"spawn_sound":"plop","spawn_item":"blue_egg","filters":[{"test":"rider_count","subject":"self","operator":"==","value":0},{"test":"enum_property","subject":"self","domain":"minecraft:climate_variant","value":"cold"}]}], Drowned: {"max_wait_time":0,"min_wait_time":0,"num_to_spawn":1,"single_use":true,"spawn_entity":"minecraft:zombie_nautilus","spawn_event":"minecraft:entity_spawned"}, Sniffer: {"min_wait_time":0,"max_wait_time":0,"spawn_sound":"plop","spawn_item":"sniffer_egg","spawn_item_event":{"event":"on_egg_spawned","target":"self"},"single_use":true}
entities (as Object)not setObject
filtersnot setMinecraft filterIf present, the specified entity will only spawn if the filter evaluates to true.
max_wait_time600Integer numberMaximum amount of time to randomly wait in seconds before another entity is spawned.
min_wait_time300Integer numberMinimum amount of time to randomly wait in seconds before another entity is spawned.
num_to_spawn1Integer numberThe number of entities of this type to spawn each time that this triggers.
should_leashfalseBoolean true/falseIf true, this the spawned entity will be leashed to the parent.
single_usefalseBoolean true/falseIf true, this component will only ever spawn the specified entity once.
spawn_entitynot setStringIdentifier of the entity to spawn, leave empty to spawn the item defined by "spawn_item" instead.
spawn_eventminecraft:entity_bornMinecraft Event TriggerEvent to call on the spawned entity when it spawns.
spawn_itemeggStringItem identifier of the item to spawn.
spawn_item_eventnot setMinecraft Event TriggerEvent to call on this entity when the item is spawned.
spawn_methodbornStringMethod to use to spawn the entity.
spawn_soundplopStringIdentifier of the sound effect to play when the entity is spawned.

Entities​

Entities Properties​

JSON path: entities

NameDefault ValueTypeDescriptionExample Values
filtersnot setMinecraft filterIf present, the specified entity will only spawn if the filter evaluates to true.Chicken: [{"test":"rider_count","subject":"self","operator":"==","value":0},{"test":"enum_property","subject":"self","domain":"minecraft:climate_variant","value":"temperate"}]
max_wait_timenot setDecimal numberChicken: 600
min_wait_timenot setDecimal numberChicken: 300
spawn_itemnot setStringChicken: "egg"
spawn_soundnot setStringChicken: "plop"

Samples​

Chicken​
"minecraft:spawn_entity": {
"entities": [
{
"min_wait_time": 300,
"max_wait_time": 600,
"spawn_sound": "plop",
"spawn_item": "egg",
"filters": [
{
"test": "rider_count",
"subject": "self",
"operator": "==",
"value": 0
},
{
"test": "enum_property",
"subject": "self",
"domain": "minecraft:climate_variant",
"value": "temperate"
}
]
},
{
"min_wait_time": 300,
"max_wait_time": 600,
"spawn_sound": "plop",
"spawn_item": "brown_egg",
"filters": [
{
"test": "rider_count",
"subject": "self",
"operator": "==",
"value": 0
},
{
"test": "enum_property",
"subject": "self",
"domain": "minecraft:climate_variant",
"value": "warm"
}
]
},
{
"min_wait_time": 300,
"max_wait_time": 600,
"spawn_sound": "plop",
"spawn_item": "blue_egg",
"filters": [
{
"test": "rider_count",
"subject": "self",
"operator": "==",
"value": 0
},
{
"test": "enum_property",
"subject": "self",
"domain": "minecraft:climate_variant",
"value": "cold"
}
]
}
]
}
Drowned​
"minecraft:spawn_entity": {
"entities": {
"max_wait_time": 0,
"min_wait_time": 0,
"num_to_spawn": 1,
"single_use": true,
"spawn_entity": "minecraft:zombie_nautilus",
"spawn_event": "minecraft:entity_spawned"
}
}
Sniffer​
"minecraft:spawn_entity": {
"entities": {
"min_wait_time": 0,
"max_wait_time": 0,
"spawn_sound": "plop",
"spawn_item": "sniffer_egg",
"spawn_item_event": {
"event": "on_egg_spawned",
"target": "self"
},
"single_use": true
}
}

minecraft:spawn_on_death​

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

Component for spawning entities when an entity perishes.

[!Note] Added in 1.26.20. Spawns one or more entities when the owning entity perishes. entity_to_spawn defaults to the owning entity, spawn_method defaults to spawned (also accepts born and summoned), spawn_amount defaults to 1, inherit_parent_name defaults to true, and additional_spawn_range adds optional random offset. filters gates whether the spawn is triggered at all.

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

Entity Spawn On Death Properties​

NameDefault ValueTypeDescription
additional_spawn_range{"max":0,"min":0}Additional Spawn Range itemAdditional random range of entities to spawn, defaults to 0, 0 when not set
entity_to_spawnselfStringWhat entity to spawn, defaults to owning entity when not set
filters (Filters){"AND":null,"NOT":null,"OR":null,"all":null,"all_of":null,"any":null,"any_of":null,"none_of":null}Filters itemConditions that need to be met for the behavior to start.
filters (Alternate 1)not setObject
inherit_parent_nametrueBoolean true/falseIf true, the entity will inherit the name of the parent entity, defaults to true when not set
spawn_amount1Integer numberHow many entities to spawn, defaults to 1 when not set Value must be > 0.
spawn_methodspawnedStringSpawn method. born, spawned, or summoned, defaults to spawned when not set

Block IntRange​

Block IntRange Properties​

JSON path: additional_spawn_range

NameDefault ValueTypeDescription
max0Integer number
min0Integer number

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:spell_effects​

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

Allows an entity to add or remove status effects from itself. Similarly to addrider, this component performs a one-time operation on the entity when added. Removing the component will not change the entity's current effects. Adding different versions of the component multiple times will perform each one in turn. Once the component has been added, it will not provide any further functionality. There is one exception to this behavior: if this component is present on a player, its effects will be re-applied every time the player enters the world. To avoid this, remove the component shortly after adding it, or add an empty component to replace it.

Entity Spell Effects Properties​

NameDefault ValueTypeDescriptionExample Values
add_effects[]Array of Add Effects itemsList of effects to add to this entity.Player: [{"display_on_screen_animation":true,"duration":30,"effect":"raid_omen"}]
remove_effects[]Array of stringsThe identifiers of effects to remove from the entity after adding this component.Player: "bad_omen"

Entity MobEffectChangeComponentEffect​

Entity MobEffectChangeComponentEffect Properties​

JSON path: add_effects

NameDefault ValueTypeDescription
ambientfalseBoolean true/falseWhether the effect is ambient.
amplifier0Integer numberThe amplifier of the effect.
display_on_screen_animationfalseBoolean true/falseWhether the effect displays an on-screen animation.
duration0ObjectThe duration of the effect in seconds, or "infinite".
effectStringThe name of the effect to apply.
visibletrueBoolean true/falseWhether the effect is visible.

Samples​

Player​

At /minecraft:entity/component_groups/minecraft:add_raid_omen/minecraft:spell_effects/:

"minecraft:spell_effects": {
"add_effects": [
{
"display_on_screen_animation": true,
"duration": 30,
"effect": "raid_omen"
}
],
"remove_effects": "bad_omen"
}

At /minecraft:entity/component_groups/minecraft:clear_raid_omen_spell_effect/minecraft:spell_effects/:

"minecraft:spell_effects": {}

minecraft:strength​

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

Defines the strength of this entity.

Entity Strength Properties​

NameDefault ValueTypeDescription
max5Integer numberThe maximum strength of this entity
value1Integer numberThe initial value of the strength

Samples​

minecraft:suspect_tracking​

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

Allows this entity to remember suspicious locations.

Samples​

Warden​
"minecraft:suspect_tracking": {}

minecraft:tameable​

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

This entity can be tamed.

[!Note] From 1.21.130, each entry in tame_items accepts an optional result_item field. On a successful tame interaction, the consumed item is replaced in the player's inventory with the specified item.

Tameable Properties​

NameDefault ValueTypeDescriptionExample Values
probability1Decimal numberThe chance of taming the entity with each item use between 0.0 and 1.0, where 1.0 is 100%Parrot: 0.33
tame_eventnot setObjectEvent to fire when the entity is tamed. Can be an object with event and target properties, or a simple event string.Parrot: {"event":"minecraft:on_tame","target":"self"}
tame_event (as String)not setString
tame_itemsnot setArray of stringsThe list of items that can be used to tame this entityParrot: ["wheat_seeds","pumpkin_seeds","melon_seeds","beetroot_seeds","pitcher_pod","torchflower_seeds"]
tameItemsnot setString

Samples​

Parrot​
"minecraft:tameable": {
"probability": 0.33,
"tame_items": [
"wheat_seeds",
"pumpkin_seeds",
"melon_seeds",
"beetroot_seeds",
"pitcher_pod",
"torchflower_seeds"
],
"tame_event": {
"event": "minecraft:on_tame",
"target": "self"
}
}
Sources
idSourceLicenseCommitAccessed
ms-learnMinecraft Creator documentation (Microsoft Learn)CC BY 4.0 (documentation), MIT (code)a9fd1c02026-11-13