Seed (level generation)

From Minecraft Wiki
Revision as of 20:24, 14 October 2020 by Square root of two (talk | contribs) (→‎Changing terrain without changing some structures: I tested the Nether biomes using the 48-bit seeds in chunkbase.com)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Minecraft seeds are values made up of character(s) (including negative or positive integers) that are used as the basis for generating every Minecraft world.[1]

Compatibility[edit]

Seeds are not compatible across editions, but are sometimes compatible with the older and newer versions. However, after Village & Pillage, the villages and other generated structures changed.

Java Edition seeds between Alpha 1.2.0 and Beta 1.7.3 are mostly the same. Beta 1.8 changed world generation completely and Release 1.2 changed locations of land biomes with the addition of jungles. Release 1.7.2 rewrote the world generation entirely, making seeds from 1.2 through 1.6.4 outdated. 1.13 featured changes to cave generation, new aquatic biomes, and adjustment to mutated biome and structure locations. 1.14 included the new bamboo jungle biome and updated locations of villages and pillager outposts. Not mentioned are structure additions in several updates throughout, but the addition of a generated structure usually does not require a complete change of biome generation.

In Bedrock Edition, the Alpha 0.9.0 update was the only update to overhaul world generation. Oceans were changed in the Update Aquatic, and villages & other structures were changed in Village & Pillage.

Legacy Console Edition seeds were updated in a similar schedule to Java Edition equivalents.

World generation[edit]

Whenever the game has to generate a new world, it calls upon an algorithm. This algorithm outputs a pseudo-random value that is then used to determine the characteristics and features of the world. However, the algorithm always outputs the same value each time for a constant starting point (seed). This is why seeds exist — to generate entirely different worlds, consistently each time, from single values.

A world's seed is set when that world is created. By default, it is decided automatically, but it can also be set manually. Set and reuse a seed to replay that world, or use a known seed to play the same world as another player. Either a number or a word/phrase can be used, including negatives. If a word/phrase is used, it is converted into a 32-bit integer.

Whenever the world generation algorithm is updated (usually by adding new biomes to the game), the same seed no longer generates the same terrain. This is why in some different versions of the game, the same seed does not produce the same world. If the seed or generator changes in a saved world, new chunks are based on the new seed and no longer match those from the old seed. In Java Edition, major (terrain-breaking) changes were observed with Alpha v1.2.0, Beta 1.8, and 1.7.2. Deleted chunks can regenerate if the seed and generator remain the same, but changes if either the seed or generator changes. In fact, deleting chunks is sometimes done to let newly-introduced features appear in an old world; see Tutorials/Updating old oceans in 1.13 using MCEdit.

Because seeds are simply random values read into an algorithm and not actually names of different worlds, using a certain seed does not result in a world with any relevance to the value of that seed. For instance, using a biome name as the seed does not necessarily result in the creation of a world with primarily that biome, nor does it spawn the player within the said biome.

Determining the seed[edit]

In Java Edition, the player can enter the command /seed to view the world's seed.

In Bedrock Edition, the seed can be found on the world options screen. There is also a seed picker that offers the player several pre-set seeds to generate worlds with specific features near the spawn point. Additionally, the beta version has a visible seed on the top of the screen.

Technical[edit]

Realms[edit]

In Java Edition, a player can type /seed in the chat. In Bedrock Edition, the seed is shown in the settings on a single player world, although the seed is not visible when playing on Realms.

Java Edition[edit]

If the seed contains characters other than numbers or is greater than or equal to 20 characters in length, the Java String.hashCode() function is used to generate a number seed. This restricts Minecraft to a subset of the possible worlds to 232 (or 4,294,967,296), due to the int datatype used. Number seeds or a default world seed must be used to access the full set of possible worlds (264, or 18,446,744,073,709,551,616). There are 248 meaningful seeds because Java's Random uses 48 bits of the seed; seeds are equivalent to one another modulo 248.

Bedrock Edition[edit]

Bedrock Edition has a total of 232 (or 4,294,967,296) possible worlds no matter whether strings or numbers are used as the seed. This is because Bedrock Edition uses a 32-bit variant of the Mersenne Twister PRNG, which accepts only 32-bit seeds. The hashing algorithm is identical to String.hashCode(): a hash h starts with 0, and for each character c, the value of h is changed to h * 31 + c, within the boundary of a 32-bit integer.

Overlap between editions[edit]

Positive seeds in the range 0–231 (0–2,147,483,648) generate the same arrangements of biomes in both Java and Bedrock editions, although with different structures and structure locations, caves, ore generation, and spawned entities, as well as minor terrain differences.

