当前位置: 首页>>代码示例>>Java>>正文


Java LanguageMetadataSection类代码示例

本文整理汇总了Java中net.minecraft.client.resources.data.LanguageMetadataSection的典型用法代码示例。如果您正苦于以下问题:Java LanguageMetadataSection类的具体用法?Java LanguageMetadataSection怎么用?Java LanguageMetadataSection使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


LanguageMetadataSection类属于net.minecraft.client.resources.data包,在下文中一共展示了LanguageMetadataSection类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: parseLanguageMetadata

import net.minecraft.client.resources.data.LanguageMetadataSection; //导入依赖的package包/类
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);
        }
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:32,代码来源:LanguageManager.java

示例2: registerMetadataSerializers

import net.minecraft.client.resources.data.LanguageMetadataSection; //导入依赖的package包/类
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);
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:9,代码来源:Minecraft.java

示例3: registerMetadataSerializers

import net.minecraft.client.resources.data.LanguageMetadataSection; //导入依赖的package包/类
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);
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:13,代码来源:Minecraft.java

示例4: makeMetadataSerializer

import net.minecraft.client.resources.data.LanguageMetadataSection; //导入依赖的package包/类
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;
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:11,代码来源:SimpleShaderTexture.java

示例5: parseLanguageMetadata

import net.minecraft.client.resources.data.LanguageMetadataSection; //导入依赖的package包/类
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});
        }
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:32,代码来源:LanguageManager.java

示例6: parseLanguageMetadata

import net.minecraft.client.resources.data.LanguageMetadataSection; //导入依赖的package包/类
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});
        }
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:32,代码来源:LanguageManager.java

示例7: parseLanguageMetadata

import net.minecraft.client.resources.data.LanguageMetadataSection; //导入依赖的package包/类
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);
        }
    }
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:39,代码来源:LanguageManager.java

示例8: parseLanguageMetadata

import net.minecraft.client.resources.data.LanguageMetadataSection; //导入依赖的package包/类
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);
        }
    }
}
 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:39,代码来源:LanguageManager.java

示例9: func_135020_a

import net.minecraft.client.resources.data.LanguageMetadataSection; //导入依赖的package包/类
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");
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:37,代码来源:LanguageMetadataSectionSerializer.java

示例10: func_135043_a

import net.minecraft.client.resources.data.LanguageMetadataSection; //导入依赖的package包/类
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);
      }
   }

}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:28,代码来源:LanguageManager.java

示例11: parseLanguageMetadata

import net.minecraft.client.resources.data.LanguageMetadataSection; //导入依赖的package包/类
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);
        }
    }
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:39,代码来源:LanguageManager.java


注:本文中的net.minecraft.client.resources.data.LanguageMetadataSection类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。