public void parseLanguageMetadata(List<IResourcePack> p_135043_1_) { this.languageMap.clear(); for (IResourcePack iresourcepack : p_135043_1_) { try { LanguageMetadataSection languagemetadatasection = (LanguageMetadataSection)iresourcepack.getPackMetadata(this.theMetadataSerializer, "language"); if (languagemetadatasection != null) { for (Language language : languagemetadatasection.getLanguages()) { if (!this.languageMap.containsKey(language.getLanguageCode())) { this.languageMap.put(language.getLanguageCode(), language); } } } } catch (RuntimeException runtimeexception) { logger.warn((String)("Unable to parse metadata section of resourcepack: " + iresourcepack.getPackName()), (Throwable)runtimeexception); } catch (IOException ioexception) { logger.warn((String)("Unable to parse metadata section of resourcepack: " + iresourcepack.getPackName()), (Throwable)ioexception); } } }
private void registerMetadataSerializers() { this.metadataSerializer_.registerMetadataSectionType(new TextureMetadataSectionSerializer(), TextureMetadataSection.class); this.metadataSerializer_.registerMetadataSectionType(new FontMetadataSectionSerializer(), FontMetadataSection.class); this.metadataSerializer_.registerMetadataSectionType(new AnimationMetadataSectionSerializer(), AnimationMetadataSection.class); this.metadataSerializer_.registerMetadataSectionType(new PackMetadataSectionSerializer(), PackMetadataSection.class); this.metadataSerializer_.registerMetadataSectionType(new LanguageMetadataSectionSerializer(), LanguageMetadataSection.class); }
private static MetadataSerializer makeMetadataSerializer() { MetadataSerializer metadataserializer = new MetadataSerializer(); metadataserializer.registerMetadataSectionType(new TextureMetadataSectionSerializer(), TextureMetadataSection.class); metadataserializer.registerMetadataSectionType(new FontMetadataSectionSerializer(), FontMetadataSection.class); metadataserializer.registerMetadataSectionType(new AnimationMetadataSectionSerializer(), AnimationMetadataSection.class); metadataserializer.registerMetadataSectionType(new PackMetadataSectionSerializer(), PackMetadataSection.class); metadataserializer.registerMetadataSectionType(new LanguageMetadataSectionSerializer(), LanguageMetadataSection.class); return metadataserializer; }
public void parseLanguageMetadata(List<IResourcePack> resourcesPacks) { this.languageMap.clear(); for (IResourcePack iresourcepack : resourcesPacks) { try { LanguageMetadataSection languagemetadatasection = (LanguageMetadataSection)iresourcepack.getPackMetadata(this.theMetadataSerializer, "language"); if (languagemetadatasection != null) { for (Language language : languagemetadatasection.getLanguages()) { if (!this.languageMap.containsKey(language.getLanguageCode())) { this.languageMap.put(language.getLanguageCode(), language); } } } } catch (RuntimeException runtimeexception) { LOGGER.warn("Unable to parse language metadata section of resourcepack: {}", new Object[] {iresourcepack.getPackName(), runtimeexception}); } catch (IOException ioexception) { LOGGER.warn("Unable to parse language metadata section of resourcepack: {}", new Object[] {iresourcepack.getPackName(), ioexception}); } } }
public void parseLanguageMetadata(List<IResourcePack> resourcesPacks) { this.languageMap.clear(); for (IResourcePack iresourcepack : resourcesPacks) { try { LanguageMetadataSection languagemetadatasection = (LanguageMetadataSection)iresourcepack.getPackMetadata(this.theMetadataSerializer, "language"); if (languagemetadatasection != null) { for (Language language : languagemetadatasection.getLanguages()) { if (!this.languageMap.containsKey(language.getLanguageCode())) { this.languageMap.put(language.getLanguageCode(), language); } } } } catch (RuntimeException runtimeexception) { LOGGER.warn("Unable to parse metadata section of resourcepack: {}", new Object[] {iresourcepack.getPackName(), runtimeexception}); } catch (IOException ioexception) { LOGGER.warn("Unable to parse metadata section of resourcepack: {}", new Object[] {iresourcepack.getPackName(), ioexception}); } } }
public void parseLanguageMetadata(List par1List) { this.languageMap.clear(); Iterator var2 = par1List.iterator(); while (var2.hasNext()) { IResourcePack var3 = (IResourcePack)var2.next(); try { LanguageMetadataSection var4 = (LanguageMetadataSection)var3.getPackMetadata(this.theMetadataSerializer, "language"); if (var4 != null) { Iterator var5 = var4.getLanguages().iterator(); while (var5.hasNext()) { Language var6 = (Language)var5.next(); if (!this.languageMap.containsKey(var6.getLanguageCode())) { this.languageMap.put(var6.getLanguageCode(), var6); } } } } catch (RuntimeException var7) { logger.warn("Unable to parse metadata section of resourcepack: " + var3.getPackName(), var7); } catch (IOException var8) { logger.warn("Unable to parse metadata section of resourcepack: " + var3.getPackName(), var8); } } }
public void parseLanguageMetadata(List p_135043_1_) { this.languageMap.clear(); Iterator iterator = p_135043_1_.iterator(); while (iterator.hasNext()) { IResourcePack iresourcepack = (IResourcePack)iterator.next(); try { LanguageMetadataSection languagemetadatasection = (LanguageMetadataSection)iresourcepack.getPackMetadata(this.theMetadataSerializer, "language"); if (languagemetadatasection != null) { Iterator iterator1 = languagemetadatasection.getLanguages().iterator(); while (iterator1.hasNext()) { Language language = (Language)iterator1.next(); if (!this.languageMap.containsKey(language.getLanguageCode())) { this.languageMap.put(language.getLanguageCode(), language); } } } } catch (RuntimeException runtimeexception) { logger.warn("Unable to parse metadata section of resourcepack: " + iresourcepack.getPackName(), runtimeexception); } catch (IOException ioexception) { logger.warn("Unable to parse metadata section of resourcepack: " + iresourcepack.getPackName(), ioexception); } } }
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"); }
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); } } }
public void parseLanguageMetadata(List par1List) { this.languageMap.clear(); Iterator iterator = par1List.iterator(); while (iterator.hasNext()) { ResourcePack resourcepack = (ResourcePack)iterator.next(); try { LanguageMetadataSection languagemetadatasection = (LanguageMetadataSection)resourcepack.getPackMetadata(this.field_135047_b, "language"); if (languagemetadatasection != null) { Iterator iterator1 = languagemetadatasection.getLanguages().iterator(); while (iterator1.hasNext()) { Language language = (Language)iterator1.next(); if (!this.languageMap.containsKey(language.getLanguageCode())) { this.languageMap.put(language.getLanguageCode(), language); } } } } catch (RuntimeException runtimeexception) { Minecraft.getMinecraft().getLogAgent().logWarningException("Unable to parse metadata section of resourcepack: " + resourcepack.getPackName(), runtimeexception); } catch (IOException ioexception) { Minecraft.getMinecraft().getLogAgent().logWarningException("Unable to parse metadata section of resourcepack: " + resourcepack.getPackName(), ioexception); } } }