Open Zorock666 opened 3 years ago
World names must be valid key names; won't fix.
The game will load default worlds with spaces, mixed case, and probably a bunch of other horrible characters. It is the implementation of namespaced keys on our end in GH-5014 that breaks it. It also only breaks it for API created worlds (anything beyond the default 3 dimensions).
Come up with a better reason this shouldn't be, at the least, looked into for a better solution.
I thought I added (in that PR) world creator methods that take a key AND a level name. I don’t think I added any constraints to the level name. If you just use the world creator method with only a name, then it tries to make a key from that name and that would fail if there are invalid chars I think.
that failing of creating the key is what breaks all of this, ideally, we need to try to convert world names into valid keys, I do wanna convert storage of Location based stuff to use UUIDs internally as a better safety mechanism to deal with renaming, but, vanilla is shaky af here as they have no way to identify dimensions out of the key, which creates many issues in vanilla if you rename a save.
Ideally, we need to encourage people to switch over to valid names, but, there is no safe way to rename a world, which makes this somewhat unviable... fun, fun, fun...
What behaviour is expected:
Multiverse Core has always worked with Paper, even when world names had spaces in them. This was apparently changed in Paper 540
What behaviour is observed:
Multiverse Core can no longer load worlds with spaces in the names.
Steps/models to reproduce:
Use a version of Paper before 540, make a world with multiverse core, and put a space in the name, then update to Paper 540 or later, and it breaks.
Anything else:
https://pastebin.com/CZEVW6La
Helpful guy on Discord: "jmp: just post the stacktrace and give the context of world name with spaces jmp: and that it broke when World implemented Keyed"
I'd love to see a fix for this. I know that having spaces in world names is generally inadvisable, but it would be a nice service to allow users to continue with their antics :D