Explosion: Difference between revisions

Jump to navigation Jump to search
Content added Content deleted
(→‎Blast resistance: Added creaking heart.)
mNo edit summary
Line 24: Line 24:
<math>\begin{bmatrix} \frac{1}{2}\left(1-\frac{\lfloor2\cdot\text{width}+1\rfloor}{2\cdot\text{width}+1}\right) \\ 0 \\ \frac{1}{2}\left(1-\frac{\lfloor2\cdot\text{length}+1\rfloor}{2\cdot\text{length}+1}\right) \end{bmatrix}</math>
<math>\begin{bmatrix} \frac{1}{2}\left(1-\frac{\lfloor2\cdot\text{width}+1\rfloor}{2\cdot\text{width}+1}\right) \\ 0 \\ \frac{1}{2}\left(1-\frac{\lfloor2\cdot\text{length}+1\rfloor}{2\cdot\text{length}+1}\right) \end{bmatrix}</math>


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. Exposure is currently directionally biased (and the ray targets can sometimes be outside the entity) due to bug {{Bug|MC-232355}}.
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. Exposure is currently directionally biased (and the ray targets can sometimes be outside the entity) due to bug {{Bug|MC-232355}}.


The '''impact''' for an entity can then be calculated with the following formula:
The '''impact''' for an entity can then be calculated with the following formula:

Revision as of 00:38, 14 January 2025

"Exploding" redirects here. For the enchantment, see MCD:Exploding.
A TNT explosion.
"Boom" redirects here. For the cosmetic, see MCD:Boom.

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. Explosives include ghast fireballs, TNT, end crystals, and beds when not in the Overworld.

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 is 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

2width+1 by 2height+1 by 2length+1 grid of points, spaced by

[width2width+1height2height+1length2length+1]

With the negative corner at

