World aliases?
deluxghost opened this issue ยท 8 comments
I would like to have alternative names for worlds, like colored or translated world names, instead of only "Overworld".
Is this even possible? Is there another way to achieve this?
Maybe a hashmap config for worlds like this?
{
"overworld": "The FOO",
"nether": "The BAR"
}
Yeah I could probably do something with resource packs that could do this. I'll try to put it in the next update!
I added this feature so you can change with a resource pack in <resourcepack>/assets/yigd/texts/dim_names.json
. I'll try to push myself to update the wiki, but in the meantime I changed the names of the dimensions so they include which mod they come from now (minecraft:overworld
instead of overworld
). Other than that your example should work.
Anyway thank you for the suggestion. This allowed me to make the GUI look a little cleaner while still assuring it being even more specific (if there would be 2 dimensions with the same name from different mods now you can make the names different)
New version available at curseforge, modrinth, and github
I'm using some method I found online to read the json file, which I honestly don't fully understand. What matters to me is that it works and I actually get data. For the encoding I have no idea how I could change it to use utf-8.
Also having the notifications change may actually be harder than you would think. Messages are sent to the player from the server, so data can easily be sent over without annoying packets and stuff. And the text resource is loaded from a resource pack, which means it's only loaded on the client. If I would attempt to translate the world name with the text file, that would crash servers. So I hope you understand me when I say I probably won't change anything with this at the moment
Encoding issue:
OK I got it, try changing:
new InputStreamReader(stream)
to
new InputStreamReader(stream, StandardCharsets.UTF_8)
(Yes, other json file might also have this problem)
Notification issue:
I see
Damn now I feel lazy for not trying to figure this out myself! Thanks a bunch! I'll update the 1.19 version as soon as I get ftb chunks compat working again. Let me know if you want this in the 1.18.2 release too, but if not I'll let you know when I update
I didn't actually build and test it yet, but it looks like the correct way
I'm using 1.19.0. Since 1.18.2 also has world aliases feature, we'd better port this change too, so they have identical behavior.