Projectile

Various projectiles being fired from a dispenser.
There is a category for this topic!
 
See Category:Projectiles for a list of pages relating to this topic.

A projectile is an entity that can be fired, shot, or thrown by mobs, other entities, dispensers, and players. Particles can also be summoned using commands.

List of Projectiles

"Throw" redirects here. For the entity created by throwing items, see Item (entity). For the mob that can toss up other mobs, see Iron Golem.

Inheritance

Table

Mobs and players equipped with bows and crossbows can use them to shoot arrows. The player can also throw various items as projectiles. Some mobs shoot projectiles directly as an attack.

Projectile Sources Damage Item form
Ice Bomb[edu only] Player, when used
Dispenser, when shot
0 Ice Bomb
Fireball Ghast, as an attack 6HP❤️❤️❤️[note 1] None
Small Fireball Blaze, as an attack
Dispenser, when shooting a fire charge
Ominous Trial Spawner, when active
5HP❤️❤️💔 Fire Charge[note 2]
Dragon Fireball Ender Dragon, as an attack 0 None
Launched Firework Rocket Player, when used, and not gliding with an elytra
Villager, after winning in a Raid
Crossbow, when shot
Dispenser, when shot
0 Firework Rocket
Llama Spit Llama, as an attack 1HP💔 None
Shot Arrow Bow or Crossbow, when shot
Dispenser, when shot
Ominous Trial Spawner, when active
8.5HP❤️ × 4.25[note 3] Arrow
Spectral Arrow[JE only] Bow or Crossbow, when shot
Dispenser, when shot
Spectral Arrow
Tipped Arrow Bow or Crossbow, when shot
Dispenser, when shot
Ominous Trial Spawner, when active
Tipped Arrow
Shulker Bullet Shulker, as an attack 4HP❤️❤️ None
Thrown Bottle o' Enchanting Player, when used
Dispenser, when shot
0 Bottle o' Enchanting
Thrown Egg Player, when used
Dispenser, when shot
0 Egg
Thrown Ender Pearl Player, when used 0[note 4] Ender Pearl
Thrown Eye of Ender Player, when used 0 Eye of Ender
Thrown Snowball Player, when used
Snow Golem, as an attack
Dispenser, when shot
0[note 5] Snowball
Thrown Splash Potion Player, when used
Witch, as an attack
Dispenser, when shot
0 Splash Potion
Lingering Potion Player, when used
Dispenser, when shot
Ominous Trial Spawner, when active
0 Lingering Potion
Thrown Trident Player, when used
Drowned, as an attack
Dispenser, when shot‌[BE only]
8HP❤️❤️❤️❤️ Trident
Wind Charge Player, when used
Breeze, as an attack
Dispenser, when shot
Ominous Trial Spawner, when active
1HP💔 Wind Charge
Wither Skull Wither, as an attack 8HP❤️❤️❤️❤️ None
  1. Fireballs rebounded by the player deal 1000HP❤️ × 500 damage to a ghast upon direct hit, killing them.
  2. Only works with Dispeners.
  3. Average damage when fired from a Bow with no Power enchantments. See Ranged attack § Projectile damage for more info.
  4. The thrower takes 5HP❤️❤️💔 damage.
  5. Blazes take 3HP❤️💔 damage.

Picking up

An eye of ender has a 80% chance of surviving when thrown. If it survives, it drops as an item where it stopped, which can then by picked up.

A trident thrown by a player can be picked up (in its projectile form), as long as its on the ground, doesn't have Loyalty, and the player didn't throw it while in Creative mode.

All other projectiles are either destroyed, turned into something else, or exist as a projectile which despawns after some time, and cannot be picked up or grabbed in their projectile form.

Initial conditions

This section is a work in progress.
 
Please help expand and improve it. The talk page may contain suggestions.

Shot from dispenser

All projectiles use the following calculations to get shot by a dispenser:

  • To find the position, move out from the center of the block by DISTANCE and add Y OFFSET.
  • Get the unit vector straight out of the dispenser.
  • For each axis, add a random (64-bit) number between -0.0172275 * UNCERTAINTY and 0.0172275 * UNCERTAINTY, using a triangular distribution.
  • To find the velocity, scale by POWER.
Projectile dispenser values
Projectile Distance (double) Y Offset (double) Power (float) Uncertainty (float)
Default 0.7 0.1 1.1 6.0
Potion, Experience bottle 0.7 0.1 1.375 3
Wind charge, fire charge 1.0 0.0 1.0 6.6666665
Firework rocket 0.5000099999997474 0.0 0.5 1.0

