Java 类net.minecraft.client.resources.Language 实例源码

项目:DecompiledMinecraft    文件:LanguageMetadataSectionSerializer.java   
public LanguageMetadataSection deserialize(JsonElement p_deserialize_1_, Type p_deserialize_2_, JsonDeserializationContext p_deserialize_3_) throws JsonParseException
{
    JsonObject jsonobject = p_deserialize_1_.getAsJsonObject();
    Set<Language> set = Sets.<Language>newHashSet();

    for (Entry<String, JsonElement> entry : jsonobject.entrySet())
    {
        String s = (String)entry.getKey();
        JsonObject jsonobject1 = JsonUtils.getJsonObject((JsonElement)entry.getValue(), "language");
        String s1 = JsonUtils.getString(jsonobject1, "region");
        String s2 = JsonUtils.getString(jsonobject1, "name");
        boolean flag = JsonUtils.getBoolean(jsonobject1, "bidirectional", false);

        if (s1.isEmpty())
        {
            throw new JsonParseException("Invalid language->\'" + s + "\'->region: empty value");
        }

        if (s2.isEmpty())
        {
            throw new JsonParseException("Invalid language->\'" + s + "\'->name: empty value");
        }

        if (!set.add(new Language(s, s1, s2, flag)))
        {
            throw new JsonParseException("Duplicate language->\'" + s + "\' defined");
        }
    }

    return new LanguageMetadataSection(set);
}
项目:DecompiledMinecraft    文件:GuiLanguage.java   
public List(Minecraft mcIn)
{
    super(mcIn, GuiLanguage.this.width, GuiLanguage.this.height, 32, GuiLanguage.this.height - 65 + 4, 18);

    for (Language language : GuiLanguage.this.languageManager.getLanguages())
    {
        this.languageMap.put(language.getLanguageCode(), language);
        this.langCodeList.add(language.getLanguageCode());
    }
}
项目:DecompiledMinecraft    文件:GuiLanguage.java   
protected void elementClicked(int slotIndex, boolean isDoubleClick, int mouseX, int mouseY)
{
    Language language = (Language)this.languageMap.get(this.langCodeList.get(slotIndex));
    GuiLanguage.this.languageManager.setCurrentLanguage(language);
    GuiLanguage.this.game_settings_3.language = language.getLanguageCode();
    this.mc.refreshResources();
    GuiLanguage.this.fontRendererObj.setUnicodeFlag(GuiLanguage.this.languageManager.isCurrentLocaleUnicode() || GuiLanguage.this.game_settings_3.forceUnicodeFont);
    GuiLanguage.this.fontRendererObj.setBidiFlag(GuiLanguage.this.languageManager.isCurrentLanguageBidirectional());
    GuiLanguage.this.confirmSettingsBtn.displayString = I18n.format("gui.done", new Object[0]);
    GuiLanguage.this.forceUnicodeFontBtn.displayString = GuiLanguage.this.game_settings_3.getKeyBinding(GameSettings.Options.FORCE_UNICODE_FONT);
    GuiLanguage.this.game_settings_3.saveOptions();
}
项目:BaseClient    文件:LanguageMetadataSectionSerializer.java   
public LanguageMetadataSection deserialize(JsonElement p_deserialize_1_, Type p_deserialize_2_, JsonDeserializationContext p_deserialize_3_) throws JsonParseException
{
    JsonObject jsonobject = p_deserialize_1_.getAsJsonObject();
    Set<Language> set = Sets.<Language>newHashSet();

    for (Entry<String, JsonElement> entry : jsonobject.entrySet())
    {
        String s = (String)entry.getKey();
        JsonObject jsonobject1 = JsonUtils.getJsonObject((JsonElement)entry.getValue(), "language");
        String s1 = JsonUtils.getString(jsonobject1, "region");
        String s2 = JsonUtils.getString(jsonobject1, "name");
        boolean flag = JsonUtils.getBoolean(jsonobject1, "bidirectional", false);

        if (s1.isEmpty())
        {
            throw new JsonParseException("Invalid language->\'" + s + "\'->region: empty value");
        }

        if (s2.isEmpty())
        {
            throw new JsonParseException("Invalid language->\'" + s + "\'->name: empty value");
        }

        if (!set.add(new Language(s, s1, s2, flag)))
        {
            throw new JsonParseException("Duplicate language->\'" + s + "\' defined");
        }
    }

    return new LanguageMetadataSection(set);
}
项目:BaseClient    文件:GuiLanguage.java   
public List(Minecraft mcIn)
{
    super(mcIn, GuiLanguage.this.width, GuiLanguage.this.height, 32, GuiLanguage.this.height - 65 + 4, 18);

    for (Language language : GuiLanguage.this.languageManager.getLanguages())
    {
        this.languageMap.put(language.getLanguageCode(), language);
        this.langCodeList.add(language.getLanguageCode());
    }
}
项目:BaseClient    文件:GuiLanguage.java   
protected void elementClicked(int slotIndex, boolean isDoubleClick, int mouseX, int mouseY)
{
    Language language = (Language)this.languageMap.get(this.langCodeList.get(slotIndex));
    GuiLanguage.this.languageManager.setCurrentLanguage(language);
    GuiLanguage.this.game_settings_3.language = language.getLanguageCode();
    this.mc.refreshResources();
    GuiLanguage.this.fontRendererObj.setUnicodeFlag(GuiLanguage.this.languageManager.isCurrentLocaleUnicode() || GuiLanguage.this.game_settings_3.forceUnicodeFont);
    GuiLanguage.this.fontRendererObj.setBidiFlag(GuiLanguage.this.languageManager.isCurrentLanguageBidirectional());
    GuiLanguage.this.confirmSettingsBtn.displayString = I18n.format("gui.done", new Object[0]);
    GuiLanguage.this.forceUnicodeFontBtn.displayString = GuiLanguage.this.game_settings_3.getKeyBinding(GameSettings.Options.FORCE_UNICODE_FONT);
    GuiLanguage.this.game_settings_3.saveOptions();
}
项目:BaseClient    文件:LanguageMetadataSectionSerializer.java   
public LanguageMetadataSection deserialize(JsonElement p_deserialize_1_, Type p_deserialize_2_, JsonDeserializationContext p_deserialize_3_) throws JsonParseException
{
    JsonObject jsonobject = p_deserialize_1_.getAsJsonObject();
    Set<Language> set = Sets.<Language>newHashSet();

    for (Entry<String, JsonElement> entry : jsonobject.entrySet())
    {
        String s = (String)entry.getKey();
        JsonObject jsonobject1 = JsonUtils.getJsonObject((JsonElement)entry.getValue(), "language");
        String s1 = JsonUtils.getString(jsonobject1, "region");
        String s2 = JsonUtils.getString(jsonobject1, "name");
        boolean flag = JsonUtils.getBoolean(jsonobject1, "bidirectional", false);

        if (s1.isEmpty())
        {
            throw new JsonParseException("Invalid language->\'" + s + "\'->region: empty value");
        }

        if (s2.isEmpty())
        {
            throw new JsonParseException("Invalid language->\'" + s + "\'->name: empty value");
        }

        if (!set.add(new Language(s, s1, s2, flag)))
        {
            throw new JsonParseException("Duplicate language->\'" + s + "\' defined");
        }
    }

    return new LanguageMetadataSection(set);
}
项目:BaseClient    文件:GuiLanguage.java   
public List(Minecraft mcIn)
{
    super(mcIn, GuiLanguage.this.width, GuiLanguage.this.height, 32, GuiLanguage.this.height - 65 + 4, 18);

    for (Language language : GuiLanguage.this.languageManager.getLanguages())
    {
        this.languageMap.put(language.getLanguageCode(), language);
        this.langCodeList.add(language.getLanguageCode());
    }
}
项目:BaseClient    文件:GuiLanguage.java   
protected void elementClicked(int slotIndex, boolean isDoubleClick, int mouseX, int mouseY)
{
    Language language = (Language)this.languageMap.get(this.langCodeList.get(slotIndex));
    GuiLanguage.this.languageManager.setCurrentLanguage(language);
    GuiLanguage.this.game_settings_3.language = language.getLanguageCode();
    this.mc.refreshResources();
    GuiLanguage.this.fontRendererObj.setUnicodeFlag(GuiLanguage.this.languageManager.isCurrentLocaleUnicode() || GuiLanguage.this.game_settings_3.forceUnicodeFont);
    GuiLanguage.this.fontRendererObj.setBidiFlag(GuiLanguage.this.languageManager.isCurrentLanguageBidirectional());
    GuiLanguage.this.confirmSettingsBtn.displayString = I18n.format("gui.done", new Object[0]);
    GuiLanguage.this.forceUnicodeFontBtn.displayString = GuiLanguage.this.game_settings_3.getKeyBinding(GameSettings.Options.FORCE_UNICODE_FONT);
    GuiLanguage.this.game_settings_3.saveOptions();
}
项目:Backmemed    文件:LanguageMetadataSectionSerializer.java   
public LanguageMetadataSection deserialize(JsonElement p_deserialize_1_, Type p_deserialize_2_, JsonDeserializationContext p_deserialize_3_) throws JsonParseException
{
    JsonObject jsonobject = p_deserialize_1_.getAsJsonObject();
    Set<Language> set = Sets.<Language>newHashSet();

    for (Entry<String, JsonElement> entry : jsonobject.entrySet())
    {
        String s = (String)entry.getKey();
        JsonObject jsonobject1 = JsonUtils.getJsonObject((JsonElement)entry.getValue(), "language");
        String s1 = JsonUtils.getString(jsonobject1, "region");
        String s2 = JsonUtils.getString(jsonobject1, "name");
        boolean flag = JsonUtils.getBoolean(jsonobject1, "bidirectional", false);

        if (s1.isEmpty())
        {
            throw new JsonParseException("Invalid language->\'" + s + "\'->region: empty value");
        }

        if (s2.isEmpty())
        {
            throw new JsonParseException("Invalid language->\'" + s + "\'->name: empty value");
        }

        if (!set.add(new Language(s, s1, s2, flag)))
        {
            throw new JsonParseException("Duplicate language->\'" + s + "\' defined");
        }
    }

    return new LanguageMetadataSection(set);
}
项目:Backmemed    文件:GuiLanguage.java   
public List(Minecraft mcIn)
{
    super(mcIn, GuiLanguage.this.width, GuiLanguage.this.height, 32, GuiLanguage.this.height - 65 + 4, 18);

    for (Language language : GuiLanguage.this.languageManager.getLanguages())
    {
        this.languageMap.put(language.getLanguageCode(), language);
        this.langCodeList.add(language.getLanguageCode());
    }
}
项目:Backmemed    文件:GuiLanguage.java   
protected void elementClicked(int slotIndex, boolean isDoubleClick, int mouseX, int mouseY)
{
    Language language = (Language)this.languageMap.get(this.langCodeList.get(slotIndex));
    GuiLanguage.this.languageManager.setCurrentLanguage(language);
    GuiLanguage.this.game_settings_3.language = language.getLanguageCode();
    this.mc.refreshResources();
    GuiLanguage.this.fontRendererObj.setUnicodeFlag(GuiLanguage.this.languageManager.isCurrentLocaleUnicode() || GuiLanguage.this.game_settings_3.forceUnicodeFont);
    GuiLanguage.this.fontRendererObj.setBidiFlag(GuiLanguage.this.languageManager.isCurrentLanguageBidirectional());
    GuiLanguage.this.confirmSettingsBtn.displayString = I18n.format("gui.done", new Object[0]);
    GuiLanguage.this.forceUnicodeFontBtn.displayString = GuiLanguage.this.game_settings_3.getKeyBinding(GameSettings.Options.FORCE_UNICODE_FONT);
    GuiLanguage.this.game_settings_3.saveOptions();
}
项目:CustomWorldGen    文件:LanguageMetadataSectionSerializer.java   
public LanguageMetadataSection deserialize(JsonElement p_deserialize_1_, Type p_deserialize_2_, JsonDeserializationContext p_deserialize_3_) throws JsonParseException
{
    JsonObject jsonobject = p_deserialize_1_.getAsJsonObject();
    Set<Language> set = Sets.<Language>newHashSet();

    for (Entry<String, JsonElement> entry : jsonobject.entrySet())
    {
        String s = (String)entry.getKey();
        JsonObject jsonobject1 = JsonUtils.getJsonObject((JsonElement)entry.getValue(), "language");
        String s1 = JsonUtils.getString(jsonobject1, "region");
        String s2 = JsonUtils.getString(jsonobject1, "name");
        boolean flag = JsonUtils.getBoolean(jsonobject1, "bidirectional", false);

        if (s1.isEmpty())
        {
            throw new JsonParseException("Invalid language->\'" + s + "\'->region: empty value");
        }

        if (s2.isEmpty())
        {
            throw new JsonParseException("Invalid language->\'" + s + "\'->name: empty value");
        }

        if (!set.add(new Language(s, s1, s2, flag)))
        {
            throw new JsonParseException("Duplicate language->\'" + s + "\' defined");
        }
    }

    return new LanguageMetadataSection(set);
}
项目:CustomWorldGen    文件:GuiLanguage.java   
public List(Minecraft mcIn)
{
    super(mcIn, GuiLanguage.this.width, GuiLanguage.this.height, 32, GuiLanguage.this.height - 65 + 4, 18);

    for (Language language : GuiLanguage.this.languageManager.getLanguages())
    {
        this.languageMap.put(language.getLanguageCode(), language);
        this.langCodeList.add(language.getLanguageCode());
    }
}
项目:CustomWorldGen    文件:GuiLanguage.java   
/**
 * The element in the slot that was clicked, boolean for whether it was double clicked or not
 */
protected void elementClicked(int slotIndex, boolean isDoubleClick, int mouseX, int mouseY)
{
    Language language = (Language)this.languageMap.get(this.langCodeList.get(slotIndex));
    GuiLanguage.this.languageManager.setCurrentLanguage(language);
    GuiLanguage.this.game_settings_3.language = language.getLanguageCode();
    this.mc.refreshResources();
    GuiLanguage.this.fontRendererObj.setUnicodeFlag(GuiLanguage.this.languageManager.isCurrentLocaleUnicode() || GuiLanguage.this.game_settings_3.forceUnicodeFont);
    GuiLanguage.this.fontRendererObj.setBidiFlag(GuiLanguage.this.languageManager.isCurrentLanguageBidirectional());
    GuiLanguage.this.confirmSettingsBtn.displayString = I18n.format("gui.done", new Object[0]);
    GuiLanguage.this.forceUnicodeFontBtn.displayString = GuiLanguage.this.game_settings_3.getKeyBinding(GameSettings.Options.FORCE_UNICODE_FONT);
    GuiLanguage.this.game_settings_3.saveOptions();
}
项目:CrystalMod    文件:GuidePageLoader.java   
@Override
public void onResourceManagerReload(IResourceManager resourceManager) {
    Language language = FMLClientHandler.instance().getClient().getLanguageManager().getCurrentLanguage();
    String lang = language.getJavaLocale().getLanguage();
    ModLogger.info("Loading guide text... ("+lang+")");
    GuidePages.loadGuideText(lang);
    ModLogger.info("("+GuidePages.CHAPTERTEXT.size()+") chapters loaded.");
}
项目:Resilience-Client-Source    文件:LanguageMetadataSectionSerializer.java   
public LanguageMetadataSection deserialize(JsonElement par1JsonElement, Type par2Type, JsonDeserializationContext par3JsonDeserializationContext)
{
    JsonObject var4 = par1JsonElement.getAsJsonObject();
    HashSet var5 = Sets.newHashSet();
    Iterator var6 = var4.entrySet().iterator();
    String var8;
    String var10;
    String var11;
    boolean var12;

    do
    {
        if (!var6.hasNext())
        {
            return new LanguageMetadataSection(var5);
        }

        Entry var7 = (Entry)var6.next();
        var8 = (String)var7.getKey();
        JsonObject var9 = JsonUtils.getJsonElementAsJsonObject((JsonElement)var7.getValue(), "language");
        var10 = JsonUtils.getJsonObjectStringFieldValue(var9, "region");
        var11 = JsonUtils.getJsonObjectStringFieldValue(var9, "name");
        var12 = JsonUtils.getJsonObjectBooleanFieldValueOrDefault(var9, "bidirectional", false);

        if (var10.isEmpty())
        {
            throw new JsonParseException("Invalid language->\'" + var8 + "\'->region: empty value");
        }

        if (var11.isEmpty())
        {
            throw new JsonParseException("Invalid language->\'" + var8 + "\'->name: empty value");
        }
    }
    while (var5.add(new Language(var8, var10, var11, var12)));

    throw new JsonParseException("Duplicate language->\'" + var8 + "\' defined");
}
项目:Resilience-Client-Source    文件:GuiLanguage.java   
public List()
{
    super(GuiLanguage.this.mc, GuiLanguage.this.width, GuiLanguage.this.height, 32, GuiLanguage.this.height - 65 + 4, 18);
    Iterator var2 = GuiLanguage.this.field_146454_h.getLanguages().iterator();

    while (var2.hasNext())
    {
        Language var3 = (Language)var2.next();
        this.field_148177_m.put(var3.getLanguageCode(), var3);
        this.field_148176_l.add(var3.getLanguageCode());
    }
}
项目:Resilience-Client-Source    文件:GuiLanguage.java   
protected void elementClicked(int p_148144_1_, boolean p_148144_2_, int p_148144_3_, int p_148144_4_)
{
    Language var5 = (Language)this.field_148177_m.get(this.field_148176_l.get(p_148144_1_));
    GuiLanguage.this.field_146454_h.setCurrentLanguage(var5);
    GuiLanguage.this.field_146451_g.language = var5.getLanguageCode();
    GuiLanguage.this.mc.refreshResources();
    GuiLanguage.this.fontRendererObj.setUnicodeFlag(GuiLanguage.this.field_146454_h.isCurrentLocaleUnicode() || GuiLanguage.this.field_146451_g.forceUnicodeFont);
    GuiLanguage.this.fontRendererObj.setBidiFlag(GuiLanguage.this.field_146454_h.isCurrentLanguageBidirectional());
    GuiLanguage.this.field_146452_r.displayString = I18n.format("gui.done", new Object[0]);
    GuiLanguage.this.field_146455_i.displayString = GuiLanguage.this.field_146451_g.getKeyBinding(GameSettings.Options.FORCE_UNICODE_FONT);
    GuiLanguage.this.field_146451_g.saveOptions();
}
项目:ExpandedRailsMod    文件:LanguageMetadataSectionSerializer.java   
public LanguageMetadataSection deserialize(JsonElement p_deserialize_1_, Type p_deserialize_2_, JsonDeserializationContext p_deserialize_3_) throws JsonParseException
{
    JsonObject jsonobject = p_deserialize_1_.getAsJsonObject();
    Set<Language> set = Sets.<Language>newHashSet();

    for (Entry<String, JsonElement> entry : jsonobject.entrySet())
    {
        String s = (String)entry.getKey();
        JsonObject jsonobject1 = JsonUtils.getJsonObject((JsonElement)entry.getValue(), "language");
        String s1 = JsonUtils.getString(jsonobject1, "region");
        String s2 = JsonUtils.getString(jsonobject1, "name");
        boolean flag = JsonUtils.getBoolean(jsonobject1, "bidirectional", false);

        if (s1.isEmpty())
        {
            throw new JsonParseException("Invalid language->\'" + s + "\'->region: empty value");
        }

        if (s2.isEmpty())
        {
            throw new JsonParseException("Invalid language->\'" + s + "\'->name: empty value");
        }

        if (!set.add(new Language(s, s1, s2, flag)))
        {
            throw new JsonParseException("Duplicate language->\'" + s + "\' defined");
        }
    }

    return new LanguageMetadataSection(set);
}
项目:ExpandedRailsMod    文件:GuiLanguage.java   
public List(Minecraft mcIn)
{
    super(mcIn, GuiLanguage.this.width, GuiLanguage.this.height, 32, GuiLanguage.this.height - 65 + 4, 18);

    for (Language language : GuiLanguage.this.languageManager.getLanguages())
    {
        this.languageMap.put(language.getLanguageCode(), language);
        this.langCodeList.add(language.getLanguageCode());
    }
}
项目:ExpandedRailsMod    文件:GuiLanguage.java   
/**
 * The element in the slot that was clicked, boolean for whether it was double clicked or not
 */
protected void elementClicked(int slotIndex, boolean isDoubleClick, int mouseX, int mouseY)
{
    Language language = (Language)this.languageMap.get(this.langCodeList.get(slotIndex));
    GuiLanguage.this.languageManager.setCurrentLanguage(language);
    GuiLanguage.this.game_settings_3.language = language.getLanguageCode();
    this.mc.refreshResources();
    GuiLanguage.this.fontRendererObj.setUnicodeFlag(GuiLanguage.this.languageManager.isCurrentLocaleUnicode() || GuiLanguage.this.game_settings_3.forceUnicodeFont);
    GuiLanguage.this.fontRendererObj.setBidiFlag(GuiLanguage.this.languageManager.isCurrentLanguageBidirectional());
    GuiLanguage.this.confirmSettingsBtn.displayString = I18n.format("gui.done", new Object[0]);
    GuiLanguage.this.forceUnicodeFontBtn.displayString = GuiLanguage.this.game_settings_3.getKeyBinding(GameSettings.Options.FORCE_UNICODE_FONT);
    GuiLanguage.this.game_settings_3.saveOptions();
}
项目:Cauldron    文件:LanguageMetadataSectionSerializer.java   
public LanguageMetadataSection deserialize(JsonElement p_deserialize_1_, Type p_deserialize_2_, JsonDeserializationContext p_deserialize_3_)
{
    JsonObject jsonobject = p_deserialize_1_.getAsJsonObject();
    HashSet hashset = Sets.newHashSet();
    Iterator iterator = jsonobject.entrySet().iterator();
    String s;
    String s1;
    String s2;
    boolean flag;

    do
    {
        if (!iterator.hasNext())
        {
            return new LanguageMetadataSection(hashset);
        }

        Entry entry = (Entry)iterator.next();
        s = (String)entry.getKey();
        JsonObject jsonobject1 = JsonUtils.getJsonElementAsJsonObject((JsonElement)entry.getValue(), "language");
        s1 = JsonUtils.getJsonObjectStringFieldValue(jsonobject1, "region");
        s2 = JsonUtils.getJsonObjectStringFieldValue(jsonobject1, "name");
        flag = JsonUtils.getJsonObjectBooleanFieldValueOrDefault(jsonobject1, "bidirectional", false);

        if (s1.isEmpty())
        {
            throw new JsonParseException("Invalid language->\'" + s + "\'->region: empty value");
        }

        if (s2.isEmpty())
        {
            throw new JsonParseException("Invalid language->\'" + s + "\'->name: empty value");
        }
    }
    while (hashset.add(new Language(s, s1, s2, flag)));

    throw new JsonParseException("Duplicate language->\'" + s + "\' defined");
}
项目:Cauldron    文件:GuiLanguage.java   
public List()
{
    super(GuiLanguage.this.mc, GuiLanguage.this.width, GuiLanguage.this.height, 32, GuiLanguage.this.height - 65 + 4, 18);
    Iterator iterator = GuiLanguage.this.field_146454_h.getLanguages().iterator();

    while (iterator.hasNext())
    {
        Language language = (Language)iterator.next();
        this.field_148177_m.put(language.getLanguageCode(), language);
        this.field_148176_l.add(language.getLanguageCode());
    }
}
项目:Cauldron    文件:GuiLanguage.java   
protected void elementClicked(int p_148144_1_, boolean p_148144_2_, int p_148144_3_, int p_148144_4_)
{
    Language language = (Language)this.field_148177_m.get(this.field_148176_l.get(p_148144_1_));
    GuiLanguage.this.field_146454_h.setCurrentLanguage(language);
    GuiLanguage.this.field_146451_g.language = language.getLanguageCode();
    GuiLanguage.this.mc.refreshResources();
    GuiLanguage.this.fontRendererObj.setUnicodeFlag(GuiLanguage.this.field_146454_h.isCurrentLocaleUnicode() || GuiLanguage.this.field_146451_g.forceUnicodeFont);
    GuiLanguage.this.fontRendererObj.setBidiFlag(GuiLanguage.this.field_146454_h.isCurrentLanguageBidirectional());
    GuiLanguage.this.field_146452_r.displayString = I18n.format("gui.done", new Object[0]);
    GuiLanguage.this.field_146455_i.displayString = GuiLanguage.this.field_146451_g.getKeyBinding(GameSettings.Options.FORCE_UNICODE_FONT);
    GuiLanguage.this.field_146451_g.saveOptions();
}
项目:Cauldron    文件:LanguageMetadataSectionSerializer.java   
public LanguageMetadataSection deserialize(JsonElement p_deserialize_1_, Type p_deserialize_2_, JsonDeserializationContext p_deserialize_3_)
{
    JsonObject jsonobject = p_deserialize_1_.getAsJsonObject();
    HashSet hashset = Sets.newHashSet();
    Iterator iterator = jsonobject.entrySet().iterator();
    String s;
    String s1;
    String s2;
    boolean flag;

    do
    {
        if (!iterator.hasNext())
        {
            return new LanguageMetadataSection(hashset);
        }

        Entry entry = (Entry)iterator.next();
        s = (String)entry.getKey();
        JsonObject jsonobject1 = JsonUtils.getJsonElementAsJsonObject((JsonElement)entry.getValue(), "language");
        s1 = JsonUtils.getJsonObjectStringFieldValue(jsonobject1, "region");
        s2 = JsonUtils.getJsonObjectStringFieldValue(jsonobject1, "name");
        flag = JsonUtils.getJsonObjectBooleanFieldValueOrDefault(jsonobject1, "bidirectional", false);

        if (s1.isEmpty())
        {
            throw new JsonParseException("Invalid language->\'" + s + "\'->region: empty value");
        }

        if (s2.isEmpty())
        {
            throw new JsonParseException("Invalid language->\'" + s + "\'->name: empty value");
        }
    }
    while (hashset.add(new Language(s, s1, s2, flag)));

    throw new JsonParseException("Duplicate language->\'" + s + "\' defined");
}
项目:Cauldron    文件:GuiLanguage.java   
public List()
{
    super(GuiLanguage.this.mc, GuiLanguage.this.width, GuiLanguage.this.height, 32, GuiLanguage.this.height - 65 + 4, 18);
    Iterator iterator = GuiLanguage.this.field_146454_h.getLanguages().iterator();

    while (iterator.hasNext())
    {
        Language language = (Language)iterator.next();
        this.field_148177_m.put(language.getLanguageCode(), language);
        this.field_148176_l.add(language.getLanguageCode());
    }
}
项目:Cauldron    文件:GuiLanguage.java   
protected void elementClicked(int p_148144_1_, boolean p_148144_2_, int p_148144_3_, int p_148144_4_)
{
    Language language = (Language)this.field_148177_m.get(this.field_148176_l.get(p_148144_1_));
    GuiLanguage.this.field_146454_h.setCurrentLanguage(language);
    GuiLanguage.this.field_146451_g.language = language.getLanguageCode();
    GuiLanguage.this.mc.refreshResources();
    GuiLanguage.this.fontRendererObj.setUnicodeFlag(GuiLanguage.this.field_146454_h.isCurrentLocaleUnicode() || GuiLanguage.this.field_146451_g.forceUnicodeFont);
    GuiLanguage.this.fontRendererObj.setBidiFlag(GuiLanguage.this.field_146454_h.isCurrentLanguageBidirectional());
    GuiLanguage.this.field_146452_r.displayString = I18n.format("gui.done", new Object[0]);
    GuiLanguage.this.field_146455_i.displayString = GuiLanguage.this.field_146451_g.getKeyBinding(GameSettings.Options.FORCE_UNICODE_FONT);
    GuiLanguage.this.field_146451_g.saveOptions();
}
项目:RuneCraftery    文件:LanguageMetadataSectionSerializer.java   
public LanguageMetadataSection func_135020_a(JsonElement p_135020_1_, Type p_135020_2_, JsonDeserializationContext p_135020_3_) {
   JsonObject var4 = p_135020_1_.getAsJsonObject();
   HashSet var5 = Sets.newHashSet();
   Iterator var6 = var4.entrySet().iterator();

   String var8;
   String var11;
   String var12;
   boolean var13;
   do {
      if(!var6.hasNext()) {
         return new LanguageMetadataSection(var5);
      }

      Entry var7 = (Entry)var6.next();
      var8 = (String)var7.getKey();
      JsonElement var9 = (JsonElement)var7.getValue();
      if(!var9.isJsonObject()) {
         throw new JsonParseException("Invalid language->\'" + var8 + "\': expected object, was " + var9);
      }

      JsonObject var10 = var9.getAsJsonObject();
      var11 = this.func_110486_a(var10.get("region"), "region", "", 0, Integer.MAX_VALUE);
      var12 = this.func_110486_a(var10.get("name"), "name", "", 0, Integer.MAX_VALUE);
      var13 = this.func_110484_a(var10.get("bidirectional"), "bidirectional", Boolean.valueOf(false));
      if(var11.isEmpty()) {
         throw new JsonParseException("Invalid language->\'" + var8 + "\'->region: empty value");
      }

      if(var12.isEmpty()) {
         throw new JsonParseException("Invalid language->\'" + var8 + "\'->name: empty value");
      }
   } while(var5.add(new Language(var8, var11, var12, var13)));

   throw new JsonParseException("Duplicate language->\'" + var8 + "\' defined");
}
项目:RuneCraftery    文件:LanguageManager.java   
public void func_135043_a(List p_135043_1_) {
   this.field_135046_d.clear();
   Iterator var2 = p_135043_1_.iterator();

   while(var2.hasNext()) {
      ResourcePack var3 = (ResourcePack)var2.next();

      try {
         LanguageMetadataSection var4 = (LanguageMetadataSection)var3.func_135058_a(this.field_135047_b, "language");
         if(var4 != null) {
            Iterator var5 = var4.func_135018_a().iterator();

            while(var5.hasNext()) {
               Language var6 = (Language)var5.next();
               if(!this.field_135046_d.containsKey(var6.func_135034_a())) {
                  this.field_135046_d.put(var6.func_135034_a(), var6);
               }
            }
         }
      } catch (RuntimeException var7) {
         Minecraft.func_71410_x().func_98033_al().func_98235_b("Unable to parse metadata section of resourcepack: " + var3.func_130077_b(), var7);
      } catch (IOException var8) {
         Minecraft.func_71410_x().func_98033_al().func_98235_b("Unable to parse metadata section of resourcepack: " + var3.func_130077_b(), var8);
      }
   }

}
项目:RuneCraftery    文件:GuiSlotLanguage.java   
public GuiSlotLanguage(GuiLanguage p_i1042_1_) {
   super(p_i1042_1_.field_73882_e, p_i1042_1_.field_73880_f, p_i1042_1_.field_73881_g, 32, p_i1042_1_.field_73881_g - 65 + 4, 18);
   this.field_77252_a = p_i1042_1_;
   this.field_77251_g = Lists.newArrayList();
   this.field_77253_h = Maps.newHashMap();
   Iterator var2 = GuiLanguage.func_135011_a(p_i1042_1_).func_135040_d().iterator();

   while(var2.hasNext()) {
      Language var3 = (Language)var2.next();
      this.field_77253_h.put(var3.func_135034_a(), var3);
      this.field_77251_g.add(var3.func_135034_a());
   }

}
项目:RuneCraftery    文件:GuiSlotLanguage.java   
protected void func_77213_a(int p_77213_1_, boolean p_77213_2_) {
   Language var3 = (Language)this.field_77253_h.get(this.field_77251_g.get(p_77213_1_));
   GuiLanguage.func_135011_a(this.field_77252_a).func_135045_a(var3);
   GuiLanguage.func_74043_a(this.field_77252_a).field_74363_ab = var3.func_135034_a();
   this.field_77252_a.field_73882_e.func_110436_a();
   this.field_77252_a.field_73886_k.func_78264_a(GuiLanguage.func_135011_a(this.field_77252_a).func_135042_a());
   this.field_77252_a.field_73886_k.func_78275_b(GuiLanguage.func_135011_a(this.field_77252_a).func_135044_b());
   GuiLanguage.func_74042_b(this.field_77252_a).field_73744_e = I18n.func_135053_a("gui.done");
   GuiLanguage.func_74043_a(this.field_77252_a).func_74303_b();
}
项目:RuneCraftery    文件:GuiSlotLanguage.java   
public GuiSlotLanguage(GuiLanguage par1GuiLanguage)
{
    super(par1GuiLanguage.mc, par1GuiLanguage.width, par1GuiLanguage.height, 32, par1GuiLanguage.height - 65 + 4, 18);
    this.languageGui = par1GuiLanguage;
    this.field_77251_g = Lists.newArrayList();
    this.field_77253_h = Maps.newHashMap();
    Iterator iterator = GuiLanguage.func_135011_a(par1GuiLanguage).getLanguages().iterator();

    while (iterator.hasNext())
    {
        Language language = (Language)iterator.next();
        this.field_77253_h.put(language.getLanguageCode(), language);
        this.field_77251_g.add(language.getLanguageCode());
    }
}
项目:RuneCraftery    文件:GuiSlotLanguage.java   
/**
 * the element in the slot that was clicked, boolean for wether it was double clicked or not
 */
