A projectile is an entity that can be fired, shot, or thrown by mobs, other entities, dispensers, and players. Projectiles can also be summoned using /summon.
๐ Image "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.
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.
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.
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.
โ abcdExplosive projectiles and wind charges are not affected by gravity but instead get acceleration from getting damaged.
โTerminal velocity is given by if drag is before acceleration and otherwise.
โFor axes with no acceleration, maximum travel distance is given by if position is before drag and otherwise. Table values are the number that, when multiplied by the initial velocity, gives the maximum travel distance.
โThe order of throwable projectiles was changed in Java Edition 1.21.2, from "Position, Drag, Acceleration" to "Acceleration, Drag, Position".
โ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.
Given a target coordinate and an initial speed, calculate the entity launch angle to hit the target. Target is hit after ticks.
X
10
Yaw
deg
Y
10
Pitch
degUnreachable 1Direct hit
Z
10
Speed
3 m/tick
โ abYaw and pitch follow the Minecraft's convention, thus zero yaw is directed at +Z (south) and looking upwards corresponds to negative values of pitch.
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.
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.
Projectiles 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.