Throwable projectiles (except eye of ender)

The direction and velocity of throwable projectiles is slightly randomized and affected by the player's movement. More specifically, the game does these calculations in order:

  • Get the facing vector of the player, with length 1. For the pitch, this uses the player's pitch plus PITCH (where positive PITCH makes the vector point lower).
  • For each axis, add a random (64 bit) number between -0.0172275 and 0.0172275, using a triangular distribution.
  • Scale the velocity by POWER.
  • Add the player's velocity. If the player is on the ground, the Y component is unaffected.

The result is a shooting speed of around POWER towards where the player is facing, depending on randomness and the player's velocity.

Throwable projectile powers
Projectile Power (float) Pitch (float)
Snowball, ender pearl, egg 1.5 0
Potions 0.5 -20°
Experience bottle 0.7 -20°

Motion

Main article: Entity § Motion
Kind Ticking order Gravity[note 1]

(m/tick/tick)

Drag

(vertical)

Drag

(horizontal)

Terminal velocity

(m/tick)[note 2]

Terminal velocity

(m/s)

Maximum horizontal travel distance

(m/(m/s))[note 3]


EntitySprite egg.png: Sprite image for egg in Minecraft EntitySprite snowball.png: Sprite image for snowball in Minecraft EntitySprite ender-pearl.png: Sprite image for ender-pearl in Minecraft Thrown eggs, snowballs, and ender pearls Acceleration, Drag, Position[note 4] -0.03 (double) 0.99 (float) 0.99 (float) 2.97 59.4 99
EntitySprite splash-potion.png: Sprite image for splash-potion in Minecraft Thrown potions -0.05 (double)


4.95 99.0
EntitySprite bottle-o'-enchanting.png: Sprite image for bottle-o'-enchanting in Minecraft Thrown bottles o' enchanting -0.07 (double)


6.93 138.6
EntitySprite fireball.png: Sprite image for fireball in Minecraft EntitySprite wither-skull.png: Sprite image for wither-skull in Minecraft EntitySprite dragon-fireball.png: Sprite image for dragon-fireball in Minecraft Fireballs, small fireballs, wither skulls, and dragon fireballs Acceleration, Drag, Position 0.10 (double)[note 1] 0.95 (float) 1.90 38.0 19
Dangerous wither skulls 0.10 (double)[note 1] 0.73 (float) 0.2703703 5.407407 2.703703
Wind charges 0.10 (double)[note 1] N/A[note 5]
Llama Spit Position, Drag, Acceleration -0.06 (double) 0.99 (float) 6.00 120.0 100
EntitySprite arrow.png: Sprite image for arrow in Minecraft EntitySprite trident.png: Sprite image for trident in Minecraft Fired arrows, and thrown tridents -0.05 (double) 0.99 (float) 5.00 100.0 100
  1. a b c d Explosive projectiles and wind charges are not affected by gravity but instead get acceleration from getting damaged.
  2. Terminal velocity is given by acceleration1drag if drag is before acceleration and drag × acceleration1drag otherwise.
  3. For axes with no acceleration, maximum travel distance is given by initialVelocity1drag if position is before drag and drag × initialVelocity1drag otherwise. Table values are the number that, when multiplied by the initial velocity, gives the maximum travel distance.
  4. The order of throwable projectiles was changed in Java Edition 1.21.2, from "Position, Drag, Acceleration" to "Acceleration, Drag, Position".
  5. For boats and wind charges, the order between acceleration and drag doesn't matter: Boats have no vertical drag, and wind charges have no drag at all.
  1. a b Yaw and pitch follow the Minecraft's convention, thus zero yaw is directed at +Z (south) and looking upwards corresponds to negative values of pitch.

Collision

Projectiles perform a raycast from their current position to their next position and check for blocks and entities that would get hit.

Entity collision

This section is a work in progress.
 
Please help expand and improve it. The talk page may contain suggestions.

Throwable projectiles

Throwable projectiles (Ender pearl, snowball, egg, potion, experience bottle, eye of ender) treat entities as being 0.6 blocks larger than they actually are in every axis (0.3 in every direction). They collide with all living entities, all minecart types, boats, end crystals, falling blocks, and tnt.

