Superflat



Superflat is a world type replacing the normal varied terrain of the Overworld, with customizable layers.

Structure
In a classic (default) Superflat world, the terrain consists of one layer of bedrock, two layers of dirt, and one layer of grass blocks. Because the entire world is a plains biome by default, villages generate relatively frequently $$, while $$ villages do not generate in Flat worlds.

The surface of the world is completely flat and at Y=4, except for villages and other structures if they are enabled. Since the height limit (256) is unchanged, there is almost one-third more vertical height available to build above-ground structures as compared to a normal world. Mobs still spawn normally. Because of the low altitude of the world, slimes spawn frequently.

When making a Superflat world, the player almost always spawns on the topmost layer and, on some block types, within a 20x20 area. Structures may not fully generate if the topmost layer is too low. $$, the player always spawns at X/Z coordinates 0,0.

Access to other dimensions
Superflat worlds allow the player to access the Nether by building a nether portal in the usual way.

Superflat worlds also allow the player to access the End, which generates a normal dimension of floating islands, if strongholds are enabled.

Multiplayer
In order to create a Superflat world in a multiplayer server, the level-type flag in server.properties must be, instead of. To alter the layers, biome and structures define generator-settings, which is basically the in-game preset code, but with a syntax similar to JSON, see the example below.

Once a multiplayer world is created, the server.properties fields have no effect on chunk generation. Instead, just like in singleplayer, the level.dat fields for,  , and   are used instead. If you want to alter a world after initial creation, these are the settings to change.

Customization


$$, the structure, and content of a Superflat world can be customized. has no interface for customizing flat worlds; it always uses the default configuration (one layer of bedrock, two layers of dirt, and a layer of grass blocks) even when the Seed Picker is used. However, custom flat worlds are supported internally, and can be used by modifying  in the world's   file using an external editor (see the customization section). Players on Xbox One, PlayStation 4 and Nintendo Switch can also use the Legacy Console Edition to customize a superflat world, then transfer it to Bedrock.

Upon selecting "Superflat" in the World Type box, a new button appears underneath labeled "Customize". The customize menu starts with the "Classic Flat" preset of one layer of grass, two dirt layers, and then bedrock underneath. There are two buttons available to customize Superflat worlds, which include the "Remove Layer" button, used for removing unwanted types of layers, and the "Presets" button, used for selecting any of nine currently available presets.

If the player can understand the preset code syntax, they can create presets of their own by entering valid information into the preset code box, where these changes can be previewed and applied. (Direct Customization is not available.) Also, superflat worlds can have certain terrain features, besides villages, such as tall grass, lakes, and strongholds, which can additionally be customized using the same code box for block layers.

Presets are shareable. As a preset is selected, a box on top of the screen has a code that is highlightable and copyable. 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
The preset code is a string of numbers, semicolons, colons, commas, and asterisks(*). In BE, it must be done through  in the world's   file using an external editor. Each code has three main parts, divided by semicolons. They are:


 * a list of one or more block IDs (Java Edition or Bedrock Edition);
 * The block list is a comma-separated list of block IDs, ordered from layer 0 up; if the entry for a given block has an "*", the number before the "*" is the number of layers to be generated, and the number after is the block ID.
 * A block can also be repeated over multiple layers simply by repeating the block's ID, e.g.  would give the same result as.
 * a valid biome ID (Java Edition or Bedrock Edition);
 * (optional, not after 1.16) a list of structure generation options.
 * Structure generation options (described below) may have additional parameters, for example  (in 1.13+ they have no effect).
 * It is important to remember that multiple parameters are separated by spaces, rather than commas or semicolons.

Conditions
Note that several criteria must be satisfied before some features can appear:
 * The biome ID must be correct. For example, at present villages can appear only in biome IDs,  ,  ,  ,  , and.
 * The correct structure code ('village', 'dungeon' etc.) must be present in the superflat string.
 * Structures must be turned on in world settings. (This does not affect 'natural' objects such as trees, flowers, mushrooms, and giant mushrooms. Obsidian pillars in the End also count as 'natural'.)
 * There must be suitable terrain for the structure to appear on or in. This applies to most features except for mineshafts and strongholds.
 * Villages are a partial exception; they do not form in mid-air, but can form provided there is at least one solid block layer.
 * Villages always spawn at least 2 blocks above the void.

For example, to have an 'End' superflat world with obsidian pillars, the biome ID must be, the superflat string must contain 'decoration', and the top surface block must be End Stone. In this particular case 'Structures' does not need to be turned on in the world options.

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

Preset code example
Consider the following preset code: minecraft:mossy_cobblestone,250*minecraft:air,minecraft:obsidian,minecraft:snow;minecraft:mountains;stronghold(count=7),village(size=0 distance=9),decoration,dungeon,mineshaft

It consists of the following elements:
 * — 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 snow, on layer 252.
 * — biome ID, in this case Mountains.
 * — a comma-separated list of structures.
 * — this populates the world with seven strongholds at the default distance and spread.
 * — because Mountains is an invalid biome for villages, this does nothing.
 * — biome-specific decoration.
 * — allows dungeons to generate.
 * — allows abandoned mineshafts to generate at the default placement frequency.

Trivia

 * The volume of an entire default superflat world, not including villages, bonus chests, or air, is 14.4 million km3, and the world is composed of 1.44&times;1016 blocks.
 * Because cloud height isn't affected by the world generation, clouds appear underground in the Tunneler's Dream preset.
 * If the player selects the desert preset, and remove all layers but sand, it is possible to create a massive, endless wave of falling sand. All one has to do to accomplish this computer-breaking feat is dig straight down to the bottom of the world. The sand then begins to fall from the initial digging coordinates.