Does anyone know what method NMS code uses to set the map seed string to a long and pass into the WorldCreator? Ive got a map that has a string for a seed, but i need it to be converted into a long to work with the world creator. I figured it may be just hashing the string, but i dont wanna be wrong. (nor do i know how i would check)
CorrieKay Code:java String s = this.propertyManager.getString("level-seed", "");long k = (new Random()).nextLong();if (s.length() > 0) { try { long l = Long.parseLong(s); if (l != 0L) { k = l; } } catch (NumberFormatException numberformatexception) { k = (long) s.hashCode(); }} k would be the seed. It would default to a random long, take the String as seed if the seed can be converted to a long. If not, it would get, indeed, the hash.
Yeah i found that after i had posted this. Question though, when i didnt define a seed in my world creator, it would always generate the map fractally, is this because every reboot it would choose a different seed?
I mean with my multiworld system. Based on what ive seen, whenever i try to load additional worlds, if i dont save the seed to file, and specify the seed, it fragments the world.
I think the reason is that the seed for the main world is saved to the preferences file, while any additional worlds loaded (not typical with minecraft) are given a random seed if you dont provide one.