To calculate the collision, the game uses the following process:

  • Make a box from the current tick's position to next tick's position
  • Inflate it by 1 in every direction
  • Get every entity in the box
  • For each entity:
    • Inflate it by 0.3 in every direction
    • Check if it intersects the line connecting the current position and the next position
    • Keep the intersection if it's the closest to the projectile so far, otherwise throw it out

Abstract arrows and abstract hurting projectiles

Abstract arrows (Arrow, tipped arrow, spectral arrow, trident) and abstract hurting projectiles (Fireball, dragon fireball, wind charge, wither skull, dangerous wither skull) use a raycast to calculate entity collisions, and don't inflate entities like ThrowableProjectiles.[verify]

Block collisions

All blocks collisions are checked using a raycast from the projectile's current position to its next position, which hits the block's collision box, with a few special cases:

  • The top of scaffolding is only hit if the projectile begins its movement below it, because that collision box only exists for entities that are above it.
  • Walls, fences, moving pistons, the back of piston arms, and other blocks whose collision box extends beyond a full cube are only seen by the projectile if the raycast intersects the full cube space where the block is actually located.
  • End portal blocks and exit portal blocks have no hard hitbox, so projectiles will only enter if they tick inside the portal blocks.

Ender pearl specific block collisions

An image split in half vertically, with the top half showing the Overworld and the bottom half showing the Nether, both from a top-down view. In both halves, there is an identical setup featuring a command block, 10 blocks placed diagonally up and right representing the velocity of the pearl, and a nether portal (facing such that you can enter from the left) intersecting the path. In the Overworld side the pearl is on the command block and hasn't ticked yet. In the nether side, the pearl is 10 blocks right of the command block, and aligned into the top frame of the portal. This is the position in which it enters the nether, and it will continue moving up-right from here.
An ender pearl is summoned over a command block in the Overworld with motion [10, 0, 10]. It finds a Nether portal in its path and is sent to the nether as if it had entered from its final position.
  • If a pearl hits a Nether portal, it is sent to the nether. If the pearl would have hit other blocks after the portal, that collision position is used as the position where the pearl entered the portal. Otherwise, the final position it would've ended at is used. See Nether portal for more details on how entities get placed after going through portals.
  • If a pearl hits an End gateway, it teleports the player as if the player had gone into the gateway. The pearl itself is deleted.

Data values

ID

Java Edition:

EntityIdentifierTranslation key
EntitySprite fireball.png: Sprite image for fireball in Minecraft Fireballfireballentity.minecraft.fireball
EntitySprite small-fireball.png: Sprite image for small-fireball in Minecraft Small Fireballsmall_fireballentity.minecraft.small_fireball
EntitySprite dragon-fireball.png: Sprite image for dragon-fireball in Minecraft Dragon Fireballdragon_fireballentity.minecraft.dragon_fireball
EntitySprite firework-rocket.png: Sprite image for firework-rocket in Minecraft Firework Rocketfirework_rocketentity.minecraft.firework_rocket
EntitySprite llama-spit.png: Sprite image for llama-spit in Minecraft Llama Spitllama_spitentity.minecraft.llama_spit
EntitySprite arrow.png: Sprite image for arrow in Minecraft Arrowarrowentity.minecraft.arrow
EntitySprite spectral-arrow.png: Sprite image for spectral-arrow in Minecraft Spectral Arrowspectral_arrowentity.minecraft.spectral_arrow
EntitySprite shulker-bullet.png: Sprite image for shulker-bullet in Minecraft Shulker Bulletshulker_bulletentity.minecraft.shulker_bullet
EntitySprite bottle-o'-enchanting.png: Sprite image for bottle-o'-enchanting in Minecraft Thrown Bottle o' Enchantingexperience_bottleentity.minecraft.experience_bottle
EntitySprite egg.png: Sprite image for egg in Minecraft Thrown Eggeggentity.minecraft.egg
EntitySprite ender-pearl.png: Sprite image for ender-pearl in Minecraft Thrown Ender Pearlender_pearlentity.minecraft.ender_pearl
EntitySprite eye-of-ender.png: Sprite image for eye-of-ender in Minecraft Eye of Endereye_of_enderentity.minecraft.eye_of_ender
EntitySprite snowball.png: Sprite image for snowball in Minecraft Snowballsnowballentity.minecraft.snowball
EntitySprite splash-potion.png: Sprite image for splash-potion in Minecraft Splash Potionsplash_potionentity.minecraft.splash_potion
EntitySprite lingering-potion.png: Sprite image for lingering-potion in Minecraft Lingering Potionlingering_potionentity.minecraft.lingering_potion
EntitySprite trident.png: Sprite image for trident in Minecraft Tridenttridententity.minecraft.trident
EntitySprite wind-charge.png: Sprite image for wind-charge in Minecraft Wind Chargewind_chargeentity.minecraft.wind_charge
EntitySprite wind-charge.png: Sprite image for wind-charge in Minecraft Wind Chargebreeze_wind_chargeentity.minecraft.breeze_wind_charge
EntitySprite wither-skull.png: Sprite image for wither-skull in Minecraft Wither Skullwither_skullentity.minecraft.wither_skull