Seed 0[edit]

In Java Edition, the numeric entry for Minecraft seeds does not allow the number "0" (zero), as the game interprets "0" as a character, hashing it to its ASCII value of 48. However, by using a text seed for which the Java String.hashCode() function returns a zero value, the "zero seed" can still be used. Word strings that produce a zero seed include creashaks organzine, pollinating sandboxes, little jungle, small skeleton, and drumwood boulder head.[2] However, any text that hashes to 0 works, such as ddnqavbj and 166lr735ka3q6. Numeric seeds that are congruent to 0 modulo 248 (such as 281474976710656) also generate the same terrain as seed 0, but do not display as 0 using /seed.

In Bedrock Edition, the game rejects all numbers from -9 to +9.[3] However, changing the last character of the seed by one also changes the output hash code by one, so to arrive to a value of +2 from small skeleton, the last letter is advanced two positions to become small skeletop. The shortest version is still ddnqavb, followed by any other letter from a through s.

Generation quirks[edit]

This section is missing information about Explain these phenomena considerably more in depth.
Please expand the section to include this information. Further details may exist on the talk page.

Through certain seeds, it is possible to observe interesting effects.

Changing terrain without changing some structures[edit]

Only certain sections of the seed are used to generate specific features within the world. It is possible to generate multiple worlds with identical cave systems, Nether biomes and other arrangements of generated structures simply by converting the seed into binary and tweaking the desired bits.[4] An example is the seed generator using only the first 48 bits to generate cave systems and badlands clay banding layers.

Shadow seeds[edit]

The biome distribution of one world is identical to the biome distribution of another world, whose seed can be found by adding a constant to the current seed.
Constant:
-7379792620528906219

Repetition[edit]

Seed 164311266871034 in spectator mode. Caves are repetitive along the Z axis.

Certain seeds return 0 in the internal code,[5] causing infinite arrays of caves and other structures to generate.[6] In Java and Legacy Console editions, the seed 107038380838084 returns 0 on the first call and 164311266871034 returns 0 on the second call, causing structures to loop on the X and Z axes respectively.[7]

Other features can also be broken, such as decorations. These instead generate diagonally.[8]

In Bedrock Edition, diagonal cave, ravine and decoration repetition occurs with the seed 289849025 and 1669320484.[9]

Video[edit]

History[edit]

Clock JE2 BE2.gif
This section needs to be updated.
Please update this section to reflect recent updates or newly available information.
Java Edition pre-Classic
rd-160052Added a simple level generator.
Java Edition Classic
0.0.12aAdded a new level generator.
August 25, 2009Showed another new level generator, which generates cliffs more commonly.
Java Edition Indev
0.3120091223-2Isometric level rendering screenshot added.
20100106The player can now select island, floating, flat, or original as the level type when generating a world.
Players can also select square, long, or deep as the level shape.
Players can also select small, normal, or huge as the level size.
20100107Deep floating maps now have layers of islands.
Players can now select a level theme; normal or hell.
20100111-1Islands now generate with more sand.
20100113Oceans now generate with infinite water.
20100122Water now spawns naturally above sea level and on floating islands.
Caves are now less flooded.
Java Edition Alpha
v1.2.0?Terrain-breaking change to world gen: using any given seed on older versions now generates a different world.
Java Edition Beta
1.3It is now possible to manually determine the seed upon world creation.
1.8Pre-releaseTerrain-breaking change to world gen. The debug screen now displays the seed number.
Java Edition
1.2.1?Multiplayer servers no longer send the seed to clients.
1.3.112w18aDue to singleplayer becoming multiplayer, the world's seed is no longer displayed on the debug screen.
12w21aAdded /seed, which displays the current world seed.
1.7.213w36aTerrain-breaking change to world gen. Seed types were changed.
1.1318w06aWorld generator rewritten in a non-breaking way. Customized removed.
Pocket Edition Alpha
v0.1.0Added Seeds
v0.9.0?Changed terrain generation, making old seeds outdated

Trivia[edit]

  • If a user modifies the Java Edition source code for any version between 1.7.2 and 1.12.2, and change a value[more information needed] from 2 to 0 for the 6th genlayer, a user can replicate biome generation from Legacy Console Edition on Java edition with the exception of mushroom biomes.

Notable seeds[edit]

The following map seeds have, at one point or another, been used for generating official Minecraft maps and resources.

External links[edit]

References[edit]