NucleoidMC / Server-Translations

MIT License
42 stars 20 forks source link

Cant load my server #48

Closed Rozbiynk closed 1 year ago

Rozbiynk commented 1 year ago

https://mclo.gs/PDFeZjD

mysticdrew commented 1 year ago

This is due to duplicate entries in our lang files. Which we use for comments. This API should be able to handle or just not blow up as Minecraft is able to handle it just fine.

The solution would be to check if an entry exists before putting it into the TranslationMap.

Patbox commented 1 year ago

You misread the issue here.

at com.google.common.collect.ImmutableMap$Builder.buildOrThrow(ImmutableMap.java:601) ~[guava-31.1-jre.jar:?]
--
522 | at net.minecraft.util.Language.redirect$edc000$fabric-resource-loader-v0$create(Language.java:1048) ~[server-intermediary.jar:?]
523 | at net.minecraft.util.Language.create(Language.java:45) ~[server-intermediary.jar:?]
524 | at net.minecraft.util.Language.<clinit>(Language.java:33) ~[server-intermediary.jar:?]
525 | at fr.catcore.server.translations.api.resource.language.LanguageReader.read(LanguageReader.java:20) ~[server_translations_api-1.4.19+1.19.3-ef3dbc4ca52a7c18.jar:?]

This happens within in Fabric API's redirect. This needs to be fixed on fabric side (or in your mod).

mysticdrew commented 1 year ago

I removed duplicate "_comment_": "foo bar" fields from the json in journeymap 5.9.5 So it should no longer be an issue. I looked through your code too and it should not blow up on duplicate entries. It does not blow up on the client side with duplicate entries for forge and fabric. Curious that it would blow up and crash with the server side translation mod.