Explosion

Από Minecraft Wiki
Μετάβαση σε: πλοήγηση, αναζήτηση
A TNT explosion.

An explosion is a physical event, generally destructive, that can be caused by several different circumstances. It can destroy nearby blocks, propel and damage nearby players, entities, and their armor, and cause one or more fires under correct circumstances. Explosions produce a "shockwave" particle effect.

Multiple close explosions may propel objects further, but have no cumulative effect on the destruction of a block. This is because explosions' damage to blocks is evaluated individually (per explosion), and blocks' blast resistance does not become "weakened" per explosion.

"Destroyed" blocks have a chance of dropping as collectible resources (and otherwise disappear), and this chance is 1p, where p is the explosion power. So, a creeper blast (uncharged) will have a 13 chance of dropping a block.

The propulsion effect of explosions is often used for TNT cannons, and can also be used to shoot out gravity affected blocks.

Explosion strength[επεξεργασία | επεξεργασία κώδικα]

Explosion Type Power Notes

Wither
(when created)
7

Ender crystal
(when attacked)
6

Charged creeper
6

Bed
(when used in the Nether or the End)
5 Starts fires

TNT
4

Creeper
3

Ghast
fireball
1 Starts fires

Black wither skull
1

Blue wither skull
1 Treats blast radius blocks (except bedrock, end portal frames, and barriers) as having a blast resistance of no more than 4.

Effect[επεξεργασία | επεξεργασία κώδικα]

Model of block destruction[επεξεργασία | επεξεργασία κώδικα]

1352 rays from the explosion center to points that uniformly distributed on the surface of a cube centered at the explosion with an edge length of 2. (However, this only defines their directions, not their length)
The roughly spherical pattern of blocks destroyed can be seen here (note that a resource pack is being used in order to more clearly see the pattern through the glass).

An explosion can destroy nearby blocks. Its blast effect is evaluated independently on many explosion rays originating from the explosion center, as shown in the right figure.

An explosion must be very powerful (power ~1542860) to destroy a bedrock block
  1. A cube around the explosion is divided into a 16×16×16 grid, and rays are created from the center to each outer point of this grid
  2. Each ray is given an intensity, calculated as (0.7 + [a random value from 0 to 0.6]) × [power]
  3. For every 0.3 blocks along the ray, the intensity of the ray decays/is attenuated by 0.3×0.75 (0.225), and the block it passes through absorbs/reduces it by ([blast resistance/5]+0.3)×0.3
  4. The ray destroys all blocks that could not end the ray at any checkpoint

From the above process, the following results can be deduced (where ⌊x⌋ is the floor function):

  • The blast radius in the air of an explosion (i.e. only attenuated, not absorbed by blocks) = Blast radius in the air.svg == 10.2 (charged creepers), 6.9 (TNT), 5.1 (creepers), 1.5 (fireballs). For example, a TNT explosion can destroy a torch 7 blocks away. But how many blocks an explosion can destroy is non-deterministic and also dependent on the specific location of the explosion.
  • The minimum block resistance required to absorb maximum blast force of an explosion happening in nearby air = ((1.3 × power − attenuation steps × step length × 0.75)/step length − 0.3) × 5. To not be destroyed, a block has to absorb all blast force at the first checkpoint in it.
    • The attenuation steps is subject to collision restrictions. For explosion in air, there is at least one attenuation step. TNT and creeper explosion are always 0.49 and 0.5 meter away from nearest block (2 att. steps), but fireball explosion can happen anywhere (1 att. step).
    • Thus, the block resistances are 121.00 (charged creepers), 77.67 (TNT), 56.00 (creepers), 16.42 (fireballs).
    • So water, lava (Note: Only the stationary block) obsidian, and bedrock are always indestructible, and fences and less blast-resistant blocks can be destroyed by fireballs. These are theoretical values, and in reality less resistant blocks are not always destroyed, and since Minecraft is supposed to be simple, there is no such mechanic.

Interaction with entities[επεξεργασία | επεξεργασία κώδικα]

