Skip to main content

Entity component reference (14/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:projectile​

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

Turns the entity into a projectile: a thrown or shot entity that flies along a ballistic arc and reacts when it impacts a block, a fluid, or another entity.

Entity Projectile Properties​

NameDefault ValueTypeDescription
anchororiginAnchor choicesReference point on the shooter used to position the projectile at spawn: 0 = origin (feet), 1 = eye height, 2 = middle of the bounding box.
angle_offset0Decimal numberAdditional upwards pitch (in degrees) applied to the shooter's aim direction at launch. Negative values aim downward.
catch_firefalseBoolean true/falseDetermines whether the entity hit will be set on fire.
crit_particle_on_hurtfalseBoolean true/falseIf true, critical-hit particles are spawned on the projectile when it is struck.
destroy_on_hurtfalseBoolean true/falseIf true, the projectile is removed from the world when struck.
gravity0.05000000074505806Decimal numberDownward acceleration (blocks per tick squared) applied each tick while in flight. Higher values make the projectile fall faster.
hit_ground_soundStringIdentifier of the sound to play when the projectile hits a block. Defaults to hit_sound when empty.
hit_nearest_passengerfalseBoolean true/falseIf true, when the projectile hits a vehicle with at least one passenger, the on-hit behavior is applied to the passenger closest to the impact point instead of the vehicle itself.
hit_soundStringIdentifier of the sound to play when the projectile hits an entity. Also used for block hits when hit_ground_sound is not specified.
hit_waterfalseBoolean true/falseIf true, the projectile treats water as a hit surface and stops on contact. (Education Edition chemistry feature)
homingfalseBoolean true/falseIf true, the projectile steers towards an active target while in flight.
ignored_entities[]Array of stringsArray of entity identifiers that the projectile will pass through without registering a hit.
inertia0.9900000095367432Decimal numberFraction of the projectile's velocity preserved each tick while traveling through air. Values below 1.0 cause it to slow down over time.
is_dangerousfalseBoolean true/falseIf true, the projectile is flagged as dangerous, affecting AI reactions and certain client-side behaviors.
isolated_physicstrueBoolean true/falseIf true, this projectile is not affected by outside forces such as friction and drag.
lightningfalseBoolean true/falseIf true, the projectile can channel a lightning bolt when it hits an entity during a thunderstorm.
liquid_inertia0.6000000238418579Decimal numberFraction of the projectile's velocity preserved each tick while traveling through a fluid.
multiple_targetsfalseBoolean true/falseIf true, the projectile can hit more than one entity over the course of its flight; if false, it stops at the first entity it hits.
offset[0, 0, 0]Array of numbersOffset, relative to the anchor, at which the projectile is spawned when fired by the shooter.
offset (Offset)not setOffset (Offset) item
on_fire_time5Decimal numberDuration in seconds for which an entity set on fire by this projectile remains burning. Applied both by the legacy top-level catch_fire flag and by the catch_fire on-hit subcomponent.
on_hitnot setHit itemMap of on-hit subcomponents that drive what happens when the projectile impacts a block, fluid, or entity. Each key is a subcomponent name and its value is that subcomponent's configuration.
owner_launch_immunity_ticks5Integer numberNumber of ticks immediately after launch during which the projectile cannot hit its own shooter.
particleiconcrackParticle choicesParticle effect emitted at the impact location when the projectile hits something.
potion_effect-1Integer numberDefault potion aux value associated with the projectile.
power1.2999999523162842Decimal numberInitial speed (in blocks per tick) at which the projectile is launched.
reflect_immunity0Decimal numberDuration in seconds after launch during which the projectile cannot be reflected by being struck.
reflect_on_hurtfalseBoolean true/falseIf true, this projectile will be reflected back when hit by another projectile or by taking damage.
shoot_soundStringIdentifier of the sound to play when the projectile is fired.
shoot_targettrueBoolean true/falseIf true, the projectile is aimed at the shooter's current target (when one exists) rather than straight ahead.
should_bouncenoShould Bounce choicesControls whether the projectile bounces off entities on impact.
splash_range4Decimal numberSplash radius (in blocks) used when applying potion effects via the splash/lingering potion code path.
spread_firetrueBoolean true/falseIf true, when hitting an entity and the projectile is on fire, spread the fire to the entity.
stop_on_hurtfalseBoolean true/falseIf true, the projectile has its velocity zeroed out when struck.
uncertainty_base0Decimal numberBase inaccuracy added to the launch direction. The total inaccuracy is uncertainty_base - difficultyLevel * uncertainty_multiplier.
uncertainty_multiplier0Decimal numberPer-difficulty-level reduction in inaccuracy. See uncertainty_base for the full formula.

catch_fire​

Determines whether the entity hit will be set on fire. Note: the presence of this field in the component definition causes targets to catch fire regardless of the value set. To prevent fire, remove this field entirely from the component.

isolated_physics​

If true, this projectile is not affected by outside forces such as friction and drag. This item requires a format version of at least 1.26.20. Available under the Custom Projectiles experimental toggle starting in format version 1.26.20.

multiple_targets​

If true, the projectile can hit more than one entity over the course of its flight; if false, it stops at the first entity it hits. Projectiles launched with the Piercing enchantment have this value set to true.

potion_effect​

Default potion aux value associated with the projectile. Normally set programmatically by potion items; rarely useful at authoring time. A value matching the water potion is required for the douse_fire on-hit subcomponent to extinguish fires.

reflect_on_hurt​

If true, this projectile will be reflected back when hit by another projectile or by taking damage. From 1.26.0, every projectile reflects projectiles that have reflect_on_hurt: true on hit, in addition to the existing damage-based reflection.

should_bounce​

Controls whether the projectile bounces off entities on impact. no disables bouncing, if_invulnerable bounces only off invulnerable entities, and if_no_damage_dealt bounces whenever no damage is dealt to the target.

Anchor choices​

ValueTitleDescription
eye_heightEye height
middleMiddle
originOrigin

Offset (Offset)​

Offset Properties​

JSON path: offset

NameDefault ValueTypeDescription
x0Decimal number
y0Decimal number
z0Decimal number

Entity OnHitCommandsStorage​

Entity OnHitCommandsStorage Properties​

JSON path: on_hit

NameDefault ValueTypeDescription
arrow_effectnot setArrow Effect itemVariant of mob_effect that derives the effects from the arrow's tipped-potion data and splits durations across the standard eight-arrow stack.
catch_firenot setCatch Fire itemCauses the projectile to embed itself in the block it hits.
definition_eventnot setDefinition Event itemFires an entity event on the shooter, the projectile, the entity hit, and/or all entities in a splash radius.
douse_firenot setObjectWhen the projectile is a water-effect potion, extinguishes fires and campfires at and around the hit block.
freeze_on_hitnot setFreeze On Hit itemFreezes nearby water blocks to ice in a configurable volume around the impact (Education Edition chemistry feature).
grant_xpnot setGrant Xp itemDrops experience orbs at the impact location.
hurt_ownernot setHurt Owner itemDamages the projectile's owner when the projectile lands.
ignitenot setObjectTriggers the entity's on_ignite definition when the projectile hits.
impact_damagenot setImpact Damage item
mob_effectnot setMob Effect itemApplies one or more mob effects to the entity hit. Effects are described with an effects array of effect objects.
particle_on_hitnot setParticle On Hit itemEmits a particle effect at the impact location, optionally only for entity hits or only for non-entity hits.
remove_on_hitnot setObjectRemoves the projectile from the world when it hits a block, entity, or (if hit_water is set) water.
spawn_aoe_cloudnot setSpawn Aoe Cloud itemSpawns an area effect cloud at the impact point that applies potion effects to entities inside it over time
spawn_chancenot setSpawn Chance itemConditionally spawns one or two groups of entities at the impact location and optionally fires events on each spawned entity.
stick_in_groundnot setStick In Ground itemCauses the projectile to embed itself in the block it hits.
teleport_ownernot setObjectTeleports the projectile's owner to the impact location.
thrown_potion_effectnot setThrown Potion Effect itemApplies the splash-potion effects of a thrown potion to nearby entities at the impact point.
wind_burst_on_hitnot setObjectReleases an outward wind burst at the impact point that pushes nearby entities away.
Entity ArrowEffectSubcomponentDefinition​

Variant of mob_effect that derives the effects from the arrow's tipped-potion data and splits durations across the standard eight-arrow stack.

Entity ArrowEffectSubcomponentDefinition Properties​

JSON path: on_hit > arrow_effect

NameDefault ValueTypeDescription
apply_effect_to_blocking_targetstrueBoolean true/falseIf true, effects are still applied to targets that blocked the projectile.
Entity CatchFireSubcomponentDefinition​

Causes the projectile to embed itself in the block it hits.

Entity CatchFireSubcomponentDefinition Properties​

JSON path: on_hit > catch_fire

NameDefault ValueTypeDescription
fire_affected_by_griefingfalseBoolean true/falseIf true, the block-ignition behavior is suppressed when the shooter is a mob and the mobGriefing game rule is off.
on_fire_time0Decimal numberDuration in seconds for which entity remains on fire
Entity ActorDefinitionEventSubcomponentDefinition​

Fires an entity event on the shooter, the projectile, the entity hit, and/or all entities in a splash radius.

Entity ActorDefinitionEventSubcomponentDefinition Properties​

JSON path: on_hit > definition_event

NameDefault ValueTypeDescription
affect_projectilefalseBoolean true/falseIf true, the event is fired on the projectile entity itself.
affect_shooterfalseBoolean true/falseIf true, the event is fired on the projectile's shooter.
affect_splash_areafalseBoolean true/falseIf true, the event is fired on every entity within splash_area blocks of the impact.
affect_targetfalseBoolean true/falseIf true, the event is fired on the entity hit by the projectile.
event_trigger{"event":"","filters":{"AND":null,"NOT":null,"OR":null,"all":null,"all_of":null,"any":null,"any_of":null,"none_of":null},"target":"self"}Event Trigger itemEvent trigger (with optional filters) to fire on the selected target(s).
splash_area0Decimal numberRadius (in blocks) used by affect_splash_area.
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: on_hit > definition_event > event_trigger

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: on_hit > definition_event > event_trigger > 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 FreezeOnHitSubcomponentDefinition​

Freezes nearby water blocks to ice in a configurable volume around the impact (Education Edition chemistry feature).

Entity FreezeOnHitSubcomponentDefinition Properties​

JSON path: on_hit > freeze_on_hit

NameDefault ValueTypeDescription
shapecubeShape choicesShape of the freezing volume. Allowed values: cube, sphere.
size1Decimal numberHalf-extent of the freezing volume (in blocks).
snap_to_blockfalseBoolean true/falseIf true, the freezing volume is centered on the hit block's center instead of the precise impact point.

Shape choices​

ValueTitleDescription
cubeCube
sphereSphere
Entity GrantXPSubcomponentDefinition​

Drops experience orbs at the impact location.

Entity GrantXPSubcomponentDefinition Properties​

JSON path: on_hit > grant_xp

NameDefault ValueTypeDescription
maxXP0Integer numberMaximum amount of experience to drop.
minXP0Integer numberMinimum amount of experience to drop.
Entity HurtOwnerSubcomponentDefinition​

Damages the projectile's owner when the projectile lands.

Entity HurtOwnerSubcomponentDefinition Properties​

JSON path: on_hit > hurt_owner

NameDefault ValueTypeDescription
ignitefalseBoolean true/falseIf true, the damage sets the owner on fire.
knockbackfalseBoolean true/falseIf true, the damage applies knockback to the owner.
owner_damage0Decimal numberAmount of damage to deal to the owner.
Entity ImpactDamageSubcomponentDefinition​
Entity ImpactDamageSubcomponentDefinition Properties​

JSON path: on_hit > impact_damage

NameDefault ValueTypeDescription
apply_knockback_to_blocking_targetsfalseBoolean true/falseIf true, knockback is still applied to targets that successfully blocked the hit.
catch_firefalseBoolean true/falseIf true, the entity hit is set on fire (uses the projectile's on_fire_time).
ceil_pre_critical_damagefalseBoolean true/falseIf true, rounds the projectile's damage up to the next integer before the critical-hit multiplier is applied.
channelingfalseBoolean true/falseIf true, the projectile can call down a lightning bolt on the entity hit during a thunderstorm.
damage{"max":0,"min":0}Damage itemRange of damage to apply on impact. A random value in [min, max] is rolled per hit and the velocity-scaled power_multiplier term is added to it to define the projectile's base damage.
death_message_overridenot setStringA localization key to use as the death message when the impact damage kills an entity.
destroy_on_hitfalseBoolean true/falseIf true, the projectile is removed when it deals damage to an entity.
destroy_on_hit_requires_damagetrueBoolean true/falseIf true, destroy_on_hit only triggers when at least one point of damage is actually dealt (targets that fully absorb damage will not destroy the projectile).
difficulty_randomizationnoneDifficulty Randomization choicesControls how world difficulty contributes to the rolled damage.
filterStringEntity family or type that the projectile is restricted to damaging. Entities outside the filter are not damaged.
knockbackfalseBoolean true/falseIf true, the entity hit is knocked back away from the projectile.
max_critical_damage2147483647Integer numberIf specified, sets the maximum damage after critical damage has been applied. Enchantments have already been applied at this point, so this clamps the final damage value of critical hits.
min_critical_damage0Integer numberIf specified, sets the minimum damage after critical damage has been applied. Enchantments have already been applied at this point, so this clamps the final damage value of critical hits.
power_multiplier0Decimal numberMultiplied by the projectile's velocity and added to the rolled damage to define the projectile's base damage, so it can be used on its own to scale damage by the projectile's velocity.
scale_damage_with_difficultytrueBoolean true/falseIf true, scales impact damage with the world's difficulty.
set_last_hurt_requires_damagetrueBoolean true/falseIf true, the projectile only registers as the last hurt-by source on the target when at least one point of damage is actually dealt.
death_message_override​

A localization key to use as the death message when the impact damage kills an entity. If omitted, the default death message for projectiles is used. %1$s is the name of the killed entity and %2$s is the name of the projectile's owner, or of the projectile itself if it has no owner.

difficulty_randomization​

Controls how world difficulty contributes to the rolled damage. none ignores difficulty, additive adds a difficulty-driven term on top of the base damage, and multiplicative folds the difficulty term into power_multiplier before scaling by velocity.

Legacy FloatRange​
Legacy FloatRange Properties​

JSON path: on_hit > impact_damage > damage

NameDefault ValueTypeDescription
max0Decimal number
min0Decimal number

Difficulty Randomization choices​

ValueTitleDescription
additiveAdditive
multiplicativeMultiplicative
noneNone
Entity MobEffectSubcomponentDefinition​

Applies one or more mob effects to the entity hit. Effects are described with an effects array of effect objects.

Entity MobEffectSubcomponentDefinition Properties​

JSON path: on_hit > mob_effect

NameDefault ValueTypeDescription
effects[]Array of Effects itemsArray of effect objects. Each element may specify effect (name), amplifier, and per-difficulty durations durationeasy, durationnormal, durationhard.
Entity MobEffectInstance​
Entity MobEffectInstance Properties​

JSON path: on_hit > mob_effect > effects

NameDefault ValueTypeDescription
amplifier1Integer number
durationeasynot setInteger number
durationeasy (as String)not setString
durationhardnot setInteger number
durationhard (as String)not setString
durationnormalnot setInteger number
durationnormal (as String)not setString
effectString
Entity ParticleOnHitSubcomponentDefinition​

Emits a particle effect at the impact location, optionally only for entity hits or only for non-entity hits.

Entity ParticleOnHitSubcomponentDefinition Properties​

JSON path: on_hit > particle_on_hit

NameDefault ValueTypeDescription
num_particles1Integer numberNumber of particles to spawn per hit.
on_entity_hitfalseBoolean true/falseIf true, particles are spawned when the projectile hits an entity.
on_other_hitfalseBoolean true/falseIf true, particles are spawned when the projectile hits something that is not an entity.
particle_item_name (Particle Item Name)not setParticle Item Name itemMap from item identifier to a filter group, used to select an item icon for iconcrack-style particles based on context (e.g. the projectile's owner).
particle_item_name (Alternate 1)not setObject
particle_typenoneParticle Type choicesParticle type to spawn at the impact point.
Particle Item Name​
Particle Item Name Properties​

JSON path: on_hit > particle_on_hit > particle_item_name

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.

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 SpawnAoECloudSubcomponentDefinition​

Spawns an area effect cloud at the impact point that applies potion effects to entities inside it over time.

Entity SpawnAoECloudSubcomponentDefinition Properties​

JSON path: on_hit > spawn_aoe_cloud

NameDefault ValueTypeDescription
affect_ownertrueBoolean true/falseIf true, the projectile's owner can be affected by the cloud.
duration0Integer numberHow long, in seconds, the cloud persists before disappearing.
duration (as String)not setString
particlemobspellambientParticle choicesParticle effect emitted by the cloud.
potion-1Integer numberAux value of the potion whose effects the cloud applies. When -1, the potion is taken from the projectile entity itself.
radius0Decimal numberInitial radius (in blocks) of the cloud.
radius_on_use-1Decimal numberAmount the radius shrinks (or grows) each time the cloud applies its effects. -1 keeps the radius unchanged.
reapplication_delay0Integer numberNumber of ticks the cloud waits before re-applying its effects to the same entity.
Entity SpawnChanceSubcomponentDefinition​

Conditionally spawns one or two groups of entities at the impact location and optionally fires events on each spawned entity.

Entity SpawnChanceSubcomponentDefinition Properties​

JSON path: on_hit > spawn_chance

NameDefault ValueTypeDescription
first_spawn_chance0Decimal numberPercent chance (0-1.0) that the first group spawns. Value must be <= 1.
first_spawn_count0Integer numberNumber of entities spawned when the first roll succeeds.
on_spawn[]Array of Spawn itemsArray of entity event triggers to fire on each spawned entity.
second_spawn_chance0Decimal numberPercent chance (0-1.0) that the second group spawns (rolled independently of the first). Value must be <= 1.
second_spawn_count0Integer numberNumber of entities spawned when the second roll succeeds.
spawn_babyfalseBoolean true/falseIf true, spawned entities start as babies (where applicable).
spawn_definitionStringIdentifier of the entity definition to spawn.
Entity StickInGroundSubcomponentDefinition​

Causes the projectile to embed itself in the block it hits.

Entity StickInGroundSubcomponentDefinition Properties​

JSON path: on_hit > stick_in_ground

NameDefault ValueTypeDescription
shake_time0Decimal numberDuration in seconds for which the projectile visually shakes after sticking.
Entity ThrownPotionEffectSubcomponentDefinition​

Applies the splash-potion effects of a thrown potion to nearby entities at the impact point.

Entity ThrownPotionEffectSubcomponentDefinition Properties​

JSON path: on_hit > thrown_potion_effect

NameDefault ValueTypeDescription
effect-1Integer numberAux value of the potion to apply.

Should Bounce choices​

ValueTitleDescription
if_invulnerableIf invulnerable
if_no_damage_dealtIf no damage dealt
noNo

minecraft:push_through​

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

Sets the distance through which the entity can push through.

Push Through Properties​

NameDefault ValueTypeDescription
value0Decimal numberThe value of the entity's push-through, in blocks.
Sources
idSourceLicenseCommitAccessed
ms-learnMinecraft Creator documentation (Microsoft Learn)CC BY 4.0 (documentation), MIT (code)a9fd1c02026-11-13