protected void elementClicked(int par1, boolean par2)
{
    Language language = (Language)this.field_77253_h.get(this.field_77251_g.get(par1));
    GuiLanguage.func_135011_a(this.languageGui).setCurrentLanguage(language);
    GuiLanguage.getGameSettings(this.languageGui).language = language.getLanguageCode();
    this.languageGui.mc.refreshResources();
    this.languageGui.fontRenderer.setUnicodeFlag(GuiLanguage.func_135011_a(this.languageGui).isCurrentLocaleUnicode());
    this.languageGui.fontRenderer.setBidiFlag(GuiLanguage.func_135011_a(this.languageGui).isCurrentLanguageBidirectional());
    GuiLanguage.getDoneButton(this.languageGui).displayString = I18n.getString("gui.done");
    GuiLanguage.getGameSettings(this.languageGui).saveOptions();
}
项目:TabbyChat-2    文件:Spellcheck.java   
private void loadCurrentLanguage() {
    Language lang = Minecraft.getMinecraft().getLanguageManager().getCurrentLanguage();
    try {
        loadUserDictionary();
        loadDictionary(LangDict.fromLanguage(lang));
    } catch (IOException e) {
        TabbyChat.getLogger().warn("Error while loading dictionary.", e);
    }
}
项目:BetterNutritionMod    文件:GuiSlotLanguage.java   
public GuiSlotLanguage(GuiLanguage par1GuiLanguage)
{
    super(par1GuiLanguage.mc, par1GuiLanguage.width, par1GuiLanguage.height, 32, par1GuiLanguage.height - 65 + 4, 18);
    this.languageGui = par1GuiLanguage;
    this.field_77251_g = Lists.newArrayList();
    this.field_77253_h = Maps.newHashMap();
    Iterator iterator = GuiLanguage.func_135011_a(par1GuiLanguage).getLanguages().iterator();

    while (iterator.hasNext())
    {
        Language language = (Language)iterator.next();
        this.field_77253_h.put(language.getLanguageCode(), language);
        this.field_77251_g.add(language.getLanguageCode());
    }
}
项目:BetterNutritionMod    文件:GuiSlotLanguage.java   
/**
 * the element in the slot that was clicked, boolean for wether it was double clicked or not
 */