[12(12width+12width+1)012(12length+12length+1)]

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. Exposure is currently directionally biased (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:

(1distance2power)exposure(10.15highest blast protection level)

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:

(Easy:3.5Normal:7Hard:10.5)power(impact+impact2)+1

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

Comparison of explosion craters, from a charged creeper (left), TNT (center) and regular creeper (right).
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 the blocks affected, "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 power(random value from 0.7 to 1.3).

For each ray, with the position starting at the explosion center:

  1. The game checks the block at the current position (this ignores block shape).
  2. If the block isn't air, intensity is reduced by (blast resistance+0.3)0.3.
  3. 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.
  4. Position is moved 0.3 blocks along the ray.
  5. Intensity is reduced by 0.22500001.
  6. 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 13 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

Blocks destroyed by explosions have a chance to drop items as if mined with an unenchanted diamond tool. Blocks destroyed by TNT have a 100% chance of dropping. Other explosions have a 1power chance of dropping items. However, dragon eggs, beacons, conduits, heads, shulker boxes and decorated pots[1] always drop from explosions.

The drop chance of blocks in explosions can be customized via three game rules: blockExplosionDropDecay[JE only] (includes end crystals), mobExplosionDropDecay[JE only] 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.

in Bedrock Edition, worlds created before 1.21 retain their old tntExplosionDropDecay settings. Upgraded worlds need to use /gamerule tntExplosionDropDecay false to get the new behavior. [2]

Causes

Cause Power Max. blast resistance Max. range Fire Affected by mobGriefing Notes
Fireball (ghast projectile) 1 3 Entity: 2
Block: 1.5
Yes Yes
Black wither skull
Dangerous wither skull
1 3 Entity: 2
Block: 1.5
No Yes Dangerous wither skull:
Treats blocks breakable in Survival as having ≤ 0.8 blast resistance.
Creeper 3 9 Entity: 6
Block: 5.1
No Yes
TNT
Underwater TNT[BE & edu only]
4 9 Entity: 8
Block: 6.9
No No Underwater TNT[BE & edu only]:
Ignores Water
The explosion center is approximately 0.06125 blocks above the TNT's position.
Beds
Respawn anchor
(when used in a wrong dimension)
5 9 Entity: 10
Block: 8.4
Yes No Death message:
"(player) was killed by [Intentional Game Design]"
End crystal (when destroyed) 6 9 Entity: 12
Block: 10.2
No No
Charged creeper 6 9 Entity: 12
Block: 10.2
No Yes Drops heads or skulls of mobs killed by explosion.
Wither (when spawned, or when killed‌[BE only]) 7 9 Entity: 14
Block: 12
No Yes
Wither
(half health charge move)‌[BE only]
8 -- Entity: 16
Block: 13.8
No Yes Breaks any block breakable in Survival (except reinforced deepslate), ignoring blast resistance.

Despite doing damage to entities, fireworks do not destroy terrain and as such are not counted as conventional explosions.

Lab tables sometimes perform a non-terrain-damaging explosion when creating garbage item.‌[BE & edu only]

Blast resistance

"Blast resistance" redirects here. For the enchantment, see Blast Protection.
Not to be confused with Hardness.

The following table shows blast resistance values for blocks as shown in Minecraft's code. 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.

[edit values]

Block name Blast resistance
Barrier 3,600,000.75
Light 3,600,000.75
Bedrock 3,600,000
Command Blocks 3,600,000
End Gateway 3,600,000
End Portal 3,600,000
End Portal Frame 3,600,000
Jigsaw Block 3,600,000
Structure Block 3,600,000
Ancient Debris 1,200
Anvil 1,200
Block of Netherite 1,200
Crying Obsidian 1,200
Respawn Anchor 1,200
Enchanting Table 1,200
Obsidian 1,200
Reinforced Deepslate 1,200
Ender Chest 600
Bubble Column 100
Lava 100
Water 100
Ominous Trial Spawner 50
Ominous Vault 50
Trial Spawner 50
Vault 50
Heavy Core 30
Creaking Heart 10
Dragon Egg 9
End Stone 9
End Stone Bricks 9
End Stone Brick Wall 9
Andesite 6
Blackstone 6
Block of Coal 6
Block of Copper 6
Block of Diamond 6
Block of Emerald 6
Block of Gold 6
Block of Iron 6
Block of Raw Copper 6
Block of Raw Gold 6
Block of Raw Iron 6
Block of Redstone 6
Bricks 6
Brick Stairs 6
Chain 6
Chiseled Deepslate 6
Cobbled Deepslate 6
Cobblestone 6
Cobblestone Stairs 6
Coral Blocks 6
Deepslate 6
Deepslate Bricks 6
Deepslate Tiles 6
Diorite 6
Gilded Blackstone 6
Granite 6
Grindstone 6
Iron Bars 6
Jukebox 6
Lightning Rod 6
Mossy Cobblestone 6
Nether Bricks 6
Nether Brick Fence 6
Nether Brick Stairs 6
Polished Deepslate 6
Prismarine 6
Purpur Block 6
Purpur Pillar 6
Purpur Slab 6
Purpur Stairs 6
Red Nether Bricks 6
Smooth Quartz Block 6
Smooth Quartz Slab 6
Smooth Quartz Stairs 6
Smooth Stone 6
Stone 6
Stone Bricks 6
Stone Brick Stairs 6
Stone Slab 6
Stone Walls (except End, Sandstone) 6
Tuff 6
Bell 5
Iron Door 5
Iron Trapdoor 5
Monster Spawner 5
Hopper 4.8
Basalt 4.2
Polished Basalt 4.2
Smooth Basalt 4.2
Stained Terracotta 4.2
Terracotta 4.2
Cobweb 4
Lodestone 3.5
Blast Furnace 3.5
Dispenser 3.5
Dropper 3.5
Furnace 3.5
Lantern 3.5
Soul Lantern 3.5
Smoker 3.5
Stonecutter 3.5
Block name Blast resistance
Observer 3
Beacon 3
Block of Lapis Lazuli 3
Coal Ore 3
Cocoa Beans 3
Conduit 3
Copper Ore 3
Deepslate Coal Ore 3
Deepslate Copper Ore 3
Deepslate Diamond Ore 3
Deepslate Emerald Ore 3
Deepslate Gold Ore 3
Deepslate Iron Ore 3
Deepslate Lapis Lazuli Ore 3
Deepslate Redstone Ore 3
Diamond Ore 3
Emerald Ore 3
Gold Ore 3
Iron Ore 3
Lab Table 3
Lapis Lazuli Ore 3
Mud Bricks 3
Nether Quartz Ore 3
Packed Mud 3
Planks 3
Pointed Dripstone 3
Redstone Ore 3
Sculk Catalyst 3
Sculk Shrieker 3
Wooden Fences 3
Fence Gates 3
Wooden Doors 3
Wooden Slabs 3
Wooden Stairs 3
Wooden Trapdoors 3
Blue Ice 2.8
Barrel 2.5
Cartography Table 2.5
Chest 2.5
Crafting Table 2.5
Dried Kelp Block 2.5
Fletching Table 2.5
Lectern 2.5
Loom 2.5
Smithing Table 2.5
Trapped Chest 2.5
Bone Block 2
Campfire 2
Soul Campfire 2
Cauldron 2
Compound Creator 2
Shulker Box 2
Dyed Shulker Box 2
Wood 2
Concrete 1.8
Amethyst Bud 1.5
Amethyst Cluster 1.5
Block of Amethyst 1.5
Bookshelf 1.5
Budding Amethyst 1.5
Sculk Sensor 1.5
Glazed Terracotta 1.4
Bamboo 1
Banners 1
Dripstone Block 1
Jack o'Lantern 1
Heads 1
Nether Wart Block 1
Pumpkin 1
Shroomlight 1
Signs 1
Warped Wart Block 1
Block of Quartz 0.8
Note Block 0.8
Quartz Stairs 0.8
Red Sandstone 0.8
Red Sandstone Stairs 0.8
Sandstone 0.8
Sandstone Stairs 0.8
Sandstone Wall 0.8
Wool 0.8
Calcite 0.75
Infested Blocks 0.75
Activator Rail 0.7
Detector Rail 0.7
Powered Rail 0.7
Rail 0.7
Mangrove Roots 0.7
Muddy Mangrove Roots 0.7
Dirt Path 0.65
Beehive 0.6
Clay 0.6
Composter 0.6
Farmland 0.6
Grass Block 0.6
Gravel 0.6
Honeycomb Block 0.6
Sponge 0.6
Wet Sponge 0.6
Mycelium 0.6
Block name Blast resistance
Brewing Stand 0.5
Buttons 0.5
Cake 0.5
Coarse Dirt 0.5
Concrete Powder 0.5
Dirt 0.5
Frosted Ice 0.5
Hay Bale 0.5
Ice 0.5
Lever 0.5
Magma Block 0.5
Mud 0.5
Packed Ice 0.5
Piston 0.5
Piston Head 0.5
Podzol 0.5
Pressure Plates 0.5
Rooted Dirt 0.5
Sand 0.5
Soul Sand 0.5
Soul Soil 0.5
Sticky Piston 0.5
Target 0.5
Turtle Egg 0.5
Cactus 0.4
Chorus Flower 0.4
Chorus Plant 0.4
Ladder 0.4
Netherrack 0.4
Nylium 0.4
Bee Nest 0.3
Froglight 0.3
Glass 0.3
Glass Pane 0.3
Glowstone 0.3
Redstone Lamp 0.3
Sea Lantern 0.3
Stained Glass 0.3
Stained Glass Panes 0.3
Tinted Glass 0.3
Powder Snow 0.25
Beds 0.2
Daylight Detector 0.2
Glow Lichen 0.2
Leaves 0.2
Mushroom Blocks 0.2
Sculk 0.2
Sculk Vein 0.2
Snow Block 0.2
Vines 0.2
Candle 0.1
Dyed Candle 0.1
Carpets 0.1
Big Dripleaf 0.1
Moss Block 0.1
Moss Carpet 0.1
Snow 0.1
Air 0
Azalea 0
Beetroots 0
Carrots 0
Cave vines 0
Colored Torch 0
Corals 0
Coral Fans 0
Dead Bush 0
Element 0
End Rod 0
Fire 0
Flowers 0
Flower Pot 0
Frogspawn 0
Fungus 0
Grass 0
Hanging Roots 0
Honey Block 0
Kelp 0
Lily Pad 0
Locked chest 0
Melon Stem 0
Moving Piston 0
Mushrooms 0
Nether Sprouts 0
Nether Wart 0
Potatoes 0
Pumpkin Stem 0
Redstone Dust 0
Redstone Comparator 0
Redstone Repeater 0
Redstone Torch 0
Crimson Roots 0
Warped Roots 0
Saplings 0
Scaffolding 0
Seagrass 0
Sea Pickle 0
Slime Block 0
Small Dripleaf 0
Soul Fire 0
Spore Blossom 0
Structure Void 0
Sugar Cane 0
Sweet Berry Bush 0
TNT 0
Torch 0
Soul Torch 0
Tripwire 0
Tripwire Hook 0
Twisting Vines 0
Underwater Torch 0
Underwater TNT 0
Weeping Vines 0
Wheat 0
Nether Portal 0

Sounds

Java Edition

[hide]Sounds
SoundSubtitlesSourceDescriptionResource locationTranslation keyVolumePitchAttenuation
distance
​ExplosionBlocksWhen something explodesentity.generic.explodesubtitles.entity.generic.explode4.00.56-0.8416

Bedrock Edition:

[hide]Sounds
SoundSourceDescriptionResource locationVolumePitch
BlocksWhen something explodesrandom.explode4.01.0

History

This section is missing information about: New Nintendo 3DS Edition.
 
Please expand the section to include this information. Further details may exist on the talk page.
May 21, 2009Notch shows interest in adding an explosive block.
[hide]Java Edition Classic
0.24_SURVIVAL_TESTAdded creepers.
October 24, 2009Showed off TNT.
0.26 SURVIVAL TESTAdded TNT.
[hide]Java Edition Indev
0.3120100122Explosions are now "better".
20100125-1Explosions now lose power when going through stronger materials.
[hide]Java Edition Alpha
v1.2.0previewAdded ghasts, which shoot explosive fireballs.
[hide]Java Edition Beta
1.5Creepers now become charged when struck by lightning, increasing the explosion's radius and strength.
1.6Test Build 3When the player tries to sleep in the Nether, they now cause the bed to explode.
1.8Pre-releaseExplosions now emit shockwave particles. Prior to Beta 1.8, explosions emitted only smoke.
Sound UpdateThe 'Sound Update' on November 11th, 2011 gave TNT a new explosion sound.
[hide]Java Edition
1.0.0Beta 1.9 Prerelease 3Bed and fireball explosions now cause fires.
Beta 1.9 Prerelease 4When the player tries to sleep in the End, they now cause the bed to explode.
Enchantment Blast Protection added, which can enhance an armor's resistance against explosions.
Beta 1.9 Prerelease 6End crystals added, which can be destroyed with a melee or hit with an arrow or snowball, causing an explosion.
1.3.112w24aFixed the issue of explosions not propelling players.
12w30aExplosions now damage the player different amounts on different difficulties. However, no damage is dealt to the player on Peaceful.
1.4.212w34aAdded the wither, which shoots black wither skulls.
12w37aAn emergent wither now makes a massive explosion when its health is fully charged.
Blue wither skulls added.
12w38bNew creeper fall mechanics have been added. Creepers now explode if they fall on the player from a certain height.
1.5?Destroyed blocks now have a 1/power chance of dropping as items; previously it was a fixed 30% chance.
?The Nether's biome now controls whether beds explode. As such, superflat worlds with this biome set have beds exploding in the Overworld. It is not known if Overworld biomes in the Nether allow sleeping as a result of this.​[more information needed]
1.8.2pre1Explosions are no longer directionally biased.
pre7Explosions no longer deal knockback to players in creative mode even if they are not flying.
1.916w02aExplosions once again deal knockback to players in creative mode but only if they are not flying.
1.1419w11aDestroyed blocks from TNT or minecart with TNT explosions now have a 100% chance of dropping as items.
1.15pre1Explosions no longer create smoke particles.[3]
1.1620w12aAdded respawn anchors, which explode in a similar fashion to a bed, if charged and used in the Overworld and the End dimensions.
20w18aThe nether wastes biome no longer allows for beds to explode in the Overworld.[4][more information needed]
1.16.2?Custom dimensions can specify whether beds and/or respawn anchors explode when used,
1.19.322w44aAdded the following game rules:
  • blockExplosionDropDecay
  • mobExplosionDropDecay
  • tntExplosionDropDecay
[hide]Pocket Edition Alpha
v0.1.0Added TNT.
v0.2.1TNT now actually explodes.
v0.4.0Added creepers.
v0.12.1?Creepers now become charged when struck by lightning, increasing the explosion's radius and strength.
Added ghasts, which shoot explosive fireballs.
Enchantment Blast Protection added, which can enhance an armor's resistance against explosions.
When the player tries to sleep in the Nether, they cause beds to explode.
?Added explosion particles.
TNT now uses a new explosion sound.
v0.14.0?An invalid mixture of liquids in cauldrons now result in a non-damaging explosion effect.
v0.16.0build 4Withers added.
[hide]Pocket Edition
1.0.0alpha 0.17.0.1End crystals added.
When the player tries to sleep in the End, they now cause the bed to explode.
1.0.7Explosions no longer deal damage to a player, if the explosion is in water.
[hide]Bedrock Edition
1.4.0beta 1.2.20.1Creating garbage in lab table sometimes causes explosion sound.
Added underwater TNT, which can damage terrain underwater.
?Removed the non-damaging explosion effect from cauldrons, replaced with a hiss and smoke.
1.21.0Preview 1.21.0.20Added the game rule tntExplosionDropDecay.
TNT explosions now have a 100% item drop rate by default.[5]
[hide]Legacy Console Edition
Xbox 360Xbox OnePS3PS4PS VitaWii USwitch
TU1CU11.001.001.00Patch 11.0.1Added tnt and creepers, which can explode.
TU7Enchantment Blast Protection added, which can enhance an armor's resistance against explosions.
TU9End crystals added, which can be destroyed with a melee or hit with an arrow or snowball, causing an explosion.
TU141.04Explosions now damage the player different amounts on different difficulties. However, no damage is dealt to the player on Peaceful.
TU19CU71.121.121.12Added the wither, which shoots black wither skulls and Blue wither skulls.
TU43CU331.361.361.36Patch 13Explosions no longer deal knockback to players, which are flying in creative mode.

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 and damage 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.

References

Navigation