Superflat



Superflat (sometimes called Flatlands) is a world type replacing the normal varied terrain of the Overworld with a thin flat layer of dirt.

On a classic superflat world, the terrain consists of one layer of bedrock, two layers of dirt, and one layer of grass; the surface of the world is completely flat and at height y = 4, with the exception of NPC villages and terrain features, if they are enabled. Since the height limit (256) is unchanged, there is then slightly less than one-third more vertical height available to build above-ground structures as compared to a normal world. Mobs spawn as normal, including Slimes; however, there is no "Void Fog" as would ordinarily be caused by being close to the bottom, even for areas that are completely shielded from sunlight, whether in Survival or Creative mode.

Because of there being chests in villages, and villages frequently spawning near the spawn point, it is possible to use Superflat as a survival challenge map. However, the high amount of slimes makes this extremely difficult to an inexperienced player, if playing on any other than peaceful difficulty.

The Nether and the End both generate normally. In order to create a Superflat world in SMP, the level-type flag in server.properties must be "FLAT", instead of "DEFAULT".

Customization
In 12w37a, customization options were added to the world creation screen. Upon selecting "Superflat" in the World Type box, a new button appears underneath called "Customize". The customize menu starts out with the "Classic Flat" preset of one layer of grass, two dirt layers, and then bedrock underneath. As of 12w40a there are two buttons available to customize Superflats, which include the "Remove Layer" button, used for removing unwanted types of layers, and the "Presets" button, used for selecting any of eight currently available presets. If you can understand the preset code syntax you can still create presets of your own by entering the correct block IDs into the 'preset code box', where these changes can be previewed and applied. In addition, as of 12w40a and later, superflat worlds can have certain terrain features, besides villages, such as long grass, lakes, and strongholds, which can additionally be customized using the same code box for block layers. These changes also made tweaks to previous world codes, to include the new generation features.

Presets are shareable. As a preset is selected, a box on top of the screen has a code you are able to highlight and copy. Similar to how new worlds are shared through seeds, presets can be entered into this box to recreate someone else's preset.

Preset code format
At a future point there is expected to be some way of choosing block types merely by selecting them from a menu. For now, you must type in a correctly-formatted preset code.

The code is a string of numbers, semicolons, colons, commas, and lowercase "x"s. Each code has three main parts, divided by semicolons: a version number (used to allow preset codes to be shared even if the code format changes), a block mask, and a biome ID. The block mask is a comma-separated list of block IDs, ordered from layer 0 up; if the entry for a given block has an "x", the number before the "x" is the number of layers to be generated, and the number after is the block ID. A block ID can be followed by a colon to specify a damage value.

Structure generation specifiers (described below) can have parameters, for example "village(size=0 distance=0)".


 * "village" means it can generate a village. Parameters are "size", for the size of the village (0 = default, 1 = superflat default) and "distance", for the distance between villages.
 * "mineshaft" means it can generate a mineshaft, even in midair. A "chance" parameter from 0.0 to 1.0 determines how common mineshafts are. Note that 1.0 will result in several mineshafts layered into each other, and is likely to also cause a lot of lag when generating.
 * "stronghold" means it can generate a stronghold. The "count" parameter determines how many exist per world.
 * "biome_1" is used for types of decorations depending on biome ID.
 * "dungeon" means it can generate dungeons.
 * "decoration" means it generates trees, tall grass, flowers, pumpkins, etc. according to the biome. Also populates stone layers with ores according to depth.
 * "lake" means it generates water lakes, with sand and sugar canes depending on biome.
 * "lava_lake" means it generates lava lakes.

For example, consider the preset code

It consists of the following elements:
 * – version number.
 * – comma-separated list of block IDs.
 * – one layer of Mossy Cobblestone on layer 0.
 * – 250 layers of air, from layer 1 to layer 250.
 * – one layer of obsidian, on layer 251.
 * – one layer of thicker-than-usual snow, on layer 252.
 * – biome ID, in this case Nether.

A block can also be repeated over multiple layers simply by repeating the block's ID, e.g.  would give the same result as.

The Player will spawn on the topmost solid layer, and will spawn under water or lava if there are layers of those above the topmost solid layer.

Attempting to use an incorrectly formatted preset code causes the game to default to the Classic preset.

Resources that can be found in a classic Superflat world
The resources below can always be found, regardless of the "Generate Structures" option.

The resources below can only be found if the "Generate Structures" option is enabled. These do not include trading with villagers.

Village chests may contain these items:

Bugs

 * If the player breaks the Bedrock barrier, the player can see that the Void has the same color of the sky while the player is above y=0, but looks normal (black) when the player is below y=0.
 * Superflat worlds may contain chunk errors that will generate default worlds. This usually occurs if there is old "default" world data still in memory.
 * If you overwrite a Superflat world with a default world of the same name, some chunks (and sometimes massive areas) may remain Superflat, though the grass color will change with the biome.
 * Water World spawns you on top of the dirt layer, making Survival practically impossible in a new world. Workarounds are either spawning in Creative and flying up, or editing the save files after world creation to move spawn.
 * When customizing a flatland world, if you add any block with an ID greater than 127 (such as Emerald Ore) as a layer, the game will not generate the world and will freeze the game. This bug no longer occurs as of 12w38a.
 * If the world is set to generate a layer of cactus the world will crash due to cacti not being able to be placed adjacent to other blocks.
 * If you set the depth of the map low and allow mineshafts to spawn, they can spawn in the air, this can also occur with strongholds and dungeons.

Trivia

 * The volume of an entire Classic Flat world, not including villages, bonus chests, or air, is 3.6 million km3, and the world is composed of 3,600,000,000,000,000 blocks.
 * NPC Villages spawn more frequently in Classic Flat worlds than in normal worlds, because the entire world generates as a Plains biome.
 * Before 12w25a, Slimes spawned in huge numbers in Superflat worlds. This was because slimes spawn below layer 40, and in Superflat the entire world surface is only four blocks away from the bedrock layer.
 * In creative, digging through bedrock in the right place allows the moon and sun to be observed at noon and midnight respectively.
 * You can create a void world using the preset code 1;0;1, which simply creates a layer of air. However, you would not be able to build on it without a solid block present.