Bedrock Edition:

EntityIdentifierNumeric ID Translation key
EntitySprite ice-bomb.png: Sprite image for ice-bomb in Minecraft Ice Bombice_bomb106entity.ice_bomb.name
EntitySprite fireball.png: Sprite image for fireball in Minecraft Fireballlarge_fireball85entity.large_fireball.name
EntitySprite small-fireball.png: Sprite image for small-fireball in Minecraft Small Fireballsmall_fireball94entity.small_fireball.name
EntitySprite dragon-fireball.png: Sprite image for dragon-fireball in Minecraft Dragon Fireballdragon_fireball79entity.dragon_fireball.name
EntitySprite firework-rocket.png: Sprite image for firework-rocket in Minecraft Firework Rocketfireworks_rocket79entity.fireworks_rocket.name
EntitySprite llama-spit.png: Sprite image for llama-spit in Minecraft Llama Spitllama_spit102entity.llama_spit.name
EntitySprite arrow.png: Sprite image for arrow in Minecraft Arrowarrow80entity.arrow.name
EntitySprite shulker-bullet.png: Sprite image for shulker-bullet in Minecraft Shulker Bulletshulker_bullet76entity.shulker_bullet.name
EntitySprite bottle-o'-enchanting.png: Sprite image for bottle-o'-enchanting in Minecraft Bottle o' Enchantingxp_bottle68entity.xp_bottle.name
EntitySprite egg.png: Sprite image for egg in Minecraft Eggegg82entity.egg.name
EntitySprite ender-pearl.png: Sprite image for ender-pearl in Minecraft Ender Pearlender_pearl87entity.ender_pearl.name
EntitySprite eye-of-ender.png: Sprite image for eye-of-ender in Minecraft Eye of Endereye_of_ender_signal70entity.eye_of_ender_signal.name
EntitySprite snowball.png: Sprite image for snowball in Minecraft Snowballsnowball81entity.snowball.name
EntitySprite splash-potion.png: Sprite image for splash-potion in Minecraft Splash Potionsplash_potion86entity.splash_potion.name
EntitySprite lingering-potion.png: Sprite image for lingering-potion in Minecraft Lingering Potionlingering_potion101entity.lingering_potion.name
EntitySprite trident.png: Sprite image for trident in Minecraft Tridentthrown_trident73entity.thrown_trident.name
EntitySprite wind-charge.png: Sprite image for wind-charge in Minecraft Wind Chargewind_charge_projectile143entity.wind_charge_projectile.name
EntitySprite wind-charge.png: Sprite image for wind-charge in Minecraft Wind Chargebreeze_wind_charge_projectile141entity.breeze_wind_charge_projectile.name
EntitySprite wither-skull.png: Sprite image for wither-skull in Minecraft Wither Skullwither_skull89entity.wither_skull.name
EntitySprite dangerous-wither-skull.png: Sprite image for dangerous-wither-skull in Minecraft Wither Skullwither_skull_dangerous91entity.wither_skull_dangerous.name

History

Java Edition Classic
0.24_SURVIVAL_TESTAdded arrows.
Java Edition
1.915w31aProjectile motion has now been changed slightly.[1]
15w49aProjectiles now take the thrower's momentum into account when the player is falling, flying with elytra, or taking knockback; but not when the player is walking, riding an entity, or flying in Creative mode.
1.21.625w19aProjectiles now have a target tolerance margin that changes over time.
Pocket Edition Alpha
v0.3.3Added arrows.
Bedrock Edition
1.21.90Preview 1.21.90.26Projectiles now have a target tolerance margin that changes over time.
Legacy Console Edition
Xbox 360Xbox OnePS3PS4PS VitaWii USwitch
TU46CU361.381.381.38Patch 151.0.1Projectiles now take the thrower's momentum into account.

Issues

Issues relating to "Projectile" are maintained on the bug tracker. Issues should be reported and viewed there.

See also

References

Navigation