Skip to content

Commit

Permalink
translation loading: no fail-proof in dev env
Browse files Browse the repository at this point in the history
  • Loading branch information
Fallen-Breath committed Jun 12, 2022
1 parent ae61613 commit 97965f0
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import carpettisaddition.utils.FileUtil;
import carpettisaddition.utils.Messenger;
import com.google.common.collect.Maps;
import net.fabricmc.loader.api.FabricLoader;
import net.minecraft.server.network.ServerPlayerEntity;
import net.minecraft.text.BaseText;
import net.minecraft.text.HoverEvent;
Expand Down Expand Up @@ -76,6 +77,10 @@ private static void loadTranslation(String lang)
catch (Exception e)
{
CarpetTISAdditionServer.LOGGER.error("Failed to load translation of language " + lang, e);
if (FabricLoader.getInstance().isDevelopmentEnvironment())
{
throw e;
}
return Collections.emptyMap();
}
});
Expand Down

0 comments on commit 97965f0

Please sign in to comment.