An explosion has different effects on entities than blocks. Entities are damaged and propelled by an explosion if within its damage radius of 2 × power. Note that the "damage radius" is different from the blast radius of explosion effect on blocks.

  1. For every entity within a 2×[power] block sphere of the explosion center, the impact is (1-[distance from explosion/power/2])×[exposure] (see section below on exposure)
  2. The entity is damaged by (impact×impact+impact)×8×power+1 (armor enchantments for damage are handled separately)
  3. After damage, exposure is reduced by (exposure×[max blast protection from all armor]×0.15)
  4. The entity's eyes are propelled along the ray from the explosion center by the new exposure

From the above process, the following results can be deduced:

  • Entities will always get at least 1 point of damage if they are within the radius, regardless of their explosion exposure.
  • The maximum damage that entities can take (at the explosion center with 100% exposure) = (1 × 1 + 1) × 8 × power + 1 point of damage = 97 (charged creeper), 65 (TNT), 49 (creepers), 17 (fireballs). When entities are away or covered by blocks from the explosion center, they take less damage.
  • The maximum velocity gain that an entity can obtain from a TNT explosion is 1, at the explosion center with 100% exposure.
A primed TNT AABB has directionally asymmetrical sample points (1/2.96 spacing) because of rounding.

Calculation of explosion exposure[επεξεργασία | επεξεργασία κώδικα]

  1. The entity's bounding box is divided into a [2×width+1] by [2×height+1] by [2×depth+1] grid of unequally spaced points
  2. A ray is drawn from the explosion center to each point
  3. The exposure of the entity is the percentage of these rays that are unobstructed

The approximation algorithm has sampling error that results in directional asymmetry of propulsion. For example, a typical TNT cannon has maximum range in the west direction partly because the primed TNT has largest sampled exposure in that direction.

Causing fire[επεξεργασία | επεξεργασία κώδικα]

If the explosion has the ability, it randomly starts fires in ⅓ of all destroyed air blocks that are above opaque blocks.

Prolonged lag[επεξεργασία | επεξεργασία κώδικα]

In addition to the initial lag from processing the explosion, which subsides once the explosion has occurred, there can also be a prolonged fallout from an explosion, that consists of dropped items, liquid-physics, and increased render-complexity of the crater. Technically the dropped items will disappear after 5 minutes, however those 5 in-game minutes may take a long time to process during extreme lag.

Using certain rules and commands can avoid this prolonged lag: setting the gamerule doTileDrops to false, for instance with /gamerule doTileDrops false, will stop dropped items from being generated by explosions. Also, the command /kill @e[type=Item] will destroy all dropped items.

Blast resistance[επεξεργασία | επεξεργασία κώδικα]

[edit values]

Block name Blast resistance

[[Barrier
Barrier
 ]]
18,000,003

[[Bedrock
Bedrock
 ]]
18,000,000

[[Structure Block
Structure Block
 ]]
18,000,000

[[Command Block
Command Block
 ]]
18,000,000

[[End Gateway Block
End Gateway Block
 ]]
18,000,000

[[End Portal (block)
End Portal
 ]]
18,000,000

[[End Portal Frame
End Portal Frame
 ]]
18,000,000

[[Anvil
Anvil
 ]]
6,000

[[Enchantment Table
Enchantment Table
 ]]
6,000

[[Obsidian
Obsidian
 ]]
6,000

[[Ender Chest
Ender Chest
 ]]
3,000

[[Flowing Water
Flowing Water
 ]]
500

[[Lava
Lava
 ]]
500

[[Water
Water
 ]]
500

[[Dragon Egg
Dragon Egg
 ]]
45

[[End Stone
End Stone
 ]]
45

[[Block of Coal
Block of Coal
 ]]
30

[[Block of Diamond
Block of Diamond
 ]]
30

[[Block of Emerald
Block of Emerald
 ]]
30

[[Block of Gold
Block of Gold
 ]]
30

[[Block of Iron
Block of Iron
 ]]
30

[[Block of Redstone
Block of Redstone
 ]]
30

[[Bricks
Bricks
 ]]
30

[[Brick Stairs
Brick Stairs
 ]]
30

[[Hardened Clay
Hardened Clay
 ]]
30

[[Andesite
Andesite
 ]]
30

[[Cobblestone
Cobblestone
 ]]
30

[[Cobblestone Stairs
Cobblestone Stairs
 ]]
