Explosion

An explosion is a physical event, generally destructive, that occurs in several different circumstances. It can destroy nearby blocks, propel and damage nearby entities, and cause fires in some cases. Explosions produce a "shockwave" particle effect.
The propulsion effect of explosions is often used for TNT cannons.
== Interaction with entities ==
This feature is exclusive to Java Edition. 
=== Exposure and impact calculation ===
The sample points for the exposure calculation of TNT.
The explosion impact will be used to calculate entity knockback and damage, and it depends on exposure. Impact is stronger the closer and less obstructed the entity is to the explosion.
To calculate the exposure of an entity, rays are cast from the explosion center to a
by  by  grid of points, spaced by
With the negative corner at
For each ray, the game checks if it intersects with any block-hitbox. The exposure is the proportion of rays that remain unobstructed, and ranges from 0 to 1. These rays go from the entity to the explosion, so Scaffolding blocks exposure when the explosion is below and the entity is above. Note that exposure is currently directional (and the ray targets can sometimes be outside the entity) due to bug MC-232355.
The impact for an entity can then be calculated with the following formula:
With the distance measured from the explosion to the entity's feet position. See the Causes subsection for a list of explosion powers, and see Blast Protection for more information about blast protection.
=== Velocity ===
Each entity within range of an explosion is propelled away from it along the ray from the explosion center to the eyes of the entity, except TNT entities, where the ray goes to the feet of the TNT entity. The magnitude of this applied velocity is the impact.
Each affected entity is accelerated by between 0 and 1 blocks per game tick (0 to 20 blocks per second), added to its current velocity. This effect can accumulate over multiple explosions, even within a single tick.
=== Damage ===
Entities are damaged differently depending on difficulty. At the end of each game tick the highest amount of damage from all explosions is chosen.
The following term can be used to calculate the damage inflicted on an entity:
The Blast Protection enchantment and Resistance effect are handled separately. Explosions don't damage players in Peaceful difficulty. Nether stars cannot be destroyed by explosions.
== Block destruction ==
The rays from the explosion center to points that are uniformly distributed on the surface of a cube. (this defines only their directions)
On a small scale explosions form a roughly spherical crater. The size of that crater is dependent on the power of the explosion and the blast resistance of the destroyed blocks.
=== Calculating which blocks to destroy ===
To calculate which blocks will blow up, "rays" are created from the explosion center to the outer points of a 16 by 16 by 16 grid. Each of those rays gets an intensity of .
For each ray, with the position starting at the explosion center:
# The game checks the block at the current position (note that this ignores block shape).
# If the block isn't air, intensity is reduced by .
# If the remaining intensity is above 0 and the block can be blown up, it gets added to the list of blocks to blow up.
# Position is moved 0.3 blocks along the ray.
# Intensity is reduced by 0.22500001.
# If the remaining intensity is above 0, repeat from step 1. Otherwise, continue with the next ray.
After the process is done, the list of blocks to blow up is shuffled. For explosions that can cause fires, the game attempts to generate fire in 1⁄3 of the blocks in the list. This fire is successfully placed only when above an opaque block.
Due to the fact that the game ignores block shapes when checking blast resistance, explosions happening inside a non-full block get dampened heavily. Sufficiently weak explosions happening on Ender Chests, Enchanting Tables, or any height of Water or Lava do no block damage.
=== Dropping blocks ===
In Java Edition, the drop chance of blocks in explosions can be customized via three game rules: blockExplosionDropDecay (includes End Crystals), mobExplosionDropDecay and tntExplosionDropDecay. Only tntExplosionDropDecay is set to false by default. If an explosion's drop decay is set to false, items have a 100% chance of dropping. Otherwise, items have a 1⁄power chance of dropping. However, Dragon Eggs, Beacons, Conduits, Heads, Shulker Boxes and Decorated Pots always drop from explosions.
In Bedrock Edition, explosions all have a <100% chance of dropping blocks.
== Blast resistance ==
"Blast resistance" redirects here. For the enchantment, see Blast Protection.
Not to be confused with Hardness.
In Add-on documentation for Bedrock Edition, these values are multiplied by 5 when used for the "explosion_resistance" value in the "minecraft:descructible_by_explosion" component.
== Trivia ==
* Explosions with a power greater than 100 look mostly the same from the outside, as only certain lines are used to determine if a block breaks. However, some of those lines continue underground.
* Explosions that occur in flowing water or lava apply propulsion to entities, but don't affect any blocks, regardless of the blocks' blast resistance.
* Underwater explosions don't emit smoke particles.
* Explosions can redirect projectiles, including ender pearls.
* An explosion just after a mob's death can propel the mob's body.
* If a falling sand entity falls into primed TNT when in water, it deals block damage.
Category:Minecraft
Category:Game Mechanic
Category:Destruction
Category:Physical Event
Category:0.24 SURVIVAL TEST
Category:Java Edition Classic