-
-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
implement xoroshiro128 RNG #66
Conversation
Hey i actually never heard of XOROshiro128. Can you may explain a bit?. It looks like its an random generator. I wonder where Mojang uses this implementation |
I also found that rust |
I never heard of it either, my code is basically 1-1 of the Minecraft Java. I saw the rust crate too, but it gives different values for the same seed as the Minecraft one |
Actually let me double check myself |
Yeah, I just used this as a wrapper around the rust implementation and the tests failed. It may have been user error, but this works and I think is good enough (TM) |
We can always come back to it and change the internals, I just wanna get a stepping stone for chunk generation out of the way |
Oh, i think I spotted an error on my side. Alright I'm hooked now, I'll see if I can get the rust crate working as a back-end implementation |
I can confirm that the rust implementation uses different magic numbers than the java version. I refactored a bit, but I am confident that this is what we should use for the XorOshiro128 implementation |
Thank you @kralverde |
A rust implementation of one of Minecraft's RNGs: XOROshiro128, including tests cases against the results of equivalent java code