Fire

Fire is a harmful non-solid block.

Obtaining
Fire cannot be obtained as an item under any circumstances.

It can be placed using flint and steel or a fire charge. Fire will spread across flammable blocks, and can spontaneously ignite when flammable blocks are near lava.

The explosion from sleeping in a bed in the Nether or the End will create fire, as will the explosion of a ghast fireball or the impact of a blaze fireball.

Natural generation
Fire naturally generates across the terrain of the Nether.

Lava generated next to flammable blocks can naturally ignite fires (see below).

Lightning strikes can also set fires.

Usage


When placed, fire will burn for a short and randomly determined amount of time. If nothing flammable is adjacent to it, the flames will die out. If water touches fire, the fire will be extinguished.

Burning entities
Mobs and players will catch fire when exposed to it. Fire will obstruct the player's view slightly and they will slowly lose health at a rate of per second. This is the same rate that the player gains health in Peaceful difficulty, so fire alone will not kill you in this mode. After they move out of the fire block, they will keep burning for 8 seconds, which deals additional 4 hearts damage (unless the fire is put out by rain or water). Attacks from burning zombies set fire to the player.

Items or blocks falling into fire will catch light and quickly disappear.

If a mob that can drop meat dies while on fire, it will drop the cooked version of it, with the exception of the fish dropped from polar bears, common drop of fish from guardians and the rare drop of fish dropped from guardians.

Nether mobs will not catch fire and cannot be damaged by fire.

Being on fire is not considered a status effect and as such will not be cured by milk.

Spread
Fire will spread over flammable surfaces. Fire can climb up walls, across floors and ceilings, and over small gaps. More precisely, a fire block can turn any air block that is adjacent to a flammable block into a fire block. This can happen at a distance of up to one block downwards, one block sideways (including diagonals), and four blocks upwards of the original fire block (not the block the fire is on/next to). Therefore if the player is using fire to build a fireplace, caution is needed. Blocks in the way will not prevent fire from igniting blocks above it—so even if you protect your wooden roof with cobblestone between it and the fire, the fire will completely ignore that cobblestone.

Fire spreads from a still lava block similarly: any air block one above and up to one block sideways (including diagonals) or two above and two blocks sideways (including diagonals) that is adjacent to a flammable block may be turned into a fire block.

Flammable blocks
Fire can spread onto and burn away any flammable block. (Or in the case of TNT, ignite it). On the other hand, fire that is not adjacent to any flammable block will not spread, even to another flammable block within the normal range.

In the following table, the higher the encouragement, the more quickly a block will catch fire if fire is available to spread there. The higher the flammability, the more quickly a block on fire will burn away. These are relative values; actual flammability and burn time depends not only on these values, but on difficulty, rain, the age of the fire, and a certain amount of randomness due to block ticks, among other things. Fire spread is also reduced significantly if the flammable blocks are located in a rather humid biome. Humid biomes are swamp, mushroom island and jungle with all of their respective variants excluding jungle edge.

Non-flammable blocks
Non-flammable blocks can be lit but do not burn away, and such fire will not spread. Non-flammable blocks other than netherrack or magma blocks will extinguish themselves after a few seconds.

Certain blocks can catch fire from nearby lava, though they will not burn away:

Extinguishing
Fire will burn out after a while on its own; however, the player may want to extinguish the fire as soon as possible to prevent damage. You can use water to extinguish the fire. Punching or hitting the side of a burning block will extinguish the fire block on that side. Hitting fire with a tool does not reduce the durability value for the tool. When extinguished by punching/attacking it, causes the fire block to do a "fizz" sound. Placing blocks on the fire will extinguish it. Fire can also be extinguished with splash and lingering water bottles.

Mobs on fire will be extinguished when in water or in a cauldron containing it. In the latter case, one layer of water will disappear.

Fire will extinguish much more quickly if nothing flammable is present, and very soon after it consumes a flammable block immediately beneath it.
 * Fire has an age property that determines how it extinguishes, ranging from age 0 when the fire is set, and growing to age 15. For fire older than age 3, if nothing flammable is adjacent to the fire, or if the block below doesn't have a solid top surface, the fire will be extinguished by the next block tick.  At age 15, as long as there isn't a flammable block below the fire, a block tick will have a $1/4$ chance to extinguish the fire.

If fire is exposed to rain, it will extinguish much more quickly.
 * Rain will affect fire if it falls directly onto the fire, or into the four adjacent blocks. Specifically, no matter the age, any block tick has a 20–65% chance of rain extinguishing the fire, depending on the fire's age: 3 percentage points per age of the fire.

Eternal fire
When lit, netherrack and magma blocks will maintain fire forever, unless put out by lava, water or the player. Note that rain won't put out netherrack fire. Bedrock in the End will also burn eternally.

If is , fire will last forever until it is put out by the player and will not spread.

Data values
Fire blocks have ID  (51) and are further defined by block states.

Trivia

 * Sometimes, in Survival when you walk into a fire and then walk out very quickly you will take a little bit of damage, but not stay on fire.
 * Curiously, if a gravity-affected block such as sand or gravel falls on a block of which the top is on fire, it will extinguish the fire rather than drop itself as an item, despite fire being a non-solid block.
 * Fire uses two texture files, one for the inner fire and one for the outer fire.
 * End crystals will continuously generate a block of fire at their location, if the crystal is placed or generated in the End. This fire is incapable of spreading.

In Bedrock Edition

 * Burning mobs turn orange and emit large fire particles around their body.
 * The fire spreading mechanic is based on how prior Java Edition Beta 1.6 would be.
 * When the player is on fire, there is a different burning animation on the screen than in the Java Edition (it partially obstructs view when looking downwards).