30

[[Cobblestone Wall
Cobblestone Wall
 ]]
30

[[Diorite
Diorite
 ]]
30

[[Granite
Granite
 ]]
30

[[Iron Bars
Iron Bars
 ]]
30

[[Jukebox
Jukebox
 ]]
30

[[Moss Stone
Moss Stone
 ]]
30

[[Nether Brick
Nether Brick
 ]]
30

[[Nether Brick Fence
Nether Brick Fence
 ]]
30

[[Nether Brick Stairs
Nether Brick Stairs
 ]]
30

[[Prismarine
Prismarine
 ]]
30

[[Purpur Block
Purpur Block
 ]]
30

[[Purpur Pillar
Purpur Pillar
 ]]
30

[[Purpur Slab
Purpur Slab
 ]]
30

[[Purpur Stairs
Purpur Stairs
 ]]
30

[[Red Nether Brick
Red Nether Brick
 ]]
30

[[Shulker Box
Shulker Box
 ]]
30

[[Stone
Stone
 ]]
30

[[Stone Brick
Stone Brick
 ]]
30

[[Stone Brick Stairs
Stone Brick Stairs
 ]]
30

[[Stone Slabs
Stone Slabs
 ]]
30

[[Iron Door
Iron Door
 ]]
25

[[Iron Trapdoor
Iron Trapdoor
 ]]
25

[[Monster Spawner
Monster Spawner
 ]]
25

[[Cobweb
Cobweb
 ]]
20

[[Dispenser
Dispenser
 ]]
17.5

[[Dropper
Dropper
 ]]
17.5

[[Furnace
Furnace
 ]]
17.5

[[Observer
Observer
 ]]
17.5

[[Beacon
Beacon
 ]]
15

[[Coal Ore
Coal Ore
 ]]
15

[[Cocoa
Cocoa
 ]]
15

[[Diamond Ore
Diamond Ore
 ]]
15

[[Emerald Ore
Emerald Ore
 ]]
15
Block name Blast resistance

[[Fence
Fence
 ]]
15

[[Fence Gate
Fence Gate
 ]]
15

[[Gold Ore
Gold Ore
 ]]
15

[[Hopper
Hopper
 ]]
15

[[Iron Ore
Iron Ore
 ]]
15

[[Lapis Lazuli Block
Lapis Lazuli Block
 ]]
15

[[Lapis Lazuli Ore
Lapis Lazuli Ore
 ]]
15

[[Nether Quartz Ore
Nether Quartz Ore
 ]]
15

[[Redstone Ore
Redstone Ore
 ]]
15

[[Trapdoor
Trapdoor
 ]]
15

[[Wood Planks
Wood Planks
 ]]
15

[[Wooden Door
Wooden Door
 ]]
15

[[Wood Slabs
Wood Slabs
 ]]
15

[[Wood Stairs
Wood Stairs
 ]]
15

[[Chest
Chest
 ]]
12.5

[[Crafting Table
Crafting Table
 ]]
12.5

[[Trapped Chest
Trapped Chest
 ]]
12.5

[[Bone Block
Bone Block
 ]]
10

[[Cauldron
Cauldron
 ]]
10

[[Wood
Wood
 ]]
10

[[Bookshelf
Bookshelf
 ]]
7.5

[[Banner
Banner
 ]]
5

[[Jack o'Lantern
Jack o'Lantern
 ]]
5

[[Melon (block)
Melon
 ]]
5

[[Mob head
Mob head
 ]]
5

[[Nether Wart Block
Nether Wart Block
 ]]
5

[[Pumpkin
Pumpkin
 ]]
5

[[Sign
Sign
 ]]
5

[[End Stone Bricks
End Stone Bricks
 ]]
4

[[Block of Quartz
Block of Quartz
 ]]
4

[[Quartz Stairs
Quartz Stairs
 ]]
4

[[Note Block
Note Block
 ]]
4

[[Red Sandstone
Red Sandstone
 ]]
4

[[Red Sandstone Stairs
Red Sandstone Stairs
 ]]
4

[[Sandstone
Sandstone
 ]]
4

[[Sandstone Stairs
Sandstone Stairs
 ]]
4

[[Wool
Wool
 ]]
4

[[Monster Egg
Monster Egg
 ]]
3.75

[[Activator Rail
Activator Rail
 ]]
3.5

[[Detector Rail
Detector Rail
 ]]
3.5

[[Powered Rail
Powered Rail
 ]]
3.5

[[Rail
Rail
 ]]
3.5

[[Grass Path
Grass Path
 ]]
3.25

[[Clay (block)
Clay
 ]]
3

[[Farmland
Farmland
 ]]
3

[[Grass Block
Grass Block
 ]]
3

[[Gravel
Gravel
 ]]
3

[[Sponge
Sponge
 ]]
3

[[Wet Sponge
Wet Sponge
 ]]
3

[[Brewing Stand
Brewing Stand
 ]]
2.5

[[Button
Button
 ]]
2.5

[[Cake
Cake
 ]]
2.5

[[Coarse Dirt
Coarse Dirt
 ]]
2.5

[[Dirt
Dirt
 ]]
2.5

[[Frosted Ice
Frosted Ice
 ]]
2.5

[[Hay Bale
Hay Bale
 ]]
2.5

[[Ice
Ice
 ]]
2.5

[[Packed Ice
Packed Ice
 ]]
2.5

[[Lever
Lever
 ]]
2.5

[[Magma Block
Magma Block
 ]]
2.5

[[Mycelium
Mycelium
 ]]
2.5
Block name Blast resistance

[[Piston
Piston
 ]]
2.5

[[Piston#Piston_extension
Piston Extension
 ]]
2.5

[[Piston#Piston_head
Piston Head
 ]]
2.5

[[Podzol
Podzol
 ]]
2.5

[[Pressure Plate
Pressure Plate
 ]]
2.5

[[Sand
Sand
 ]]
2.5

[[Soul Sand
Soul Sand
 ]]
2.5

[[Sticky Piston
Sticky Piston
 ]]
2.5

[[Weighted Pressure Plate
Weighted Pressure Plate
 ]]
2.5

[[Cactus
Cactus
 ]]
2

[[Chorus Flower
Chorus Flower
 ]]
2

[[Chorus Plant
Chorus Plant
 ]]
2

[[Ladder
Ladder
 ]]
2

[[Netherrack
Netherrack
 ]]
2

[[Glass
Glass
 ]]
1.5

[[Glass Pane
Glass Pane
 ]]
1.5

[[Glowstone
Glowstone
 ]]
1.5

[[Redstone Lamp
Redstone Lamp
 ]]
1.5

[[Sea Lantern
Sea Lantern
 ]]
1.5

[[Stained Glass
Stained Glass
 ]]
1.5

[[Stained Glass Pane
Stained Glass Pane
 ]]
1.5

[[Bed
Bed
 ]]
1

[[Daylight Sensor
Daylight Sensor
 ]]
1

[[Huge Mushrooms
Huge Mushrooms
 ]]
1

[[Leaves
Leaves
 ]]
1

[[Snow
Snow
 ]]
1

[[Vines
Vines
 ]]
1

[[Carpet
Carpet
 ]]
0.5

[[Snow (layer)
Snow (layer)
 ]]
0.5

[[Air
Air
 ]]
0

[[Beetroot
Beetroot
 ]]
0

[[Carrot
Carrot
 ]]
0

[[Dead Bush
Dead Bush
 ]]
0

[[End Rod
End Rod
 ]]
0

[[Fire
Fire
 ]]
0

[[Flower Pot
Flower Pot
 ]]
0

[[Flowers
Flowers
 ]]
0

[[lava
Flowing Lava
 ]]
0

[[Grass
Grass
 ]]
0

[[Lily Pad
Lily Pad
 ]]
0

[[Locked chest
Locked chest
 ]]
0

[[Melon Seeds
Melon Stem
 ]]
0

[[Mushrooms
Mushrooms
 ]]
0

[[Nether Portal (block)
Nether Portal
 ]]
0

[[Nether Wart
Nether Wart
 ]]
0

[[Potato
Potato
 ]]
0

[[Pumpkin Seeds
Pumpkin Stem
 ]]
0

[[Redstone Comparator
Redstone Comparator
 ]]
0

