Bedrock

Bedrock is both an indestructible and unmineable block.

Obtaining
Bedrock is impossible to obtain without commands or creative mode.

Natural generation
Bedrock comprises the bottom-most 5 layers of the Overworld in a very rough pattern, although to the 4th layer is predominately flat bedrock with no gaps, which makes the very bottom 5th layer inaccessible. The game code numbers the lowest layer of Bedrock as layer 0, and the highest as layer 4.

In the Nether, bedrock comprises both the top and bottom 4 layers in a very rough pattern. At the top of the Nether, bedrock prevents you from going past layer 127, although you can use several bugs to get through. It can also be found at the sides of the Nether in the console edition. Mushrooms may occasionally spawn on top of this Bedrock layer.

In the End, defeating the Ender Dragon spawns a portal with a Bedrock frame. A single piece of flaming Bedrock also appears underneath Ender Crystals.

Usage
The primary function of bedrock is to create impassable barriers. Bedrock blocks cannot be moved by pistons.

Breaking
While bedrock does have a finite damage resistance, there is no explosive in the game with that much force. Notch confirmed on the 11th of February 2011, during a Machinima Live stream, that it is indestructible, or so solid that the amount of TNT it would take to destroy it would more than certainly crash the game, therefore the save file would show no evidence of the explosion ever happening. However, later examinations of Minecraft code have shown that multiple explosions do not add damage to blocks; any block that is not destroyed by one TNT immediately adjacent to it will not be destroyed by additional TNT. Thus, the "amount of TNT" does not matter (other than indirectly by possibly crashing the game).

It is impossible to break bedrock by punching it. Bedrock has "hardness" of -1. A negative hardness is handled separately in the code, whereas damage from players' hits to the block are zero, thus the accumulated damage will always stay at 0.

Dark oak trees
You can currently break bedrock by growing dark oak trees. The method abuses the fact that dark oak trees trees might grow downwards if remaining parts of a previously grown tree blocks remain above it. When the tree grows downwards, some Bedrock blocks are likely to be replaced by Dark Oak Wood, which are easily removable. When using this method, the bedrock does not drop. This method is inconsistent, and might take a few tries, but is easily done in survival Minecraft. Note that this is likely to be patched in the future.

Nether Reactors
In Pocket Edition, if you activate a Nether Reactor on a low enough layer, the last layer of bedrock is replaced with Netherrack, allowing access to The Void in survival mode.

Creative mode
In Creative mode, bedrock can be destroyed in one hit, just like any other block. By doing this, the Player is able to enter The Void, but will die (after falling past Y: -63), unless they are flying or using cheats to have very high regeneration. This is one of the two ways to die in Creative Mode, aside from the command.

Commands
Another way to break Bedrock, if you have cheats on, is to use the "summon" command to create a fireball entity with an explosion power of 5000. This will destroy bedrock, but is extremely rare for the item to drop, as when the explosion power is increased it is less likely to drop as an item. This will probably crash the game, but if not, the explosion will take several minutes.

Classic properties
In Singleplayer Survival Mode, Bedrock is impossible to place without a mod, because Bedrock is never directly placed. But, using a server command on multiplayer, other blocks can be changed into Bedrock. Any Bedrock that exists on the map cannot be destroyed by the player.

In Multiplayer mode, server operators can place Bedrock blocks by using the "/solid" command. When /solid is used, stone blocks turn to Bedrock a short time after being placed. If /solid is used again, stone blocks placed will remain stone blocks. Normal players cannot place Bedrock; this makes Bedrock useful for making spawn jails. However, ops can destroy Bedrock like any other block, as a flag is set on the client when they log in. Vats of fluid blocks (water and lava) are also recommended to have Bedrock barriers so as to prevent server floods. Bedrock is used as a dark colored building material for normal structures as well.

A player can use an inventory editor to put Bedrock blocks in their inventory. If they attempt to place the blocks, the server will automatically kick them, even if they are an op. This is an anti-griefing feature that is scripted into the server software.

In all Classic maps, the very edges of a map are lined with a Bedrock-textured barrier. This barrier is not actually made of Bedrock blocks; it is simply a flat, impassible wall with the Bedrock texture. It is also completely covered in water. Consequently, attempting to place blocks on it does not work; you must place a block on one already attached to the wall. This barrier appears on the sides of a map starting two blocks below ocean level, extends under the ocean, and across the entire bottom of the map. Additional walls made of Bedrock blocks are often built against the ocean to prevent flooding in custom servers. Using a /kill command for classic servers causes your player to go extremely far away from the map and to glitch high above the bedrock area. The command is highly glitchy, somehow being able to send you off the map, so later versions of the command simply set the target player's health to 0.

Trivia

 * The Bedrock texture is modified from Stone, at a higher contrast and placed on all sides.
 * Bedrock emits a dark particle effect
 * In Xbox 360 and Playstation editions, only the lowest layer (or highest in the Nether) of naturally spawned bedrock is unbreakable.
 * In maps generated before the Halloween Update, there were occasional gaps in the bottom layer of Bedrock that the player could fall through.
 * It is possible, but rare, for ore to be found encased in Bedrock.
 * In Minecraft 4k, there is bedrock on the bottom of the map with no texture.
 * Strongholds can cause a bedrock not to form within its bounds.