2.7 KiB
Reveng-MC
A project, consisting of two tools, which I used to reverse engineer (brute force) the seed of a Minecraft world, using known locations of 8 structures.
How to use
To use this tool, you will need the exact location of (from my experience) at least 5-6 structures, as well as a beefy GPU. First of all, you will need to put these coordinates trough the first tool, which is revengmc-gpu
(if you don't have a GPU and eons to spare, revengmc-cpu
will do too). At some point, the tool should yield a seed. Note that at this point you have discovered just the lower 48-bits of the 64-bit seed. At this point, you need to either manually, or using a program, go trough the remaining 16 bits (about 60000 seeds).
Doing that by hand can prove to be, well, a major pain, so a second tool is included. To use it, you need to setup the MCP project with minecraft 1.16.5 (haven't tested it with other versions). After that, you just need to copy the files in src/stage-2
directly in the generated sources of MCP (should be src/main/java
). Finally, run me.topchetoeu.revengmc.Searcher
as main with the same input, and the program should output the correct seed (from my experience). Worst-case scenario, you will get a few seeds, but they can be weeded out by hand.
To test, I have included the data that I used for input in the files example/input-stage-1.txt
and example/input-stage-2.txt
Compiling
The first program can be compiled by running make
(or make cpu
to get the cpu
) executable. You will need to install the OpenCL libraries to compile it. So far, this has only been run on Arch Linux, using Nvida RTX 3060, so milage may vary.
Input format
Stage 1 program:
CLI arguments:
- The input filename, or none for standard input
feature count] \[first seed (inclusive, may be hex)] \[last seed (exclusive, may be hex)]
\[structure name] \[structure x] \[structure y] \(repeated as many times as there are structures)
### Stage 2 program:
CLI arguments:
1. Lower 48 bits of seed
2. The input filename, or - for standard input
File data:
\[structure name] \[structure x] \[structure y] \(repeated as many times as there are structures)
### Structure names (same for both stages):
- MINESHAFT
- MINESHAFT_MESA
- MANSION
- JUNGLE_PYRAMID
- DESERT_PYRAMID
- IGLOO
- SHIPWRECK
- SHIPWRECK_BEACHED
- SWAMP_HUT
- STRONGHOLD
- MONUMENT
- OCEAN_RUIN_COLD
- OCEAN_RUIN_WARM
- FORTRESS
- NETHER_FOSSIL
- END_CITY
- BURIED_TREASURE
- BASTION_REMNANT
- VILLAGE_PLAINS
- VILLAGE_DESERT
- VILLAGE_SAVANNA
- VILLAGE_SNOWY
- VILLAGE_TAIGA
- RUINED_PORTAL
- RUINED_PORTAL_DESERT
- RUINED_PORTAL_JUNGLE
- RUINED_PORTAL_SWAMP
- RUINED_PORTAL_MOUNTAIN
- RUINED_PORTAL_OCEAN
- RUINED_PORTAL_NETHER
- PILLAGER_OUTPOST