We have begun migration of most wikis to our new host, Amazon Web Services. All but the top 100 wikis are in read-only mode until the migration is complete. Estimated completion: End of Week.

Seed (level generation)

Από Minecraft Wiki
Μετάβαση σε: πλοήγηση, αναζήτηση

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]

World generation[επεξεργασία | επεξεργασία κώδικα]

Whenever the game has to generate a new world, it calls upon an algorithm. This algorithm will output a pseudo-random value that is then used to determine what the world will look like. However, the algorithm will always end up with the same value if the starting point (seed) that the algorithm uses is the same number. This is why seeds exist—to easily generate entirely different worlds from a single value.

Whenever the world generation algorithm is updated (usually by adding new biomes to the game), the same seed will no longer generate the same terrain. This is why in some different versions of the game, the same seed will not give the same world.

A world's seed is set when that world is created. By default, it is decided automatically (if so, the game uses the system time as the seed), 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 will be converted into a number.

If the seed or generator changes in a saved world, new chunks will be based on the new seed, and will not match those from the old seed (this phenomenon was widely observed with the Adventure Update). Deleted chunks can regenerate if the seed and generator remains the same, but will change if either the seed or generator changes.

It is important to note that since seeds are simply random values read into an algorithm and not actually names of different worlds, using a certain seed will not necessarily result in a world with any relevance to the value of that seed. For instance, using a biome name as your seed will not necessarily result in the creation of a world with primarily that biome.

Determining the seed[επεξεργασία | επεξεργασία κώδικα]

To view the world's seed, the player must enter the command /seed. On Pocket Edition, the seed can be found on the world options screen.

Technical[επεξεργασία | επεξεργασία κώδικα]

The Java String.hashCode() function is used to generate a number seed if a word/phrase is used. This restricts Minecraft to a subset of the possible worlds (to 232 which is 4,294,967,296), due to the datatypes used. Use number seeds directly or let Minecraft generate the seed (it uses the system clock) to access the full set of possible worlds (264 which is 18,446,744,073,709,551,616). Multiplayer seeds may only have 248 possible values if randomly generated by Minecraft due to using http://docs.oracle.com/javase/7/docs/api/java/util/Random.html#nextLong%28%29 .

Pocket Edition[επεξεργασία | επεξεργασία κώδικα]

Pocket Edition has a total of 232 (or 4,294,967,296) possible worlds no matter whether strings or numbers are used as the seed. The same applies to the 64-bit version of Windows 10 Edition. This is because Pocket Edition uses a 32-bit variant of the Mersenne Twister PRNG, which will only accept 32-bit seeds.

Video[επεξεργασία | επεξεργασία κώδικα]

History[επεξεργασία | επεξεργασία κώδικα]

Pre-classic
rd-160052A simple level generator is added.
Classic
0.0.12aNew level generator.
0.24_06Another new level generator.
More cliffs generate.
Indev
December 25, 2009Isometric level rendering screenshot added.
January 6, 2010You can now selected island, floating, flat, or original as the level type when generating a world.
You can also select square, long, or deep as the level shape.
You can also select small, normal, or huge as the level size.
January 7, 2010Deep floating maps now have layers of islands.
You can now select a level theme; normal or hell.
January 11, 2010Islands now generate with more sand.
January 13, 2010Oceans now generate with infinite water.
January 22, 2010Water now spawns naturally above sea level and on floating islands.
Caves are now less flooded.
Beta
1.3It is now possible to manually determine the seed.
1.8.1The debug screen now displays the seed number.
Official release
1.2.1Multiplayer servers will 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.2Seed types were changed, which means using a seed that you used before in the older versions will now generate a different world.

External links[επεξεργασία | επεξεργασία κώδικα]

References[επεξεργασία | επεξεργασία κώδικα]