Java 类net.minecraft.client.resources.data.PackMetadataSection 实例源码

项目:DecompiledMinecraft    文件:ResourcePackRepository.java   
public void updateResourcePack() throws IOException
{
    this.reResourcePack = (IResourcePack)(this.resourcePackFile.isDirectory() ? new FolderResourcePack(this.resourcePackFile) : new FileResourcePack(this.resourcePackFile));
    this.rePackMetadataSection = (PackMetadataSection)this.reResourcePack.getPackMetadata(ResourcePackRepository.this.rprMetadataSerializer, "pack");

    try
    {
        this.texturePackIcon = this.reResourcePack.getPackImage();
    }
    catch (IOException var2)
    {
        ;
    }

    if (this.texturePackIcon == null)
    {
        this.texturePackIcon = ResourcePackRepository.this.rprDefaultResourcePack.getPackImage();
    }

    this.closeResourcePack();
}
项目:DecompiledMinecraft    文件:ResourcePackListEntryDefault.java   
protected String func_148311_a()
{
    try
    {
        PackMetadataSection packmetadatasection = (PackMetadataSection)this.field_148320_d.getPackMetadata(this.mc.getResourcePackRepository().rprMetadataSerializer, "pack");

        if (packmetadatasection != null)
        {
            return packmetadatasection.getPackDescription().getFormattedText();
        }
    }
    catch (JsonParseException jsonparseexception)
    {
        logger.error((String)"Couldn\'t load metadata info", (Throwable)jsonparseexception);
    }
    catch (IOException ioexception)
    {
        logger.error((String)"Couldn\'t load metadata info", (Throwable)ioexception);
    }

    return EnumChatFormatting.RED + "Missing " + "pack.mcmeta" + " :(";
}
项目:BaseClient    文件:ResourcePackRepository.java   
public void updateResourcePack() throws IOException
{
    this.reResourcePack = (IResourcePack)(this.resourcePackFile.isDirectory() ? new FolderResourcePack(this.resourcePackFile) : new FileResourcePack(this.resourcePackFile));
    this.rePackMetadataSection = (PackMetadataSection)this.reResourcePack.getPackMetadata(ResourcePackRepository.this.rprMetadataSerializer, "pack");

    try
    {
        this.texturePackIcon = this.reResourcePack.getPackImage();
    }
    catch (IOException var2)
    {
        ;
    }

    if (this.texturePackIcon == null)
    {
        this.texturePackIcon = ResourcePackRepository.this.rprDefaultResourcePack.getPackImage();
    }

    this.closeResourcePack();
}
项目:BaseClient    文件:ResourcePackListEntryDefault.java   
protected String func_148311_a()
{
    try
    {
        PackMetadataSection packmetadatasection = (PackMetadataSection)this.field_148320_d.getPackMetadata(this.mc.getResourcePackRepository().rprMetadataSerializer, "pack");

        if (packmetadatasection != null)
        {
            return packmetadatasection.getPackDescription().getFormattedText();
        }
    }
    catch (JsonParseException jsonparseexception)
    {
        logger.error((String)"Couldn\'t load metadata info", (Throwable)jsonparseexception);
    }
    catch (IOException ioexception)
    {
        logger.error((String)"Couldn\'t load metadata info", (Throwable)ioexception);
    }

    return EnumChatFormatting.RED + "Missing " + "pack.mcmeta" + " :(";
}
项目:BaseClient    文件:ResourcePackRepository.java   
public void updateResourcePack() throws IOException
{
    this.reResourcePack = (IResourcePack)(this.resourcePackFile.isDirectory() ? new FolderResourcePack(this.resourcePackFile) : new FileResourcePack(this.resourcePackFile));
    this.rePackMetadataSection = (PackMetadataSection)this.reResourcePack.getPackMetadata(ResourcePackRepository.this.rprMetadataSerializer, "pack");

    try
    {
        this.texturePackIcon = this.reResourcePack.getPackImage();
    }
    catch (IOException var2)
    {
        ;
    }

    if (this.texturePackIcon == null)
    {
        this.texturePackIcon = ResourcePackRepository.this.rprDefaultResourcePack.getPackImage();
    }

    this.closeResourcePack();
}
项目:BaseClient    文件:ResourcePackListEntryDefault.java   
protected String func_148311_a()
{
    try
    {
        PackMetadataSection packmetadatasection = (PackMetadataSection)this.field_148320_d.getPackMetadata(this.mc.getResourcePackRepository().rprMetadataSerializer, "pack");

        if (packmetadatasection != null)
        {
            return packmetadatasection.getPackDescription().getFormattedText();
        }
    }
    catch (JsonParseException jsonparseexception)
    {
        logger.error((String)"Couldn\'t load metadata info", (Throwable)jsonparseexception);
    }
    catch (IOException ioexception)
    {
        logger.error((String)"Couldn\'t load metadata info", (Throwable)ioexception);
    }

    return EnumChatFormatting.RED + "Missing " + "pack.mcmeta" + " :(";
}
项目:Backmemed    文件:ResourcePackListEntryServer.java   
protected String getResourcePackDescription()
{
    try
    {
        PackMetadataSection packmetadatasection = (PackMetadataSection)this.resourcePack.getPackMetadata(this.mc.getResourcePackRepository().rprMetadataSerializer, "pack");

        if (packmetadatasection != null)
        {
            return packmetadatasection.getPackDescription().getFormattedText();
        }
    }
    catch (JsonParseException jsonparseexception)
    {
        LOGGER.error((String)"Couldn\'t load metadata info", (Throwable)jsonparseexception);
    }
    catch (IOException ioexception)
    {
        LOGGER.error((String)"Couldn\'t load metadata info", (Throwable)ioexception);
    }

    return TextFormatting.RED + "Missing " + "pack.mcmeta" + " :(";
}
项目:CustomWorldGen    文件:ResourcePackListEntryServer.java   
protected String getResourcePackDescription()
{
    try
    {
        PackMetadataSection packmetadatasection = (PackMetadataSection)this.resourcePack.getPackMetadata(this.mc.getResourcePackRepository().rprMetadataSerializer, "pack");

        if (packmetadatasection != null)
        {
            return packmetadatasection.getPackDescription().getFormattedText();
        }
    }
    catch (JsonParseException jsonparseexception)
    {
        LOGGER.error((String)"Couldn\'t load metadata info", (Throwable)jsonparseexception);
    }
    catch (IOException ioexception)
    {
        LOGGER.error((String)"Couldn\'t load metadata info", (Throwable)ioexception);
    }

    return TextFormatting.RED + "Missing " + "pack.mcmeta" + " :(";
}
项目:Resilience-Client-Source    文件:ResourcePackRepository.java   
public void updateResourcePack() throws IOException
{
    this.reResourcePack = (IResourcePack)(this.resourcePackFile.isDirectory() ? new FolderResourcePack(this.resourcePackFile) : new FileResourcePack(this.resourcePackFile));
    this.rePackMetadataSection = (PackMetadataSection)this.reResourcePack.getPackMetadata(ResourcePackRepository.this.rprMetadataSerializer, "pack");

    try
    {
        this.texturePackIcon = this.reResourcePack.getPackImage();
    }
    catch (IOException var2)
    {
        ;
    }

    if (this.texturePackIcon == null)
    {
        this.texturePackIcon = ResourcePackRepository.this.rprDefaultResourcePack.getPackImage();
    }

    this.closeResourcePack();
}
项目:Resilience-Client-Source    文件:ResourcePackListEntryDefault.java   
protected String func_148311_a()
{
    try
    {
        PackMetadataSection var1 = (PackMetadataSection)this.field_148320_d.getPackMetadata(this.field_148317_a.getResourcePackRepository().rprMetadataSerializer, "pack");

        if (var1 != null)
        {
            return var1.getPackDescription();
        }
    }
    catch (IOException var2)
    {
        logger.error("Couldn\'t load metadata info", var2);
    }

    return EnumChatFormatting.RED + "Missing " + "pack.mcmeta" + " :(";
}
项目:ExpandedRailsMod    文件:ResourcePackListEntryServer.java   
protected String getResourcePackDescription()
{
    try
    {
        PackMetadataSection packmetadatasection = (PackMetadataSection)this.resourcePack.getPackMetadata(this.mc.getResourcePackRepository().rprMetadataSerializer, "pack");

        if (packmetadatasection != null)
        {
            return packmetadatasection.getPackDescription().getFormattedText();
        }
    }
    catch (JsonParseException jsonparseexception)
    {
        LOGGER.error((String)"Couldn\'t load metadata info", (Throwable)jsonparseexception);
    }
    catch (IOException ioexception)
    {
        LOGGER.error((String)"Couldn\'t load metadata info", (Throwable)ioexception);
    }

    return TextFormatting.RED + "Missing " + "pack.mcmeta" + " :(";
}
项目:Cauldron    文件:ResourcePackRepository.java   
public void updateResourcePack() throws IOException
{
    this.reResourcePack = (IResourcePack)(this.resourcePackFile.isDirectory() ? new FolderResourcePack(this.resourcePackFile) : new FileResourcePack(this.resourcePackFile));
    this.rePackMetadataSection = (PackMetadataSection)this.reResourcePack.getPackMetadata(ResourcePackRepository.this.rprMetadataSerializer, "pack");

    try
    {
        this.texturePackIcon = this.reResourcePack.getPackImage();
    }
    catch (IOException ioexception)
    {
        ;
    }

    if (this.texturePackIcon == null)
    {
        this.texturePackIcon = ResourcePackRepository.this.rprDefaultResourcePack.getPackImage();
    }

    this.closeResourcePack();
}
项目:Cauldron    文件:ResourcePackListEntryDefault.java   
protected String func_148311_a()
{
    try
    {
        PackMetadataSection packmetadatasection = (PackMetadataSection)this.field_148320_d.getPackMetadata(this.field_148317_a.getResourcePackRepository().rprMetadataSerializer, "pack");

        if (packmetadatasection != null)
        {
            return packmetadatasection.func_152805_a().getFormattedText();
        }
    }
    catch (JsonParseException jsonparseexception)
    {
        logger.error("Couldn\'t load metadata info", jsonparseexception);
    }
    catch (IOException ioexception)
    {
        logger.error("Couldn\'t load metadata info", ioexception);
    }

    return EnumChatFormatting.RED + "Missing " + "pack.mcmeta" + " :(";
}
项目:Cauldron    文件:ResourcePackRepository.java   
public void updateResourcePack() throws IOException
{
    this.reResourcePack = (IResourcePack)(this.resourcePackFile.isDirectory() ? new FolderResourcePack(this.resourcePackFile) : new FileResourcePack(this.resourcePackFile));
    this.rePackMetadataSection = (PackMetadataSection)this.reResourcePack.getPackMetadata(ResourcePackRepository.this.rprMetadataSerializer, "pack");

    try
    {
        this.texturePackIcon = this.reResourcePack.getPackImage();
    }
    catch (IOException ioexception)
    {
        ;
    }

    if (this.texturePackIcon == null)
    {
        this.texturePackIcon = ResourcePackRepository.this.rprDefaultResourcePack.getPackImage();
    }

    this.closeResourcePack();
}
项目:Cauldron    文件:ResourcePackListEntryDefault.java   
protected String func_148311_a()
{
    try
    {
        PackMetadataSection packmetadatasection = (PackMetadataSection)this.field_148320_d.getPackMetadata(this.field_148317_a.getResourcePackRepository().rprMetadataSerializer, "pack");

        if (packmetadatasection != null)
        {
            return packmetadatasection.func_152805_a().getFormattedText();
        }
    }
    catch (JsonParseException jsonparseexception)
    {
        logger.error("Couldn\'t load metadata info", jsonparseexception);
    }
    catch (IOException ioexception)
    {
        logger.error("Couldn\'t load metadata info", ioexception);
    }

    return EnumChatFormatting.RED + "Missing " + "pack.mcmeta" + " :(";
}
项目:RuneCraftery    文件:ResourcePackRepositoryEntry.java   
public void func_110516_a() throws IOException {
   this.field_110524_c = (ResourcePack)(this.field_110523_b.isDirectory()?new FolderResourcePack(this.field_110523_b):new FileResourcePack(this.field_110523_b));
   this.field_110521_d = (PackMetadataSection)this.field_110524_c.func_135058_a(this.field_110525_a.field_110621_c, "pack");

   try {
      this.field_110522_e = this.field_110524_c.func_110586_a();
   } catch (IOException var2) {
      ;
   }

   if(this.field_110522_e == null) {
      this.field_110522_e = this.field_110525_a.field_110620_b.func_110586_a();
   }

   this.func_110517_b();
}
项目:RuneCraftery    文件:ResourcePackRepositoryEntry.java   
public void updateResourcePack() throws IOException
{
    this.reResourcePack = (ResourcePack)(this.resourcePackFile.isDirectory() ? new FolderResourcePack(this.resourcePackFile) : new FileResourcePack(this.resourcePackFile));
    this.rePackMetadataSection = (PackMetadataSection)this.reResourcePack.getPackMetadata(this.reResourcePackRepository.rprMetadataSerializer, "pack");

    try
    {
        this.texturePackIcon = this.reResourcePack.getPackImage();
    }
    catch (IOException ioexception)
    {
        ;
    }

    if (this.texturePackIcon == null)
    {
        this.texturePackIcon = this.reResourcePackRepository.rprDefaultResourcePack.getPackImage();
    }

    this.closeResourcePack();
}
项目:BetterNutritionMod    文件:ResourcePackRepositoryEntry.java   
public void updateResourcePack() throws IOException
{
    this.reResourcePack = (ResourcePack)(this.resourcePackFile.isDirectory() ? new FolderResourcePack(this.resourcePackFile) : new FileResourcePack(this.resourcePackFile));
    this.rePackMetadataSection = (PackMetadataSection)this.reResourcePack.getPackMetadata(this.reResourcePackRepository.rprMetadataSerializer, "pack");

    try
    {
        this.texturePackIcon = this.reResourcePack.getPackImage();
    }
    catch (IOException ioexception)
    {
        ;
    }

    if (this.texturePackIcon == null)
    {
        this.texturePackIcon = this.reResourcePackRepository.rprDefaultResourcePack.getPackImage();
    }

    this.closeResourcePack();
}
项目:DecompiledMinecraft    文件:Minecraft.java   
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);
}
项目:BaseClient    文件:Minecraft.java   
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);
}
项目:BaseClient    文件:Minecraft.java   
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);
}
项目:Zombe-Modpack    文件:Minecraft.java   
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);
}
项目:Backmemed    文件:SimpleShaderTexture.java   
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;
}
项目:Backmemed    文件:ResourcePackRepository.java   
private IResourcePack func_191399_b(File p_191399_1_)
{
    IResourcePack iresourcepack;

    if (p_191399_1_.isDirectory())
    {
        iresourcepack = new FolderResourcePack(p_191399_1_);
    }
    else
    {
        iresourcepack = new FileResourcePack(p_191399_1_);
    }

    try
    {
        PackMetadataSection packmetadatasection = (PackMetadataSection)iresourcepack.getPackMetadata(this.rprMetadataSerializer, "pack");

        if (packmetadatasection != null && packmetadatasection.getPackFormat() == 2)
        {
            return new LegacyV2Adapter(iresourcepack);
        }
    }
    catch (Exception var4)
    {
        ;
    }

    return iresourcepack;
}
项目:Backmemed    文件:Minecraft.java   
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);
}
项目:CustomWorldGen    文件:Minecraft.java   
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);
}
项目:ExpandedRailsMod    文件:Minecraft.java   
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);
}
项目:Backmemed    文件:ResourcePackRepository.java   
public void updateResourcePack() throws IOException
{
    this.rePackMetadataSection = (PackMetadataSection)this.reResourcePack.getPackMetadata(ResourcePackRepository.this.rprMetadataSerializer, "pack");
    this.closeResourcePack();
}
项目:CustomWorldGen    文件:ResourcePackRepository.java   
public void updateResourcePack() throws IOException
{
    this.rePackMetadataSection = (PackMetadataSection)this.reResourcePack.getPackMetadata(ResourcePackRepository.this.rprMetadataSerializer, "pack");
    this.closeResourcePack();
}
项目:ExpandedRailsMod    文件:ResourcePackRepository.java   
public void updateResourcePack() throws IOException
{
    this.rePackMetadataSection = (PackMetadataSection)this.reResourcePack.getPackMetadata(ResourcePackRepository.this.rprMetadataSerializer, "pack");
    this.closeResourcePack();
}
项目:RuneCraftery    文件:PackMetadataSectionSerializer.java   
public PackMetadataSection func_110489_a(JsonElement p_110489_1_, Type p_110489_2_, JsonDeserializationContext p_110489_3_) {
   JsonObject var4 = p_110489_1_.getAsJsonObject();
   String var5 = this.func_110486_a(var4.get("description"), "description", (String)null, 1, Integer.MAX_VALUE);
   int var6 = this.func_110485_a(var4.get("pack_format"), "pack_format", (Integer)null, 1, Integer.MAX_VALUE);
   return new PackMetadataSection(var5, var6);
}
项目:RuneCraftery    文件:PackMetadataSectionSerializer.java   
public JsonElement func_110488_a(PackMetadataSection p_110488_1_, Type p_110488_2_, JsonSerializationContext p_110488_3_) {
   JsonObject var4 = new JsonObject();
   var4.addProperty("pack_format", Integer.valueOf(p_110488_1_.func_110462_b()));
   var4.addProperty("description", p_110488_1_.func_110461_a());
   return var4;
}
项目:RuneCraftery    文件:PackMetadataSectionSerializer.java   
public JsonElement serialize(Object p_serialize_1_, Type p_serialize_2_, JsonSerializationContext p_serialize_3_) {
   return this.func_110488_a((PackMetadataSection)p_serialize_1_, p_serialize_2_, p_serialize_3_);
}
项目:RuneCraftery    文件:GuiScreenTemporaryResourcePackSelectSelectionList.java   
protected void func_77214_a(int p_77214_1_, int p_77214_2_, int p_77214_3_, int p_77214_4_, Tessellator p_77214_5_) {
   TextureManager var6 = GuiScreenTemporaryResourcePackSelect.func_110340_f(this.field_110512_a).func_110434_K();
   if(p_77214_1_ == 0) {
      try {
         ResourcePack var12 = this.field_110511_b.field_110620_b;
         PackMetadataSection var13 = (PackMetadataSection)var12.func_135058_a(this.field_110511_b.field_110621_c, "pack");
         if(this.field_110513_h == null) {
            this.field_110513_h = var6.func_110578_a("texturepackicon", new DynamicTexture(var12.func_110586_a()));
         }

         var6.func_110577_a(this.field_110513_h);
         GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
         p_77214_5_.func_78382_b();
         p_77214_5_.func_78378_d(16777215);
         p_77214_5_.func_78374_a((double)p_77214_2_, (double)(p_77214_3_ + p_77214_4_), 0.0D, 0.0D, 1.0D);
         p_77214_5_.func_78374_a((double)(p_77214_2_ + 32), (double)(p_77214_3_ + p_77214_4_), 0.0D, 1.0D, 1.0D);
         p_77214_5_.func_78374_a((double)(p_77214_2_ + 32), (double)p_77214_3_, 0.0D, 1.0D, 0.0D);
         p_77214_5_.func_78374_a((double)p_77214_2_, (double)p_77214_3_, 0.0D, 0.0D, 0.0D);
         p_77214_5_.func_78381_a();
         this.field_110512_a.func_73731_b(GuiScreenTemporaryResourcePackSelect.func_130017_g(this.field_110512_a), "Default", p_77214_2_ + 32 + 2, p_77214_3_ + 1, 16777215);
         this.field_110512_a.func_73731_b(GuiScreenTemporaryResourcePackSelect.func_130016_h(this.field_110512_a), var13.func_110461_a(), p_77214_2_ + 32 + 2, p_77214_3_ + 12 + 10, 8421504);
      } catch (IOException var11) {
         ;
      }

   } else {
      ResourcePackRepositoryEntry var7 = (ResourcePackRepositoryEntry)this.field_110511_b.func_110609_b().get(p_77214_1_ - 1);
      var7.func_110518_a(var6);
      GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
      p_77214_5_.func_78382_b();
      p_77214_5_.func_78378_d(16777215);
      p_77214_5_.func_78374_a((double)p_77214_2_, (double)(p_77214_3_ + p_77214_4_), 0.0D, 0.0D, 1.0D);
      p_77214_5_.func_78374_a((double)(p_77214_2_ + 32), (double)(p_77214_3_ + p_77214_4_), 0.0D, 1.0D, 1.0D);
      p_77214_5_.func_78374_a((double)(p_77214_2_ + 32), (double)p_77214_3_, 0.0D, 1.0D, 0.0D);
      p_77214_5_.func_78374_a((double)p_77214_2_, (double)p_77214_3_, 0.0D, 0.0D, 0.0D);
      p_77214_5_.func_78381_a();
      String var8 = var7.func_110515_d();
      if(var8.length() > 32) {
         var8 = var8.substring(0, 32).trim() + "...";
      }

      this.field_110512_a.func_73731_b(GuiScreenTemporaryResourcePackSelect.func_110337_i(this.field_110512_a), var8, p_77214_2_ + 32 + 2, p_77214_3_ + 1, 16777215);
      List var9 = GuiScreenTemporaryResourcePackSelect.func_110335_j(this.field_110512_a).func_78271_c(var7.func_110519_e(), 183);

      for(int var10 = 0; var10 < 2 && var10 < var9.size(); ++var10) {
         this.field_110512_a.func_73731_b(GuiScreenTemporaryResourcePackSelect.func_110338_k(this.field_110512_a), (String)var9.get(var10), p_77214_2_ + 32 + 2, p_77214_3_ + 12 + 10 * var10, 8421504);
      }

   }
}
项目:RuneCraftery    文件:GuiScreenTemporaryResourcePackSelectSelectionList.java   
protected void drawSlot(int par1, int par2, int par3, int par4, Tessellator par5Tessellator)
{
    TextureManager texturemanager = GuiScreenTemporaryResourcePackSelect.func_110340_f(this.field_110512_a).getTextureManager();

    if (par1 == 0)
    {
        try
        {
            ResourcePack resourcepack = this.field_110511_b.rprDefaultResourcePack;
            PackMetadataSection packmetadatasection = (PackMetadataSection)resourcepack.getPackMetadata(this.field_110511_b.rprMetadataSerializer, "pack");

            if (this.field_110513_h == null)
            {
                this.field_110513_h = texturemanager.getDynamicTextureLocation("texturepackicon", new DynamicTexture(resourcepack.getPackImage()));
            }

            texturemanager.bindTexture(this.field_110513_h);
            GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
            par5Tessellator.startDrawingQuads();
            par5Tessellator.setColorOpaque_I(16777215);
            par5Tessellator.addVertexWithUV((double)par2, (double)(par3 + par4), 0.0D, 0.0D, 1.0D);
            par5Tessellator.addVertexWithUV((double)(par2 + 32), (double)(par3 + par4), 0.0D, 1.0D, 1.0D);
            par5Tessellator.addVertexWithUV((double)(par2 + 32), (double)par3, 0.0D, 1.0D, 0.0D);
            par5Tessellator.addVertexWithUV((double)par2, (double)par3, 0.0D, 0.0D, 0.0D);
            par5Tessellator.draw();
            this.field_110512_a.drawString(GuiScreenTemporaryResourcePackSelect.func_130017_g(this.field_110512_a), "Default", par2 + 32 + 2, par3 + 1, 16777215);
            this.field_110512_a.drawString(GuiScreenTemporaryResourcePackSelect.func_130016_h(this.field_110512_a), packmetadatasection.getPackDescription(), par2 + 32 + 2, par3 + 12 + 10, 8421504);
        }
        catch (IOException ioexception)
        {
            ;
        }
    }
    else
    {
        ResourcePackRepositoryEntry resourcepackrepositoryentry = (ResourcePackRepositoryEntry)this.field_110511_b.getRepositoryEntriesAll().get(par1 - 1);
        resourcepackrepositoryentry.bindTexturePackIcon(texturemanager);
        GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
        par5Tessellator.startDrawingQuads();
        par5Tessellator.setColorOpaque_I(16777215);
        par5Tessellator.addVertexWithUV((double)par2, (double)(par3 + par4), 0.0D, 0.0D, 1.0D);
        par5Tessellator.addVertexWithUV((double)(par2 + 32), (double)(par3 + par4), 0.0D, 1.0D, 1.0D);
        par5Tessellator.addVertexWithUV((double)(par2 + 32), (double)par3, 0.0D, 1.0D, 0.0D);
        par5Tessellator.addVertexWithUV((double)par2, (double)par3, 0.0D, 0.0D, 0.0D);
        par5Tessellator.draw();
        String s = resourcepackrepositoryentry.getResourcePackName();

        if (s.length() > 32)
        {
            s = s.substring(0, 32).trim() + "...";
        }

        this.field_110512_a.drawString(GuiScreenTemporaryResourcePackSelect.func_110337_i(this.field_110512_a), s, par2 + 32 + 2, par3 + 1, 16777215);
        List list = GuiScreenTemporaryResourcePackSelect.func_110335_j(this.field_110512_a).listFormattedStringToWidth(resourcepackrepositoryentry.getTexturePackDescription(), 183);

        for (int i1 = 0; i1 < 2 && i1 < list.size(); ++i1)
        {
            this.field_110512_a.drawString(GuiScreenTemporaryResourcePackSelect.func_110338_k(this.field_110512_a), (String)list.get(i1), par2 + 32 + 2, par3 + 12 + 10 * i1, 8421504);
        }
    }
}
项目:BetterNutritionMod    文件:GuiScreenTemporaryResourcePackSelectSelectionList.java   
protected void drawSlot(int par1, int par2, int par3, int par4, Tessellator par5Tessellator)
{
    TextureManager texturemanager = GuiScreenTemporaryResourcePackSelect.func_110340_f(this.field_110512_a).getTextureManager();

    if (par1 == 0)
    {
        try
        {
            ResourcePack resourcepack = this.field_110511_b.rprDefaultResourcePack;
            PackMetadataSection packmetadatasection = (PackMetadataSection)resourcepack.getPackMetadata(this.field_110511_b.rprMetadataSerializer, "pack");

            if (this.field_110513_h == null)
            {
                this.field_110513_h = texturemanager.getDynamicTextureLocation("texturepackicon", new DynamicTexture(resourcepack.getPackImage()));
            }

            texturemanager.bindTexture(this.field_110513_h);
            GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
            par5Tessellator.startDrawingQuads();
            par5Tessellator.setColorOpaque_I(16777215);
            par5Tessellator.addVertexWithUV((double)par2, (double)(par3 + par4), 0.0D, 0.0D, 1.0D);
            par5Tessellator.addVertexWithUV((double)(par2 + 32), (double)(par3 + par4), 0.0D, 1.0D, 1.0D);
            par5Tessellator.addVertexWithUV((double)(par2 + 32), (double)par3, 0.0D, 1.0D, 0.0D);
            par5Tessellator.addVertexWithUV((double)par2, (double)par3, 0.0D, 0.0D, 0.0D);
            par5Tessellator.draw();
            this.field_110512_a.drawString(GuiScreenTemporaryResourcePackSelect.func_130017_g(this.field_110512_a), "Default", par2 + 32 + 2, par3 + 1, 16777215);
            this.field_110512_a.drawString(GuiScreenTemporaryResourcePackSelect.func_130016_h(this.field_110512_a), packmetadatasection.getPackDescription(), par2 + 32 + 2, par3 + 12 + 10, 8421504);
        }
        catch (IOException ioexception)
        {
            ;
        }
    }
    else
    {
        ResourcePackRepositoryEntry resourcepackrepositoryentry = (ResourcePackRepositoryEntry)this.field_110511_b.getRepositoryEntriesAll().get(par1 - 1);
        resourcepackrepositoryentry.bindTexturePackIcon(texturemanager);
        GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
        par5Tessellator.startDrawingQuads();
        par5Tessellator.setColorOpaque_I(16777215);
        par5Tessellator.addVertexWithUV((double)par2, (double)(par3 + par4), 0.0D, 0.0D, 1.0D);
        par5Tessellator.addVertexWithUV((double)(par2 + 32), (double)(par3 + par4), 0.0D, 1.0D, 1.0D);
        par5Tessellator.addVertexWithUV((double)(par2 + 32), (double)par3, 0.0D, 1.0D, 0.0D);
        par5Tessellator.addVertexWithUV((double)par2, (double)par3, 0.0D, 0.0D, 0.0D);
        par5Tessellator.draw();
        String s = resourcepackrepositoryentry.getResourcePackName();

        if (s.length() > 32)
        {
            s = s.substring(0, 32).trim() + "...";
        }

        this.field_110512_a.drawString(GuiScreenTemporaryResourcePackSelect.func_110337_i(this.field_110512_a), s, par2 + 32 + 2, par3 + 1, 16777215);
        List list = GuiScreenTemporaryResourcePackSelect.func_110335_j(this.field_110512_a).listFormattedStringToWidth(resourcepackrepositoryentry.getTexturePackDescription(), 183);

        for (int i1 = 0; i1 < 2 && i1 < list.size(); ++i1)
        {
            this.field_110512_a.drawString(GuiScreenTemporaryResourcePackSelect.func_110338_k(this.field_110512_a), (String)list.get(i1), par2 + 32 + 2, par3 + 12 + 10 * i1, 8421504);
        }
    }
}