Fire

Fire is a harmful non-solid block.

Obtaining
Fire cannot be obtained as item no matter what. It can be placed using flint and steel and fire charges.

Natural generation
Fire naturally generates in the Nether.

Lava can naturally create fire (see below).

Lightning bolts can also create fire, as also may explosions of beds, ender crystals and ghast and blaze fireballs.

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.

Burning blocks
Fire will spread onto and burn flammable blocks:
 * Wood planks
 * Wood slabs
 * Wood
 * Leaves
 * Vines
 * Grass
 * Wool
 * Fences
 * Wood stairs
 * Coal blocks
 * Hay bales
 * Bookshelves
 * TNT (ignites instead of vanishing)
 * Sponge (Pocket Edition only)

Fire will burn leaves slightly faster than the other flammable objects, indicating the game has different burn durations for different types of flammable blocks (though see block ticks to explain randomness in durations). Non-flammable blocks can be lit but do not burn away.

Burning entities
Mobs and players will catch fire when exposed to fire. Fire will obstruct the player's view slightly and they will slowly lose health at a rate of $1/2$ heart per second. This is the same rate that the player gains health in peaceful mode, so fire alone will not kill you in this mode.

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

If an animal that can drop meat dies while on fire, it will drop the cooked version of it.

Nether mobs will not set on fire.

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 source. Therefore if the player is using it as a fireplace, caution is needed.

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.

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 use up any uses for the tool. Placing blocks on the fire will also extinguish it.

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.

Eternal fire
Netherrack will maintain fire forever when set on fire, 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 gamerule doFireTick is false, 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 not stay on fire.

In Pocket Edition

 * If you hack fire in, it is an orange square and when placed, it has no texture. However, if you place it near a flammable block, it would spread throughout the map.
 * Burning mobs turn orange and emit large fire particles around their body.
 * The fire spreading mechanic is based on how prior PC Beta 1.6 would be.