-
-
Notifications
You must be signed in to change notification settings - Fork 148
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
Fix seed command output #403
Conversation
I'm pretty sure that https://github.com/Snowiiii/Pumpkin/blob/cc0f30848ea597ef702558cb1e5fc57ed2a20372/pumpkin-world/src/world_gen/seed.rs#L4 should be also an i64 then |
No, internally our seed is a u64, it doesn't make sense for it to be signed. Converting from u64 to i64 is a no-op anyway because it has the same bits underneath |
But why it should be unsigned ?. We may also want to use negative seeds internally, Or save them |
IMO It doesn't make sense to me conceptually for it to be signed. There's not concept of positive or negative for what is effectively a bit string for our RNG. I think having it signed was a limitation of Java. We can always add a serialize method to the seed struct for writing and stuff to do to no-op |
Mhh Okay. Pumpkin/pumpkin-config/src/lib.rs Line 70 in 9b184f7
|
Users can input strings as seeds tho |
I'm not sure what you mean, a seed is always a number isn't it ?, If you mean to just using " ", this isn't really an argument for me, I think its nicer to just force the user to put a raw number instead of using a String and then parsing is back into a number |
But like, you can have a string be the seed and it gets hashed into a numerical value. So you are right in that they are ultimately numbers, but if you go into Minecraft you can type a sentence into the set seed and it will work. Java basically goes:
|
Overall looks good. |
Description
Prints the seed as a i64 instead of a u64
Testing
Ran /seed with a negative seed
Checklist
Things need to be done before this Pull Request can be merged.
cargo fmt
cargo clippy
cargo test