Search in sources :

Example 1 with LanguageManager

use of net.minecraft.client.resources.LanguageManager in project ModernUI by BloCamLimb.

the class SettingLanguage method applyLanguage.

private void applyLanguage() {
    LanguageManager manager = minecraft.getLanguageManager();
    GameSettings gameSettings = minecraft.gameSettings;
    if (highlight != null && !highlight.getLanguage().getCode().equals(manager.getCurrentLanguage().getCode())) {
        manager.setCurrentLanguage(highlight.getLanguage());
        gameSettings.language = highlight.getLanguage().getCode();
        ForgeHooksClient.refreshResources(minecraft, VanillaResourceType.LANGUAGES);
        // FIXME
        // minecraft.fontRenderer.getBidiFlag(manager.isCurrentLanguageBidirectional());
        gameSettings.saveOptions();
    }
}
Also used : LanguageManager(net.minecraft.client.resources.LanguageManager) GameSettings(net.minecraft.client.GameSettings)

Aggregations

GameSettings (net.minecraft.client.GameSettings)1 LanguageManager (net.minecraft.client.resources.LanguageManager)1