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


Java IResourcePack类代码示例

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


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

示例1: getTextureAnimations

import net.minecraft.client.resources.IResourcePack; //导入依赖的package包/类
public static TextureAnimation[] getTextureAnimations(IResourcePack[] p_getTextureAnimations_0_)
{
    List list = new ArrayList();

    for (int i = 0; i < p_getTextureAnimations_0_.length; ++i)
    {
        IResourcePack iresourcepack = p_getTextureAnimations_0_[i];
        TextureAnimation[] atextureanimation = getTextureAnimations(iresourcepack);

        if (atextureanimation != null)
        {
        	list.addAll(Arrays.asList(atextureanimation));
        }
    }

    TextureAnimation[] atextureanimation1 = (TextureAnimation[])((TextureAnimation[])list.toArray(new TextureAnimation[list.size()]));
    return atextureanimation1;
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:19,代码来源:TextureAnimations.java

示例2: makePotionImageProperties

import net.minecraft.client.resources.IResourcePack; //导入依赖的package包/类
private static Map makePotionImageProperties(IResourcePack p_makePotionImageProperties_0_, boolean p_makePotionImageProperties_1_)
{
    Map map = new HashMap();
    String s = p_makePotionImageProperties_1_ ? "splash/" : "normal/";
    String[] astring = new String[] {"mcpatcher/cit/potion/" + s, "mcpatcher/cit/Potion/" + s};
    String[] astring1 = new String[] {".png"};
    String[] astring2 = ResUtils.collectFiles(p_makePotionImageProperties_0_, astring, astring1);

    for (int i = 0; i < astring2.length; ++i)
    {
        String s1 = astring2[i];
        String name = StrUtils.removePrefixSuffix(s1, astring, astring1);
        Properties properties = makePotionProperties(name, p_makePotionImageProperties_1_, s1);

        if (properties != null)
        {
            String s3 = StrUtils.removeSuffix(s1, astring1) + ".properties";
            CustomItemProperties customitemproperties = new CustomItemProperties(properties, s3);
            map.put(s3, customitemproperties);
        }
    }

    return map;
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:25,代码来源:CustomItems.java

示例3: collectFiles

import net.minecraft.client.resources.IResourcePack; //导入依赖的package包/类
public static String[] collectFiles(IResourcePack p_collectFiles_0_, String p_collectFiles_1_, String p_collectFiles_2_, String[] p_collectFiles_3_)
{
    if (p_collectFiles_0_ instanceof DefaultResourcePack)
    {
        return collectFilesFixed(p_collectFiles_0_, p_collectFiles_3_);
    }
    else if (!(p_collectFiles_0_ instanceof AbstractResourcePack))
    {
        return new String[0];
    }
    else
    {
        AbstractResourcePack abstractresourcepack = (AbstractResourcePack)p_collectFiles_0_;
        File file1 = ResourceUtils.getResourcePackFile(abstractresourcepack);
        return file1 == null ? new String[0] : (file1.isDirectory() ? collectFilesFolder(file1, "", p_collectFiles_1_, p_collectFiles_2_) : (file1.isFile() ? collectFilesZIP(file1, p_collectFiles_1_, p_collectFiles_2_) : new String[0]));
    }
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:18,代码来源:ConnectedUtils.java

示例4: collectFilesFixed

import net.minecraft.client.resources.IResourcePack; //导入依赖的package包/类
private static String[] collectFilesFixed(IResourcePack p_collectFilesFixed_0_, String[] p_collectFilesFixed_1_)
{
    if (p_collectFilesFixed_1_ == null)
    {
        return new String[0];
    }
    else
    {
        List list = new ArrayList();

        for (int i = 0; i < p_collectFilesFixed_1_.length; ++i)
        {
            String s = p_collectFilesFixed_1_[i];
            ResourceLocation resourcelocation = new ResourceLocation(s);

            if (p_collectFilesFixed_0_.resourceExists(resourcelocation))
            {
                list.add(s);
            }
        }

        String[] astring = (String[])((String[])list.toArray(new String[list.size()]));
        return astring;
    }
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:26,代码来源:ConnectedUtils.java

示例5: getResourcePacks

import net.minecraft.client.resources.IResourcePack; //导入依赖的package包/类
public static IResourcePack[] getResourcePacks()
{
    ResourcePackRepository resourcepackrepository = minecraft.getResourcePackRepository();
    List list = resourcepackrepository.getRepositoryEntries();
    List list1 = new ArrayList();

    for (Object resourcepackrepository$entry : list)
    {
        list1.add(((ResourcePackRepository.Entry)resourcepackrepository$entry).getResourcePack());
    }

    if (resourcepackrepository.getResourcePackInstance() != null)
    {
        list1.add(resourcepackrepository.getResourcePackInstance());
    }

    IResourcePack[] airesourcepack = (IResourcePack[])((IResourcePack[])list1.toArray(new IResourcePack[list1.size()]));
    return airesourcepack;
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:20,代码来源:Config.java

示例6: getDefiningResourcePack

import net.minecraft.client.resources.IResourcePack; //导入依赖的package包/类
public static IResourcePack getDefiningResourcePack(ResourceLocation p_getDefiningResourcePack_0_)
{
    IResourcePack[] airesourcepack = getResourcePacks();

    for (int i = airesourcepack.length - 1; i >= 0; --i)
    {
        IResourcePack iresourcepack = airesourcepack[i];

        if (iresourcepack.resourceExists(p_getDefiningResourcePack_0_))
        {
            return iresourcepack;
        }
    }

    if (getDefaultResourcePack().resourceExists(p_getDefiningResourcePack_0_))
    {
        return getDefaultResourcePack();
    }
    else
    {
        return null;
    }
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:24,代码来源:Config.java

示例7: resourcesReloaded

import net.minecraft.client.resources.IResourcePack; //导入依赖的package包/类
public static void resourcesReloaded()
{
    Map map = I18n.getLocaleProperties();
    List<String> list = new ArrayList();
    String s = "optifine/lang/";
    String s1 = "en_US";
    String s2 = ".lang";
    list.add(s + s1 + s2);

    if (!Config.getGameSettings().language.equals(s1))
    {
        list.add(s + Config.getGameSettings().language + s2);
    }

    String[] astring = (String[])((String[])list.toArray(new String[list.size()]));
    loadResources(Config.getDefaultResourcePack(), astring, map);
    IResourcePack[] airesourcepack = Config.getResourcePacks();

    for (int i = 0; i < airesourcepack.length; ++i)
    {
        IResourcePack iresourcepack = airesourcepack[i];
        loadResources(iresourcepack, astring, map);
    }
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:25,代码来源:Lang.java

示例8: loadResources

import net.minecraft.client.resources.IResourcePack; //导入依赖的package包/类
private static void loadResources(IResourcePack p_loadResources_0_, String[] p_loadResources_1_, Map p_loadResources_2_)
{
    try
    {
        for (int i = 0; i < p_loadResources_1_.length; ++i)
        {
            String s = p_loadResources_1_[i];
            ResourceLocation resourcelocation = new ResourceLocation(s);

            if (p_loadResources_0_.resourceExists(resourcelocation))
            {
                InputStream inputstream = p_loadResources_0_.getInputStream(resourcelocation);

                if (inputstream != null)
                {
                    loadLocaleData(inputstream, p_loadResources_2_);
                }
            }
        }
    }
    catch (IOException ioexception)
    {
        ioexception.printStackTrace();
    }
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:26,代码来源:Lang.java

示例9: collectFiles

import net.minecraft.client.resources.IResourcePack; //导入依赖的package包/类
public static String[] collectFiles(IResourcePack p_collectFiles_0_, String[] p_collectFiles_1_, String[] p_collectFiles_2_, String[] p_collectFiles_3_)
{
    if (p_collectFiles_0_ instanceof DefaultResourcePack)
    {
        return collectFilesFixed(p_collectFiles_0_, p_collectFiles_3_);
    }
    else if (!(p_collectFiles_0_ instanceof AbstractResourcePack))
    {
        return new String[0];
    }
    else
    {
        AbstractResourcePack abstractresourcepack = (AbstractResourcePack)p_collectFiles_0_;
        File file1 = abstractresourcepack.resourcePackFile;
        return file1 == null ? new String[0] : (file1.isDirectory() ? collectFilesFolder(file1, "", p_collectFiles_1_, p_collectFiles_2_) : (file1.isFile() ? collectFilesZIP(file1, p_collectFiles_1_, p_collectFiles_2_) : new String[0]));
    }
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:18,代码来源:ResUtils.java

示例10: getTextureAnimations

import net.minecraft.client.resources.IResourcePack; //导入依赖的package包/类
public static TextureAnimation[] getTextureAnimations(IResourcePack[] p_getTextureAnimations_0_)
{
    List list = new ArrayList();

    for (int i = 0; i < p_getTextureAnimations_0_.length; ++i)
    {
        IResourcePack iresourcepack = p_getTextureAnimations_0_[i];
        TextureAnimation[] atextureanimation = getTextureAnimations(iresourcepack);

        if (atextureanimation != null)
        {
            list.addAll(Arrays.asList(atextureanimation));
        }
    }

    TextureAnimation[] atextureanimation1 = (TextureAnimation[])((TextureAnimation[])list.toArray(new TextureAnimation[list.size()]));
    return atextureanimation1;
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:19,代码来源:TextureAnimations.java

示例11: updateIcons

import net.minecraft.client.resources.IResourcePack; //导入依赖的package包/类
public static void updateIcons(TextureMap p_updateIcons_0_)
{
    blockProperties = (ConnectedProperties[][])null;
    tileProperties = (ConnectedProperties[][])null;

    if (Config.isConnectedTextures())
    {
        IResourcePack[] airesourcepack = Config.getResourcePacks();

        for (int i = airesourcepack.length - 1; i >= 0; --i)
        {
            IResourcePack iresourcepack = airesourcepack[i];
            updateIcons(p_updateIcons_0_, iresourcepack);
        }

        updateIcons(p_updateIcons_0_, Config.getDefaultResourcePack());
        ResourceLocation resourcelocation = new ResourceLocation("mcpatcher/ctm/default/empty");
        emptySprite = p_updateIcons_0_.registerSprite(resourcelocation);
        spriteQuadMaps = new Map[p_updateIcons_0_.getCountRegisteredSprites() + 1];
    }
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:22,代码来源:ConnectedTextures.java

示例12: collectFiles

import net.minecraft.client.resources.IResourcePack; //导入依赖的package包/类
private static String[] collectFiles(IResourcePack p_collectFiles_0_, String p_collectFiles_1_, String p_collectFiles_2_)
{
    if (p_collectFiles_0_ instanceof DefaultResourcePack)
    {
        return collectFilesDefault(p_collectFiles_0_);
    }
    else if (!(p_collectFiles_0_ instanceof AbstractResourcePack))
    {
        return new String[0];
    }
    else
    {
        AbstractResourcePack abstractresourcepack = (AbstractResourcePack)p_collectFiles_0_;
        File file1 = ResourceUtils.getResourcePackFile(abstractresourcepack);
        return file1 == null ? new String[0] : (file1.isDirectory() ? collectFilesFolder(file1, "", p_collectFiles_1_, p_collectFiles_2_) : (file1.isFile() ? collectFilesZIP(file1, p_collectFiles_1_, p_collectFiles_2_) : new String[0]));
    }
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:18,代码来源:ConnectedTextures.java

示例13: collectFilesDefault

import net.minecraft.client.resources.IResourcePack; //导入依赖的package包/类
private static String[] collectFilesDefault(IResourcePack p_collectFilesDefault_0_)
{
    List list = new ArrayList();
    String[] astring = getDefaultCtmPaths();

    for (int i = 0; i < astring.length; ++i)
    {
        String s = astring[i];
        ResourceLocation resourcelocation = new ResourceLocation(s);

        if (p_collectFilesDefault_0_.resourceExists(resourcelocation))
        {
            list.add(s);
        }
    }

    String[] astring1 = (String[])((String[])list.toArray(new String[list.size()]));
    return astring1;
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:20,代码来源:ConnectedTextures.java

示例14: makePotionImageProperties

import net.minecraft.client.resources.IResourcePack; //导入依赖的package包/类
private static Map makePotionImageProperties(IResourcePack p_makePotionImageProperties_0_, String p_makePotionImageProperties_1_, int p_makePotionImageProperties_2_)
{
    Map map = new HashMap();
    String s = p_makePotionImageProperties_1_ + "/";
    String[] astring = new String[] {"mcpatcher/cit/potion/" + s, "mcpatcher/cit/Potion/" + s};
    String[] astring1 = new String[] {".png"};
    String[] astring2 = ResUtils.collectFiles(p_makePotionImageProperties_0_, astring, astring1);

    for (int i = 0; i < astring2.length; ++i)
    {
        String s1 = astring2[i];
        String name = StrUtils.removePrefixSuffix(s1, astring, astring1);
        Properties properties = makePotionProperties(name, p_makePotionImageProperties_1_, p_makePotionImageProperties_2_, s1);

        if (properties != null)
        {
            String s3 = StrUtils.removeSuffix(s1, astring1) + ".properties";
            CustomItemProperties customitemproperties = new CustomItemProperties(properties, s3);
            map.put(s3, customitemproperties);
        }
    }

    return map;
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:25,代码来源:CustomItems.java

示例15: getResourcePacks

import net.minecraft.client.resources.IResourcePack; //导入依赖的package包/类
public static IResourcePack[] getResourcePacks()
{
    ResourcePackRepository resourcepackrepository = minecraft.getResourcePackRepository();
    List list = resourcepackrepository.getRepositoryEntries();
    List list1 = new ArrayList();

    for (Object  resourcepackrepository$entry : list)
    {
        list1.add(((ResourcePackRepository.Entry) resourcepackrepository$entry).getResourcePack());
    }

    if (resourcepackrepository.getResourcePackInstance() != null)
    {
        list1.add(resourcepackrepository.getResourcePackInstance());
    }

    IResourcePack[] airesourcepack = (IResourcePack[])((IResourcePack[])list1.toArray(new IResourcePack[list1.size()]));
    return airesourcepack;
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:20,代码来源:Config.java


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