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


Java FontMetadataSection类代码示例

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


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

示例1: registerMetadataSerializers

import net.minecraft.client.resources.data.FontMetadataSection; //导入依赖的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

示例2: registerMetadataSerializers

import net.minecraft.client.resources.data.FontMetadataSection; //导入依赖的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

示例3: makeMetadataSerializer

import net.minecraft.client.resources.data.FontMetadataSection; //导入依赖的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

示例4: func_110490_a

import net.minecraft.client.resources.data.FontMetadataSection; //导入依赖的package包/类
public FontMetadataSection func_110490_a(JsonElement p_110490_1_, Type p_110490_2_, JsonDeserializationContext p_110490_3_) {
   JsonObject var4 = p_110490_1_.getAsJsonObject();
   float[] var5 = new float[256];
   float[] var6 = new float[256];
   float[] var7 = new float[256];
   float var8 = 1.0F;
   float var9 = 0.0F;
   float var10 = 0.0F;
   if(var4.has("characters")) {
      if(!var4.get("characters").isJsonObject()) {
         throw new JsonParseException("Invalid font->characters: expected object, was " + var4.get("characters"));
      }

      JsonObject var11 = var4.getAsJsonObject("characters");
      if(var11.has("default")) {
         if(!var11.get("default").isJsonObject()) {
            throw new JsonParseException("Invalid font->characters->default: expected object, was " + var11.get("default"));
         }

         JsonObject var12 = var11.getAsJsonObject("default");
         var8 = this.func_110487_a(var12.get("width"), "characters->default->width", Float.valueOf(var8), 0.0F, 2.14748365E9F);
         var9 = this.func_110487_a(var12.get("spacing"), "characters->default->spacing", Float.valueOf(var9), 0.0F, 2.14748365E9F);
         var10 = this.func_110487_a(var12.get("left"), "characters->default->left", Float.valueOf(var10), 0.0F, 2.14748365E9F);
      }

      for(int var18 = 0; var18 < 256; ++var18) {
         JsonElement var13 = var11.get(Integer.toString(var18));
         float var14 = var8;
         float var15 = var9;
         float var16 = var10;
         if(var13 != null) {
            if(!var13.isJsonObject()) {
               throw new JsonParseException("Invalid font->characters->" + var18 + ": expected object, was " + var13);
            }

            JsonObject var17 = var13.getAsJsonObject();
            var14 = this.func_110487_a(var17.get("width"), "characters->" + var18 + "->width", Float.valueOf(var8), 0.0F, 2.14748365E9F);
            var15 = this.func_110487_a(var17.get("spacing"), "characters->" + var18 + "->spacing", Float.valueOf(var9), 0.0F, 2.14748365E9F);
            var16 = this.func_110487_a(var17.get("left"), "characters->" + var18 + "->left", Float.valueOf(var10), 0.0F, 2.14748365E9F);
         }

         var5[var18] = var14;
         var6[var18] = var15;
         var7[var18] = var16;
      }
   }

   return new FontMetadataSection(var5, var7, var6);
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:50,代码来源:FontMetadataSectionSerializer.java


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