Given details about a Minecraft vein (such as its coordinates, type, and attributes), this repository is designed to return a list of internal java.util.Random states that could potentially generate that exact vein. With multiple veins, you can then use those internal states to find which lowest 48 bits of worldseeds could potentially generate all of them simultaneously.
This program formally supports
- Java Edition.
- Versions Beta 1.6—1.12.2.
- Dirt, gravel, coal, iron, gold, redstone, or diamond veins.
This program uses CUDA, which requires your device to have an NVIDIA CUDA-capable GPU installed. NVIDIA's CUDA also does not support MacOS versions OS X 10.14 or beyond. If either of those requirements disqualify your computer, you can instead run the program on a virtual GPU for free (at the time of writing this, and subject to certain runtime limits) through Google Colab.
If using Windows, you will also need some form of C++ compiler installed; however, there are a myriad of environments that provide one (Microsoft Visual C++, though that in turn requires Visual Studio; Windows Subsystem for Linux; Minimial System 2; and others).
- Download the repository, either as a ZIP file from GitHub (which you then extract) or by cloning it through Git.
- Open the Settings file in your favorite code editor, and replace the examples of input data with your own, and the settings with your own. (For enumerations like
Version
, the list of supported values can be found in Allowed Values for Settings.cuh.)
(Note: If you are looking for the lowest 48 bits of worldseeds, at bare minimum two veins will be necessary: this will currently require running the program multiple times, once for each vein. If multi-day runtimes cannot be avoided, one setting the program comes with is the ability to divide your runs into "partial runs", so that a run can be restarted midway-through at a later time.)
- Go back and double-check your input data. There is an 80% chance you inputted something incorrectly the first time, and any mistakes will prevent the program from deriving the correct internal states, and by extension, the correct lowest 48 bits of worldseeds.
- Once you're completely certain your input data is correct—if you wish to run the program on Google Colab:
- Visit the website, sign in with a Google account, and create a new notebook.
- Open the Files sidebar to the left and upload the program's files, making sure to keep the files' structure the way it originally was (the underlying code files are inside a folder named src, etc.). Don't forget to upload the modified Settings file instead of the original.
- Under the Runtime tab, select "Change runtime type" and select T4 GPU as the hardware accelerator.
- Whether on Google Colab or your own computer, open a terminal and verify nvcc, the CUDA compiler, is installed:
(Linux/Windows/MacOS) nvcc --version
(Google Colab) !nvcc --version
If the output is an error and not the compiler's information, you will need to install the CUDA Toolkit which contains nvcc
. (The following are installation guides for Linux, Windows, and MacOS X 10.13 or earlier.)
- Navigate in the terminal to the folder where the program's files are contained:
(Linux/Windows/MacOS) cd "[Path to the folder]"
(Google Colab) !cd "[Path to the folder]"
Then use nvcc
to compile the program:
(Linux) nvcc "main.cu" -o "main" -O3
(Windows) nvcc "main.cu" -o "main.exe" -O3
(MacOS) nvcc "main.cu" -o "main.app" -O3
(Google Colab) !nvcc "main.cu" -o "main" -O3
Depending on your input data, the compilation may take almost a full minute or even longer.
The compiler may print warnings akin to Stack size for entry function '_Z11biomeFilterv' cannot be statically determined
: this is normal. (All this means is that the compiler couldn't determine the exact number of iterations certain recursive functions will undergo.)
- Run the compiled program:
(Linux) .\main
(Windows) .\main.exe
(MacOS) open -a main.app
(Google Colab) !.\main
As mentioned in step 2, the program's runtime can vary wildly based on one's input data and its comprehensiveness. Nevertheless, if all goes well, a list should gradually be printed to the screen containing the possible internal states. 8. Those internal states, and other information about the veins, can then be plugged into Combination.cu to retrieve which possible lowest 48 bits of worldseeds could generate the vein(s).
I would like to give very large Thank You's to
- Andrew, for creating his TreeCracker which this code is partially derived from.
- KaptainWutax, for creating his Kaktoos searcher which this code is also partially derived from.
- Panda4994, for his algorithm to determine if a state is derivable from a nextLong call.
If you would like to contribute to this repository or report any bugs, please feel free to open an issue or a pull request.
This repository is offered under my (NelS') general seedfinding license. Please read and abide by that text if you have any wishes of referencing, distributing, selling, etc. this repository or its code.1
Footnotes
-
While the license discusses this, I want to emphasize one aspect of it here: this repository relies upon numerous others' repositories (Gaider10's TreeCracker, KaptainWutax's Kaktoos code, etc.), and thus my license solely applies to the changes I and any voluntary contributors made within this repository, not to their repositories or any code in this repository that is untouched from their repositories. ↩