Open zlylupaf opened 5 months ago
Good question, I'm not sure actually. This tool was developed specifically for Nether patterns in both vanilla and an older bugged paper version. You may be able to figure out the algorithm by following steps similar to what I did here: https://jorianwoltjer.com/blog/p/hacking/part-2-the-new-liveoverflow-minecraft-hacking-server#bedrock-generation
Although I vaguely remember the overworld being completely different, hence the nether is 'legacy'. Because this whole adventure is quite some time ago I won't put in the effort of implementing another completely different algorithm that is also 64 times slower because of the overworld size. But a simple change or pull request is welcome :)
After doing some research(4-7h) here is what I've come to the overworld uses Xoroshiro128PlusPlus the nether uses CheckedRandom (for randomization) I'm "borrowing" some code from somebody that did support for the overworld, but his code doesn't have threads. which is too slow for my purpose. so I'm not sure if I can share the code, I'm still in the middle of implementing/cleaning up.
ok, some notes : the current code (in this repository) only checks every chunk e.g. every 16 blocks.(you'll know why if you read the post) so If you don't know relative chunk location, change the 16 in the code to 1, it appears in some places, (this too me a long time to figure out), but keep in mind this multiplies the time it will take by 16.
for a 5 million blocks wide square area, using 28 cpus on my intel 13900k, it will take around 4 hours.
I'll see if I can get the code posted someway, after I clean it up etc.(p.s. this is my first time writing rust)
Nice one! This is a great way to learn Rust :) This whole repository’s whole purpose was to find LiveOveflow’s location, hence why the non-standard optimizations were added specifically for his case. But it would be awesome to slowly transform this tool into a more general one.
Hello, the code doesn't seem to work for the overworld, is there anything I can change to make it work? fyi I've replaced LegacyGenerator for OldPaperLegacyGenerator in main.rs