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

项目:DecompiledMinecraft    文件:DefaultResourcePack.java   
public <T extends IMetadataSection> T getPackMetadata(IMetadataSerializer p_135058_1_, String p_135058_2_) throws IOException
{
    try
    {
        InputStream inputstream = new FileInputStream((File)this.mapAssets.get("pack.mcmeta"));
        return AbstractResourcePack.readMetadata(p_135058_1_, inputstream, p_135058_2_);
    }
    catch (RuntimeException var4)
    {
        return (T)null;
    }
    catch (FileNotFoundException var5)
    {
        return (T)null;
    }
}
项目:BaseClient    文件:DefaultResourcePack.java   
public IMetadataSection getPackMetadata(IMetadataSerializer p_135058_1_, String p_135058_2_) throws IOException
{
    try
    {
        FileInputStream fileinputstream = new FileInputStream((File)this.mapAssets.get("pack.mcmeta"));
        return AbstractResourcePack.readMetadata(p_135058_1_, fileinputstream, p_135058_2_);
    }
    catch (RuntimeException var4)
    {
        return null;
    }
    catch (FileNotFoundException var5)
    {
        return null;
    }
}
项目:BaseClient    文件:DefaultResourcePack.java   
public <T extends IMetadataSection> T getPackMetadata(IMetadataSerializer p_135058_1_, String p_135058_2_) throws IOException
{
    try
    {
        InputStream inputstream = new FileInputStream((File)this.mapAssets.get("pack.mcmeta"));
        return AbstractResourcePack.readMetadata(p_135058_1_, inputstream, p_135058_2_);
    }
    catch (RuntimeException var4)
    {
        return (T)null;
    }
    catch (FileNotFoundException var5)
    {
        return (T)null;
    }
}
项目:Backmemed    文件:DefaultResourcePack.java   
@Nullable
public <T extends IMetadataSection> T getPackMetadata(MetadataSerializer metadataSerializer, String metadataSectionName) throws IOException
{
    try
    {
        InputStream inputstream = new FileInputStream(this.resourceIndex.getPackMcmeta());
        return AbstractResourcePack.readMetadata(metadataSerializer, inputstream, metadataSectionName);
    }
    catch (RuntimeException var4)
    {
        return (T)((IMetadataSection)null);
    }
    catch (FileNotFoundException var5)
    {
        return (T)((IMetadataSection)null);
    }
}
项目:CustomWorldGen    文件:DefaultResourcePack.java   
public <T extends IMetadataSection> T getPackMetadata(MetadataSerializer metadataSerializer, String metadataSectionName) throws IOException
{
    try
    {
        InputStream inputstream = new FileInputStream(this.resourceIndex.getPackMcmeta());
        return AbstractResourcePack.readMetadata(metadataSerializer, inputstream, metadataSectionName);
    }
    catch (RuntimeException var4)
    {
        return (T)null;
    }
    catch (FileNotFoundException var5)
    {
        return (T)null;
    }
}
项目:Resilience-Client-Source    文件:AbstractResourcePack.java   
static IMetadataSection readMetadata(IMetadataSerializer par0MetadataSerializer, InputStream par1InputStream, String par2Str)
{
    JsonObject var3 = null;
    BufferedReader var4 = null;

    try
    {
        var4 = new BufferedReader(new InputStreamReader(par1InputStream, Charsets.UTF_8));
        var3 = (new JsonParser()).parse(var4).getAsJsonObject();
    }
    finally
    {
        IOUtils.closeQuietly(var4);
    }

    return par0MetadataSerializer.parseMetadataSection(par2Str, var3);
}
项目:ExpandedRailsMod    文件:AbstractResourcePack.java   
static <T extends IMetadataSection> T readMetadata(MetadataSerializer metadataSerializer, InputStream p_110596_1_, String sectionName)
{
    JsonObject jsonobject = null;
    BufferedReader bufferedreader = null;

    try
    {
        bufferedreader = new BufferedReader(new InputStreamReader(p_110596_1_, Charsets.UTF_8));
        jsonobject = (new JsonParser()).parse((Reader)bufferedreader).getAsJsonObject();
    }
    catch (RuntimeException runtimeexception)
    {
        throw new JsonParseException(runtimeexception);
    }
    finally
    {
        IOUtils.closeQuietly((Reader)bufferedreader);
    }

    return metadataSerializer.parseMetadataSection(sectionName, jsonobject);
}
项目:ExpandedRailsMod    文件:DefaultResourcePack.java   
public <T extends IMetadataSection> T getPackMetadata(MetadataSerializer metadataSerializer, String metadataSectionName) throws IOException
{
    try
    {
        InputStream inputstream = new FileInputStream(this.resourceIndex.getPackMcmeta());
        return AbstractResourcePack.readMetadata(metadataSerializer, inputstream, metadataSectionName);
    }
    catch (RuntimeException var4)
    {
        return (T)null;
    }
    catch (FileNotFoundException var5)
    {
        return (T)null;
    }
}
项目:Cauldron    文件:AbstractResourcePack.java   
static IMetadataSection readMetadata(IMetadataSerializer p_110596_0_, InputStream p_110596_1_, String p_110596_2_)
{
    JsonObject jsonobject = null;
    BufferedReader bufferedreader = null;

    try
    {
        bufferedreader = new BufferedReader(new InputStreamReader(p_110596_1_, Charsets.UTF_8));
        jsonobject = (new JsonParser()).parse(bufferedreader).getAsJsonObject();
    }
    catch (RuntimeException runtimeexception)
    {
        throw new JsonParseException(runtimeexception);
    }
    finally
    {
        IOUtils.closeQuietly(bufferedreader);
    }

    return p_110596_0_.parseMetadataSection(p_110596_2_, jsonobject);
}
项目:Cauldron    文件:DefaultResourcePack.java   
public IMetadataSection getPackMetadata(IMetadataSerializer p_135058_1_, String p_135058_2_) throws IOException
{
    try
    {
        FileInputStream fileinputstream = new FileInputStream((File)this.field_152781_b.get("pack.mcmeta"));
        return AbstractResourcePack.readMetadata(p_135058_1_, fileinputstream, p_135058_2_);
    }
    catch (RuntimeException runtimeexception)
    {
        return null;
    }
    catch (FileNotFoundException filenotfoundexception)
    {
        return null;
    }
}
项目:Cauldron    文件:AbstractResourcePack.java   
static IMetadataSection readMetadata(IMetadataSerializer p_110596_0_, InputStream p_110596_1_, String p_110596_2_)
{
    JsonObject jsonobject = null;
    BufferedReader bufferedreader = null;

    try
    {
        bufferedreader = new BufferedReader(new InputStreamReader(p_110596_1_, Charsets.UTF_8));
        jsonobject = (new JsonParser()).parse(bufferedreader).getAsJsonObject();
    }
    catch (RuntimeException runtimeexception)
    {
        throw new JsonParseException(runtimeexception);
    }
    finally
    {
        IOUtils.closeQuietly(bufferedreader);
    }

    return p_110596_0_.parseMetadataSection(p_110596_2_, jsonobject);
}
项目:Cauldron    文件:DefaultResourcePack.java   
public IMetadataSection getPackMetadata(IMetadataSerializer p_135058_1_, String p_135058_2_) throws IOException
{
    try
    {
        FileInputStream fileinputstream = new FileInputStream((File)this.field_152781_b.get("pack.mcmeta"));
        return AbstractResourcePack.readMetadata(p_135058_1_, fileinputstream, p_135058_2_);
    }
    catch (RuntimeException runtimeexception)
    {
        return null;
    }
    catch (FileNotFoundException filenotfoundexception)
    {
        return null;
    }
}
项目:InspiringWorld    文件:ExternalResource.java   
@Override
public <T extends IMetadataSection> T getPackMetadata(MetadataSerializer metadataSerializer, String
        metadataSectionName) throws IOException
{
    TypeUtils.cast(new ByteArrayInputStream(("{\n" +
            " \"pack\": {\n" +
            "   \"description\": \"dummy FML pack for " + container.getName() + "\",\n" +
            "   \"pack_format\": 1\n" +
            "}\n" +
            "}").getBytes(Charsets.UTF_8)));
    JsonObject jsonobject = null;
    BufferedReader bufferedreader = null;

    try
    {
        bufferedreader = new BufferedReader(new InputStreamReader(new ByteArrayInputStream(("{\n" +
                " \"pack\": {\n" +
                "   \"description\": \"dummy FML pack for " + container.getName() + "\",\n" +
                "   \"pack_format\": 1\n" +
                "}\n" +
                "}").getBytes(Charsets.UTF_8))));
        jsonobject = (new JsonParser()).parse(bufferedreader).getAsJsonObject();
    }
    catch (RuntimeException runtimeexception)
    {
        throw new JsonParseException(runtimeexception);
    }
    finally
    {
        IOUtils.closeQuietly(bufferedreader);
    }

    return metadataSerializer.parseMetadataSection(metadataSectionName, jsonobject);
}
项目:Resilience-Client-Source    文件:SimpleResource.java   
public IMetadataSection getMetadata(String par1Str)
{
    if (!this.hasMetadata())
    {
        return null;
    }
    else
    {
        if (this.mcmetaJson == null && !this.mcmetaJsonChecked)
        {
            this.mcmetaJsonChecked = true;
            BufferedReader var2 = null;

            try
            {
                var2 = new BufferedReader(new InputStreamReader(this.mcmetaInputStream));
                this.mcmetaJson = (new JsonParser()).parse(var2).getAsJsonObject();
            }
            finally
            {
                IOUtils.closeQuietly(var2);
            }
        }

        IMetadataSection var6 = (IMetadataSection)this.mapMetadataSections.get(par1Str);

        if (var6 == null)
        {
            var6 = this.srMetadataSerializer.parseMetadataSection(par1Str, this.mcmetaJson);
        }

        return var6;
    }
}
项目:Resilience-Client-Source    文件:DefaultResourcePack.java   
public IMetadataSection getPackMetadata(IMetadataSerializer par1MetadataSerializer, String par2Str) throws IOException
{
    try
    {
        return AbstractResourcePack.readMetadata(par1MetadataSerializer, new FileInputStream(new File(this.fileAssets, "pack.mcmeta")), par2Str);
    }
    catch (FileNotFoundException var4)
    {
        return null;
    }
}
项目:Additional-Resources    文件:LooseFilesResourcePack.java   
@Override
public IMetadataSection getPackMetadata(IMetadataSerializer metadataSerializer, String p_135058_2_) throws IOException {
    String fakePackMeta = "" +
            "{\n" +
            "  'pack': { \n" +
            "    'description': 'Additional resource files',\n" +
            "    'pack_format': 1\n" +
            "  }\n" +
            "}";
    fakePackMeta = fakePackMeta.replaceAll("'", "\"");
    JsonObject fakePackMetaJson = new JsonParser().parse(fakePackMeta).getAsJsonObject();

    return metadataSerializer.parseMetadataSection(p_135058_2_, fakePackMetaJson);
}
项目:ExpandedRailsMod    文件:SimpleResource.java   
@Nullable
public <T extends IMetadataSection> T getMetadata(String sectionName)
{
    if (!this.hasMetadata())
    {
        return (T)null;
    }
    else
    {
        if (this.mcmetaJson == null && !this.mcmetaJsonChecked)
        {
            this.mcmetaJsonChecked = true;
            BufferedReader bufferedreader = null;

            try
            {
                bufferedreader = new BufferedReader(new InputStreamReader(this.mcmetaInputStream));
                this.mcmetaJson = (new JsonParser()).parse((Reader)bufferedreader).getAsJsonObject();
            }
            finally
            {
                IOUtils.closeQuietly((Reader)bufferedreader);
            }
        }

        T t = (T)this.mapMetadataSections.get(sectionName);

        if (t == null)
        {
            t = this.srMetadataSerializer.parseMetadataSection(sectionName, this.mcmetaJson);
        }

        return t;
    }
}
项目:Cauldron    文件:SimpleResource.java   
public IMetadataSection getMetadata(String p_110526_1_)
{
    if (!this.hasMetadata())
    {
        return null;
    }
    else
    {
        if (this.mcmetaJson == null && !this.mcmetaJsonChecked)
        {
            this.mcmetaJsonChecked = true;
            BufferedReader bufferedreader = null;

            try
            {
                bufferedreader = new BufferedReader(new InputStreamReader(this.mcmetaInputStream));
                this.mcmetaJson = (new JsonParser()).parse(bufferedreader).getAsJsonObject();
            }
            finally
            {
                IOUtils.closeQuietly(bufferedreader);
            }
        }

        IMetadataSection imetadatasection = (IMetadataSection)this.mapMetadataSections.get(p_110526_1_);

        if (imetadatasection == null)
        {
            imetadatasection = this.srMetadataSerializer.parseMetadataSection(p_110526_1_, this.mcmetaJson);
        }

        return imetadatasection;
    }
}
项目:Cauldron    文件:SimpleResource.java   
public IMetadataSection getMetadata(String p_110526_1_)
{
    if (!this.hasMetadata())
    {
        return null;
    }
    else
    {
        if (this.mcmetaJson == null && !this.mcmetaJsonChecked)
        {
            this.mcmetaJsonChecked = true;
            BufferedReader bufferedreader = null;

            try
            {
                bufferedreader = new BufferedReader(new InputStreamReader(this.mcmetaInputStream));
                this.mcmetaJson = (new JsonParser()).parse(bufferedreader).getAsJsonObject();
            }
            finally
            {
                IOUtils.closeQuietly(bufferedreader);
            }
        }

        IMetadataSection imetadatasection = (IMetadataSection)this.mapMetadataSections.get(p_110526_1_);

        if (imetadatasection == null)
        {
            imetadatasection = this.srMetadataSerializer.parseMetadataSection(p_110526_1_, this.mcmetaJson);
        }

        return imetadatasection;
    }
}
项目:CartLivery    文件:LiveryTextureRegistry.java   
@Override
public IMetadataSection parseMetadataSection(String type, JsonObject json) {
    LiveryListMetadata result = new LiveryListMetadata();
    if (json.has("cartlivery") && json.get("cartlivery").isJsonObject()) {
        JsonObject clMetaSection = json.getAsJsonObject("cartlivery");
        if (clMetaSection.has("liverylist") && clMetaSection.get("liverylist").isJsonArray()) {
            for (JsonElement liveryElem : clMetaSection.getAsJsonArray("liverylist")) {
                if (liveryElem.isJsonPrimitive()) result.definedLiveries.add(liveryElem.getAsString());
            }
        }
    }
    return result;
}
项目:Novous    文件:LinkedResourceManager.java   
@Nullable
@Override
public <T extends IMetadataSection> T getMetadata(String sectionName) {
    return null;
}
项目:DecompiledMinecraft    文件:AbstractResourcePack.java   
public <T extends IMetadataSection> T getPackMetadata(IMetadataSerializer p_135058_1_, String p_135058_2_) throws IOException
{
    return readMetadata(p_135058_1_, this.getInputStreamByName("pack.mcmeta"), p_135058_2_);
}
项目:BaseClient    文件:AbstractResourcePack.java   
public IMetadataSection getPackMetadata(IMetadataSerializer p_135058_1_, String p_135058_2_) throws IOException
{
    return readMetadata(p_135058_1_, this.getInputStreamByName("pack.mcmeta"), p_135058_2_);
}
项目:BaseClient    文件:AbstractResourcePack.java   
public <T extends IMetadataSection> T getPackMetadata(IMetadataSerializer p_135058_1_, String p_135058_2_) throws IOException
{
    return readMetadata(p_135058_1_, this.getInputStreamByName("pack.mcmeta"), p_135058_2_);
}
项目:Backmemed    文件:AbstractResourcePack.java   
public <T extends IMetadataSection> T getPackMetadata(MetadataSerializer metadataSerializer, String metadataSectionName) throws IOException
{
    return readMetadata(metadataSerializer, this.getInputStreamByName("pack.mcmeta"), metadataSectionName);
}
项目:Backmemed    文件:IResourcePack.java   
@Nullable
<T extends IMetadataSection> T getPackMetadata(MetadataSerializer metadataSerializer, String metadataSectionName) throws IOException;
项目:Backmemed    文件:LegacyV2Adapter.java   
@Nullable
public <T extends IMetadataSection> T getPackMetadata(MetadataSerializer metadataSerializer, String metadataSectionName) throws IOException
{
    return this.field_191383_a.getPackMetadata(metadataSerializer, metadataSectionName);
}
项目:Backmemed    文件:IResource.java   
@Nullable
<T extends IMetadataSection> T getMetadata(String sectionName);
项目:CustomWorldGen    文件:AbstractResourcePack.java   
public <T extends IMetadataSection> T getPackMetadata(MetadataSerializer metadataSerializer, String metadataSectionName) throws IOException
{
    return readMetadata(metadataSerializer, this.getInputStreamByName("pack.mcmeta"), metadataSectionName);
}
项目:CustomWorldGen    文件:IResource.java   
@Nullable
<T extends IMetadataSection> T getMetadata(String sectionName);
项目:ExtraUtilities    文件:TConTextureResourcePackBase.java   
public IMetadataSection getPackMetadata(final IMetadataSerializer p_135058_1_, final String p_135058_2_) throws IOException {
    return null;
}
项目:CustomAchievements    文件:AchievementResourcePack.java   
@Override
public <T extends IMetadataSection> T getPackMetadata(MetadataSerializer metadataSerializer, String metadataSectionName) throws IOException {
    return null;
}
项目:DynamicSurroundings    文件:ResourcePacks.java   
@Override
@Nullable
public <T extends IMetadataSection> T getPackMetadata(MetadataSerializer metadataSerializer,
        String metadataSectionName) throws IOException {
    return null;
}
项目:CodeChickenLib    文件:CustomIResource.java   
@Nullable
@Override
public <T extends IMetadataSection> T getMetadata(String sectionName) {
    return wrapped.getMetadata(sectionName);
}
项目:ShadyMod    文件:VirtualResource.java   
@Override
public IMetadataSection getMetadata(String p_110526_1_)
{
    return null;
}
项目:NoTimeFix    文件:NoTimeFixResourcePack.java   
@Override
public IMetadataSection getPackMetadata(IMetadataSerializer p_135058_1_, String p_135058_2_) throws IOException {
    return null;
}
项目:Structures    文件:ResourceModContainer.java   
@Override
public IMetadataSection getPackMetadata(IMetadataSerializer p_135058_1_, String p_135058_2_) throws IOException {    
  return null;
}
项目:NewRadicalBotany    文件:NewRadicalBotanyResourcePack.java   
@Override
public IMetadataSection getPackMetadata(IMetadataSerializer p_135058_1_, String p_135058_2_) throws IOException {
    return null;
}
项目:BlightCore    文件:BlightCoreResourcePack.java   
@Override
public IMetadataSection getPackMetadata(IMetadataSerializer p_135058_1_, String p_135058_2_) throws IOException {
    return null;
}
项目:EightInSeven    文件:EightInSevenResourcePack.java   
@Override
public IMetadataSection getPackMetadata(IMetadataSerializer p_135058_1_, String p_135058_2_) throws IOException {
    return null;
}