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

项目: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;
    }
}
项目: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);
}
项目: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;
    }
}
项目:DecompiledMinecraft    文件:SimpleResource.java   
public SimpleResource(String resourcePackNameIn, ResourceLocation srResourceLocationIn, InputStream resourceInputStreamIn, InputStream mcmetaInputStreamIn, IMetadataSerializer srMetadataSerializerIn)
{
    this.resourcePackName = resourcePackNameIn;
    this.srResourceLocation = srResourceLocationIn;
    this.resourceInputStream = resourceInputStreamIn;
    this.mcmetaInputStream = mcmetaInputStreamIn;
    this.srMetadataSerializer = srMetadataSerializerIn;
}
项目:DecompiledMinecraft    文件:ResourcePackRepository.java   
public ResourcePackRepository(File dirResourcepacksIn, File dirServerResourcepacksIn, IResourcePack rprDefaultResourcePackIn, IMetadataSerializer rprMetadataSerializerIn, GameSettings settings)
{
    this.dirResourcepacks = dirResourcepacksIn;
    this.dirServerResourcepacks = dirServerResourcepacksIn;
    this.rprDefaultResourcePack = rprDefaultResourcePackIn;
    this.rprMetadataSerializer = rprMetadataSerializerIn;
    this.fixDirResourcepacks();
    this.updateRepositoryEntriesAll();
    Iterator<String> iterator = settings.resourcePacks.iterator();

    while (iterator.hasNext())
    {
        String s = (String)iterator.next();

        for (ResourcePackRepository.Entry resourcepackrepository$entry : this.repositoryEntriesAll)
        {
            if (resourcepackrepository$entry.getResourcePackName().equals(s))
            {
                if (resourcepackrepository$entry.func_183027_f() == 1 || settings.field_183018_l.contains(resourcepackrepository$entry.getResourcePackName()))
                {
                    this.repositoryEntries.add(resourcepackrepository$entry);
                    break;
                }

                iterator.remove();
                logger.warn("Removed selected resource pack {} because it\'s no longer compatible", new Object[] {resourcepackrepository$entry.getResourcePackName()});
            }
        }
    }
}
项目:BaseClient    文件:SimpleResource.java   
public SimpleResource(String resourcePackNameIn, ResourceLocation srResourceLocationIn, InputStream resourceInputStreamIn, InputStream mcmetaInputStreamIn, IMetadataSerializer srMetadataSerializerIn)
{
    this.resourcePackName = resourcePackNameIn;
    this.srResourceLocation = srResourceLocationIn;
    this.resourceInputStream = resourceInputStreamIn;
    this.mcmetaInputStream = mcmetaInputStreamIn;
    this.srMetadataSerializer = srMetadataSerializerIn;
}
项目:BaseClient    文件:ResourcePackRepository.java   
public ResourcePackRepository(File dirResourcepacksIn, File dirServerResourcepacksIn, IResourcePack rprDefaultResourcePackIn, IMetadataSerializer rprMetadataSerializerIn, GameSettings settings)
{
    this.dirResourcepacks = dirResourcepacksIn;
    this.dirServerResourcepacks = dirServerResourcepacksIn;
    this.rprDefaultResourcePack = rprDefaultResourcePackIn;
    this.rprMetadataSerializer = rprMetadataSerializerIn;
    this.fixDirResourcepacks();
    this.updateRepositoryEntriesAll();
    Iterator<String> iterator = settings.resourcePacks.iterator();

    while (iterator.hasNext())
    {
        String s = (String)iterator.next();

        for (ResourcePackRepository.Entry resourcepackrepository$entry : this.repositoryEntriesAll)
        {
            if (resourcepackrepository$entry.getResourcePackName().equals(s))
            {
                if (resourcepackrepository$entry.func_183027_f() == 1 || settings.field_183018_l.contains(resourcepackrepository$entry.getResourcePackName()))
                {
                    this.repositoryEntries.add(resourcepackrepository$entry);
                    break;
                }

                iterator.remove();
                logger.warn("Removed selected resource pack {} because it\'s no longer compatible", new Object[] {resourcepackrepository$entry.getResourcePackName()});
            }
        }
    }
}
项目:BaseClient    文件:SimpleResource.java   
public SimpleResource(String resourcePackNameIn, ResourceLocation srResourceLocationIn, InputStream resourceInputStreamIn, InputStream mcmetaInputStreamIn, IMetadataSerializer srMetadataSerializerIn)
{
    this.resourcePackName = resourcePackNameIn;
    this.srResourceLocation = srResourceLocationIn;
    this.resourceInputStream = resourceInputStreamIn;
    this.mcmetaInputStream = mcmetaInputStreamIn;
    this.srMetadataSerializer = srMetadataSerializerIn;
}
项目:BaseClient    文件:ResourcePackRepository.java   
public ResourcePackRepository(File dirResourcepacksIn, File dirServerResourcepacksIn, IResourcePack rprDefaultResourcePackIn, IMetadataSerializer rprMetadataSerializerIn, GameSettings settings)
{
    this.dirResourcepacks = dirResourcepacksIn;
    this.dirServerResourcepacks = dirServerResourcepacksIn;
    this.rprDefaultResourcePack = rprDefaultResourcePackIn;
    this.rprMetadataSerializer = rprMetadataSerializerIn;
    this.fixDirResourcepacks();
    this.updateRepositoryEntriesAll();
    Iterator<String> iterator = settings.resourcePacks.iterator();

    while (iterator.hasNext())
    {
        String s = (String)iterator.next();

        for (ResourcePackRepository.Entry resourcepackrepository$entry : this.repositoryEntriesAll)
        {
            if (resourcepackrepository$entry.getResourcePackName().equals(s))
            {
                if (resourcepackrepository$entry.func_183027_f() == 1 || settings.field_183018_l.contains(resourcepackrepository$entry.getResourcePackName()))
                {
                    this.repositoryEntries.add(resourcepackrepository$entry);
                    break;
                }

                iterator.remove();
                logger.warn("Removed selected resource pack {} because it\'s no longer compatible", new Object[] {resourcepackrepository$entry.getResourcePackName()});
            }
        }
    }
}
项目:ShadyMod    文件:ShadyResManager.java   
private IResource load(ResourceLocation var1)
{
    for(VirtualResource virtual : virtuals)
    {
        if(virtual.getResourceLocation().getResourceDomain().equals(var1.getResourceDomain()) && virtual.getResourceLocation().getResourcePath().equals(var1.getResourcePath()))
        {
            System.out.println("fetched virtual " + var1.getResourceDomain() + ":" + var1.getResourcePath());
            return virtual.copy();
        }
    }
    for(String domain : domains)
    {
        InputStream in = getInputStream(domain, var1);
        if(in == null)
        {
            try
            {
                IResource res = parent.getResource(var1);
                if(res != null)
                    return res;
            }
            catch(IOException e)
            {
                ; // File doesn't exist
            }
            continue;
        }
        return new SimpleResource(domain, var1, in, null, new IMetadataSerializer());
    }
    return null;
}
项目:Resilience-Client-Source    文件:SimpleResource.java   
public SimpleResource(ResourceLocation par1ResourceLocation, InputStream par2InputStream, InputStream par3InputStream, IMetadataSerializer par4MetadataSerializer)
{
    this.srResourceLocation = par1ResourceLocation;
    this.resourceInputStream = par2InputStream;
    this.mcmetaInputStream = par3InputStream;
    this.srMetadataSerializer = par4MetadataSerializer;
}
项目:Resilience-Client-Source    文件:ResourcePackRepository.java   
public ResourcePackRepository(File p_i45101_1_, File p_i45101_2_, IResourcePack p_i45101_3_, IMetadataSerializer p_i45101_4_, GameSettings p_i45101_5_)
{
    this.dirResourcepacks = p_i45101_1_;
    this.field_148534_e = p_i45101_2_;
    this.rprDefaultResourcePack = p_i45101_3_;
    this.rprMetadataSerializer = p_i45101_4_;
    this.fixDirResourcepacks();
    this.updateRepositoryEntriesAll();
    Iterator var6 = p_i45101_5_.resourcePacks.iterator();

    while (var6.hasNext())
    {
        String var7 = (String)var6.next();
        Iterator var8 = this.repositoryEntriesAll.iterator();

        while (var8.hasNext())
        {
            ResourcePackRepository.Entry var9 = (ResourcePackRepository.Entry)var8.next();

            if (var9.getResourcePackName().equals(var7))
            {
                this.repositoryEntries.add(var9);
                break;
            }
        }
    }
}
项目: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);
}
项目:Cauldron    文件:SimpleResource.java   
public SimpleResource(ResourceLocation p_i1300_1_, InputStream p_i1300_2_, InputStream p_i1300_3_, IMetadataSerializer p_i1300_4_)
{
    this.srResourceLocation = p_i1300_1_;
    this.resourceInputStream = p_i1300_2_;
    this.mcmetaInputStream = p_i1300_3_;
    this.srMetadataSerializer = p_i1300_4_;
}
项目:Cauldron    文件:ResourcePackRepository.java   
public ResourcePackRepository(File p_i45101_1_, File p_i45101_2_, IResourcePack p_i45101_3_, IMetadataSerializer p_i45101_4_, GameSettings p_i45101_5_)
{
    this.dirResourcepacks = p_i45101_1_;
    this.field_148534_e = p_i45101_2_;
    this.rprDefaultResourcePack = p_i45101_3_;
    this.rprMetadataSerializer = p_i45101_4_;
    this.fixDirResourcepacks();
    this.updateRepositoryEntriesAll();
    Iterator iterator = p_i45101_5_.resourcePacks.iterator();

    while (iterator.hasNext())
    {
        String s = (String)iterator.next();
        Iterator iterator1 = this.repositoryEntriesAll.iterator();

        while (iterator1.hasNext())
        {
            ResourcePackRepository.Entry entry = (ResourcePackRepository.Entry)iterator1.next();

            if (entry.getResourcePackName().equals(s))
            {
                this.repositoryEntries.add(entry);
                break;
            }
        }
    }
}
项目:Cauldron    文件:SimpleResource.java   
public SimpleResource(ResourceLocation p_i1300_1_, InputStream p_i1300_2_, InputStream p_i1300_3_, IMetadataSerializer p_i1300_4_)
{
    this.srResourceLocation = p_i1300_1_;
    this.resourceInputStream = p_i1300_2_;
    this.mcmetaInputStream = p_i1300_3_;
    this.srMetadataSerializer = p_i1300_4_;
}
项目:Cauldron    文件:ResourcePackRepository.java   
public ResourcePackRepository(File p_i45101_1_, File p_i45101_2_, IResourcePack p_i45101_3_, IMetadataSerializer p_i45101_4_, GameSettings p_i45101_5_)
{
    this.dirResourcepacks = p_i45101_1_;
    this.field_148534_e = p_i45101_2_;
    this.rprDefaultResourcePack = p_i45101_3_;
    this.rprMetadataSerializer = p_i45101_4_;
    this.fixDirResourcepacks();
    this.updateRepositoryEntriesAll();
    Iterator iterator = p_i45101_5_.resourcePacks.iterator();

    while (iterator.hasNext())
    {
        String s = (String)iterator.next();
        Iterator iterator1 = this.repositoryEntriesAll.iterator();

        while (iterator1.hasNext())
        {
            ResourcePackRepository.Entry entry = (ResourcePackRepository.Entry)iterator1.next();

            if (entry.getResourcePackName().equals(s))
            {
                this.repositoryEntries.add(entry);
                break;
            }
        }
    }
}
项目: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_);
}
项目:DecompiledMinecraft    文件:FallbackResourceManager.java   
public FallbackResourceManager(IMetadataSerializer frmMetadataSerializerIn)
{
    this.frmMetadataSerializer = frmMetadataSerializerIn;
}
项目:DecompiledMinecraft    文件:LanguageManager.java   
public LanguageManager(IMetadataSerializer theMetadataSerializerIn, String currentLanguageIn)
{
    this.theMetadataSerializer = theMetadataSerializerIn;
    this.currentLanguage = currentLanguageIn;
    I18n.setLocale(currentLocale);
}
项目:DecompiledMinecraft    文件:SimpleReloadableResourceManager.java   
public SimpleReloadableResourceManager(IMetadataSerializer rmMetadataSerializerIn)
{
    this.rmMetadataSerializer = rmMetadataSerializerIn;
}
项目: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    文件:FallbackResourceManager.java   
public FallbackResourceManager(IMetadataSerializer frmMetadataSerializerIn)
{
    this.frmMetadataSerializer = frmMetadataSerializerIn;
}
项目:BaseClient    文件:LanguageManager.java   
public LanguageManager(IMetadataSerializer theMetadataSerializerIn, String currentLanguageIn)
{
    this.theMetadataSerializer = theMetadataSerializerIn;
    this.currentLanguage = currentLanguageIn;
    I18n.setLocale(currentLocale);
}
项目:BaseClient    文件:SimpleReloadableResourceManager.java   
public SimpleReloadableResourceManager(IMetadataSerializer rmMetadataSerializerIn)
{
    this.rmMetadataSerializer = rmMetadataSerializerIn;
}
项目: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_);
}
项目:BaseClient    文件:FallbackResourceManager.java   
public FallbackResourceManager(IMetadataSerializer frmMetadataSerializerIn)
{
    this.frmMetadataSerializer = frmMetadataSerializerIn;
}
项目:BaseClient    文件:LanguageManager.java   
public LanguageManager(IMetadataSerializer theMetadataSerializerIn, String currentLanguageIn)
{
    this.theMetadataSerializer = theMetadataSerializerIn;
    this.currentLanguage = currentLanguageIn;
    I18n.setLocale(currentLocale);
}
项目:BaseClient    文件:SimpleReloadableResourceManager.java   
public SimpleReloadableResourceManager(IMetadataSerializer rmMetadataSerializerIn)
{
    this.rmMetadataSerializer = rmMetadataSerializerIn;
}
项目:ExtraUtilities    文件:TConTextureResourcePackBase.java   
public IMetadataSection getPackMetadata(final IMetadataSerializer p_135058_1_, final String p_135058_2_) throws IOException {
    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;
}