protected void elementClicked(int par1, boolean par2)
{
    Language language = (Language)this.field_77253_h.get(this.field_77251_g.get(par1));
    GuiLanguage.func_135011_a(this.languageGui).setCurrentLanguage(language);
    GuiLanguage.getGameSettings(this.languageGui).language = language.getLanguageCode();
    this.languageGui.mc.refreshResources();
    this.languageGui.fontRenderer.setUnicodeFlag(GuiLanguage.func_135011_a(this.languageGui).isCurrentLocaleUnicode());
    this.languageGui.fontRenderer.setBidiFlag(GuiLanguage.func_135011_a(this.languageGui).isCurrentLanguageBidirectional());
    GuiLanguage.getDoneButton(this.languageGui).displayString = I18n.getString("gui.done");
    GuiLanguage.getGameSettings(this.languageGui).saveOptions();
}
项目:DecompiledMinecraft    文件:LanguageMetadataSection.java   
public LanguageMetadataSection(Collection<Language> p_i1311_1_)
{
    this.languages = p_i1311_1_;
}
项目:DecompiledMinecraft    文件:LanguageMetadataSection.java   
public Collection<Language> getLanguages()
{
    return this.languages;
}
项目:DecompiledMinecraft    文件:GuiLanguage.java   
protected void drawSlot(int entryID, int p_180791_2_, int p_180791_3_, int p_180791_4_, int mouseXIn, int mouseYIn)
{
    GuiLanguage.this.fontRendererObj.setBidiFlag(true);
    GuiLanguage.this.drawCenteredString(GuiLanguage.this.fontRendererObj, ((Language)this.languageMap.get(this.langCodeList.get(entryID))).toString(), this.width / 2, p_180791_3_ + 1, 16777215);
    GuiLanguage.this.fontRendererObj.setBidiFlag(GuiLanguage.this.languageManager.getCurrentLanguage().isBidirectional());
}