[[Redstone Repeater
Redstone Repeater
 ]]
0

[[Redstone Torch
Redstone Torch
 ]]
0

[[Redstone
Redstone
 ]]
0

[[Saplings
Saplings
 ]]
0

[[Slime Block
Slime Block
 ]]
0

[[Structure Void
Structure Void
 ]]
0

[[Sugar Canes
Sugar Canes
 ]]
0

[[TNT
TNT
 ]]
0

[[Torch
Torch
 ]]
0

[[Tripwire
Tripwire
 ]]
0

[[Tripwire Hook
Tripwire Hook
 ]]
0

[[Wheat
Wheat
 ]]
0

Typical damage radius[επεξεργασία | επεξεργασία κώδικα]

The player will receive damage, if within these radii of a 100% exposure ground 1-block, 2-blocks, or 4-blocks of TNT explosion, with the amount of damage labeled on each circle in the figures below.

KillRadiiGrenade1.png KillRadiiGrenade2.png KillRadiiGrenade4.png

History[επεξεργασία | επεξεργασία κώδικα]

Classic
0.24Creepers were first introduced in on August 24, 2009, based on a failed pig model Notch had created.
0.26 SURVIVAL TEST 9TNT was added.
Indev
January 22, 2010Explosions are now "better".
January 25, 2010Explosions now lose power when going through stronger materials.
Alpha
1.2.0Added Ghasts, which shoot explosive ghast fireballs.
Beta
1.5Creepers become charged when struck by lightning, increasing the explosion's radius and strength.
1.6Trying to sleep in the Nether causes the bed to explode.
1.8Explosions will now emit shockwave particles after exploding. Prior to Beta 1.8, explosions only emitted smoke.
Sound UpdateThe 'Sound Update' of November 13th 2011 gave TNT a new explosion sound.
Official release
1.0.0Beta 1.9-pre3Bed and ghast explosions cause fire.
Beta 1.9-pre4Trying to sleep in the End causes the bed to explode.
Enchantment "Blast Protection" added, protecting against explosions.
Beta 1.9-pre6Ender Crystal added, an entity which sits atop of a block of bedrock. It can be destroyed with a melee or hit with an arrow or snowball, causing an explosion.
1.3.112w24aFixed explosions not pushing back players.
1.3.1Explosions damage the player different amounts on different difficulties, and no damage is dealt to the player on peaceful.
1.4.212w34aAdded the Wither, which shoots black wither skulls.
12w37aWither will make a massive explosion upon its creation after its health is fully charged.
Blue wither skulls added.
12w38bNew Creeper fall mechanics; Creepers will explode if they fall on the player from a certain height.
1.5Destroyed blocks have a 1/power chance of dropping as items; previously it was a fixed 30% chance.
1.8.2Explosions are no longer directionally biased.
Pocket Edition Alpha
0.1.0Added TNT.
0.2.1TNT actually explodes.
0.12.1Added creepers.
0.12.1Added explosion particles.
0.14.0An invalid mixture of liquids in cauldrons will result in an non-damaging explosion effect.
0.16.0Wither added.

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.
  • An explosion powerful enough to break bedrock would have a blast radius of over 30,000,000 blocks. If it were an uninterrupted blast, it would cover 238,775,501.2 blocks. However, explosions only follow certain lines, not every block (see previous).
    • However, this would not drop the bedrock.
  • Explosions going off in flowing water or lava will apply propulsion to entities, but won't affect any blocks, regardless of the blocks' blast resistance.
  • Underwater explosions won't emit smoke particles.
  • Explosions can redirect projectiles, including Ender Pearls.
  • Explosions can break blocks on the other side of surviving blast-resistant blocks.
  • Explosions will propel dead mobs' bodies if they go off just after the mob dies.
  • If primed TNT explodes in a large, solid cube of stone blocks, it will create an exact 3x3x3 cube inside.
    • Experimentation confirms that a TNT detonation will cause a 3x3 hole in a solid block of anything with a blast resistance less than that of water, but more than 12.5 (e.g. crafting tables). This implies that 3x3 is the minimum possible result of a TNT detonation without the blast being resisted altogether.
  • If a Falling Sand entity falls into Primed TNT when in water, it will do block damage.