TransWikia.com

Find a Minecraft SMP server seed based on known locations

Arqade Asked by Mort on March 18, 2021

Is it possible to find the seed of a 1.4.5 map without having the .dat file by using landmark coords? Is there a program that can come up with a list of possible seeds by entering the coords of dungeon spawners or villages or temples,etc?

6 Answers

No, there is no such program and likely never will be.

As a programming task, it's identical to the least efficient method of password cracking. We can't reverse-calculate the seed no matter how many landmark coordinates we have, because the type of calculation Minecraft uses for seed generation is one-way. Thus, what such a program would have to do is try every seed until it finds one that matches the landmarks.

In computer security terms this is called a brute-force attack, and it can take a very long time:

  1. Minecraft's seeds have 18 quintillion possible values.
  2. A GPU-based password cracker on consumer-grade hardware today, very loosely, can try about a billion numbers a second, given a target result (such as our landmarks).
  3. 1 quintillion is a billion billion.
  4. That gives us about 18 billion seconds needed to try every possible seed.
  5. On average we will have to only try half the seeds, so that brings us down to an average of 9 billion seconds to find a match.
  6. 9 billion seconds is over 285 years.
  7. In reality the program would have to run world-generation (or some kind of faked world generation) on every seed in order to find out if it matches our landmarks, so multiply 285 years by how long it takes Minecraft to start a new world. If we're generous and say a fake-generation takes only 3 seconds, that gives us 856 years to find a match, on average.

And all that is ignoring the question of how the program would handle the fact that our coordinates of landmarks are going to be guesses (which block in a village is the coordinate the world generator got from the seed?) and not exact matches for what the seed actually produced. That adds at least a few processor cycles to every time the program needs to check a particular seed for matches.

So as you can see, the idea is lovely, but in practice finding a seed from landmark coordinates is impractical enough that no-one is going to write such a program – by the time it finishes running, we'd all be dead (and Minecraft will likely have changed its world-generation again…). At least, not practical until we have quantum computers.

Correct answer by SevenSidedDie on March 18, 2021

Personally, I don't really think that working backwards to a map's seed from structure coordinates will help, due to Minecraft's incredibly randomized map generation procedure. However, I have heard of a small mod/plugin called World Downloader: http://www.minecraftforum.net/topic/1444862-145-world-downloader-mod/

It's been updated to 1.4.5, and what it does is basically download a multiplayer map from the server side. If you're willing to use a small-scale mod, you can use this to get the world file in your hands.

Once you've done that, you can add the file to your saves file in Minecraft (assuming you run your game on a Mac as I am not sure about Windows). Next, open up your game and go to the save. If cheats have been enabled, you can simply type in /seed as Yamikuronue suggested. However, if cheats are presumably still in their default (set to false from the server side), you can press esc, open up the world to LAN, and when the menu pops up, simply enable cheats. Your LAN world will still be the same as the SMP world, just with cheats enabled. Finally, you can enter /seed as mentioned previously.

Answered by Eugene on March 18, 2021

The seed usually runs through Java's Random class, which only uses 48 bits of the seed. There are some complicating factors, but I'm finishing off a tool to do this. At the moment it narrows the options for the lower 48 bits to a few tens of thousands - will need to chain with some other technique to reduce further. With one technique, I'm extracting about 32 bits and have 32 to go ("only" 4 billion possibilities).

Answered by Tim on March 18, 2021

The best way to find the seed if you have the server on your computer is to upload the level.dat file from the world folder into mineatlas.com. It will tell you the seed there and even show you a map of the world!

Answered by Anon on March 18, 2021

It is totally possible to find a Minecraft seed in a reasonable amount of time on CPU. Even though there are about 2^64 possible seeds, there is a lot of bias in how structure and decorator features are placed. By approaching the problem in a smart way, you can get rid of major brute-forcing overhead.

When it comes to structures(villages, temples, monuments, etc) and decorators(dungeons, emerald ore, end gateways, etc), the game creates a java.util.Random object which is seeded with the world seed before sending it through a layer of hashing. Looking closely, one realizes that the java Random class is a 48-bit linear congruential generator. What does that mean? Well, the upper 16 bits of the seed get trimmed off when passed on to the LCG. In fact, ALL features in the game do this mistake: structures, decorators, heightmap, slime chunks, etc. This means that you only need to brute-force 2^48 seeds which is much more reasonable on a GPU(a few hours worth). Those lower 48 bits are referred to as "structure seed".

The odd one out is biomes. Those use the full 64 bit of the seed. Once you have fully reversed the structure seed, you can then proceed to brute-force across the upper 2^16 with a biome search. This was the way to do it prior to 1.9.

In 1.9, Mojang changed the end pillars so they would generate in a circle with random heights. First, the game generates a list of indices, 0 through 9 for the 10 pillars. Then, it shuffles the list through Collections.shuffle() by passing on a custom Random object.

Random rand = new Random(worldSeed); long pillarSeed = rand.nextLong() & 65535L; List pillars = IntStream.range(0, 10).boxed().collect(Collectors.toList()); Collections.shuffle(pillars, new Random(pillarSeed));

For the sake of this post not being massive, you'll have to take my word for it. Given the 10 pillar heights, We can reverse 16 direct bits from the world seed in a matter of milliseconds. Those 16 bits all overlap with the structure seed, tuning down the brute-forcing work from 2^48 to 2^32.

To conclude, YES, it is possible to reverse-engineer a Minecraft seed. The most advanced seed crackers nowadays can reverse a seed in about 2 minutes of CPU once all the data is provided. I first learned about this technique through Neil's channel:

. I then recently wrote a seed cracker mod that he also showcased here:
.

Answered by user241396 on March 18, 2021

Actually there is a way to find a seed using a program. All you need is this program linked below https://github.com/KaptainWutax/SeedCracker

Answered by Bob on March 18, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP