ClassiCube
ClassiCube copied to clipboard
Seed value in CW file should be a string.
While a 32bit int is sufficient for rand()
it is not enough for any actually good PRNG.
A modern PRNG is likely to use a 64 or 128 bit seed (Perhaps in several integers).
In addition, the seed isn't much use without the Software
and MagGeneratorName
fields. (Eg "Classicube 1.3.3" and "Vanilla")
https://github.com/UnknownShadow200/ClassiCube/blob/e287e8db2620cbd39bc387320c01ef6836b3f9f7/src/Formats.c#L628
I just went with just a 32 bit integer because:
- That's all the game uses, and converting to/from string was just a bit more work
- ClassiCube normally discards all metadata it doesn't use when loading a .CW world
Except that you do "use" it (or you should) as you load it into memory so you can preserve it when the user re-saves it. Therefor you will crash (because of your NBT parsing) if some converter tries to put their Seed in the file rather than skipping it quietly because you don't understand it.