Earthcomputer / EnchantmentCracker

Cracking the XP seed in Minecraft and choosing your enchantments
MIT License
1.04k stars 91 forks source link

Drastic improvements to pure-java seed cracking #72

Closed Hexicube closed 5 years ago

Hexicube commented 5 years ago

The current java implementation of seed-cracking is painfully slow, but it can be improved immensely. The core of the issue comes down to java's own Random class, but there's also the option to multi-thread it.

With just threading I can do a search on 15-8-18-30 in about 50 seconds (3 threads on i5-8600k - can do more but it's already better), and after using a custom bare-bones random class it got reduced to 11 seconds.

Here's my source code: https://pastebin.com/YR4yzHHY The source is unfortunately in Kotlin, but the principles should be obvious. I've verified that it does in fact find the same player seed, though mine doesn't convert it to hex.