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


Java ResourceLocation.toString方法代码示例

本文整理汇总了Java中net.minecraft.util.ResourceLocation.toString方法的典型用法代码示例。如果您正苦于以下问题:Java ResourceLocation.toString方法的具体用法?Java ResourceLocation.toString怎么用?Java ResourceLocation.toString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在net.minecraft.util.ResourceLocation的用法示例。


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

示例1: getAllResources

import net.minecraft.util.ResourceLocation; //导入方法依赖的package包/类
public List<IResource> getAllResources(ResourceLocation location) throws IOException
{
    this.checkResourcePath(location);
    List<IResource> list = Lists.<IResource>newArrayList();
    ResourceLocation resourcelocation = getLocationMcmeta(location);

    for (IResourcePack iresourcepack : this.resourcePacks)
    {
        if (iresourcepack.resourceExists(location))
        {
            InputStream inputstream = iresourcepack.resourceExists(resourcelocation) ? this.getInputStream(resourcelocation, iresourcepack) : null;
            list.add(new SimpleResource(iresourcepack.getPackName(), location, this.getInputStream(location, iresourcepack), inputstream, this.frmMetadataSerializer));
        }
    }

    if (list.isEmpty())
    {
        throw new FileNotFoundException(location.toString());
    }
    else
    {
        return list;
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:25,代码来源:FallbackResourceManager.java

示例2: getAllResources

import net.minecraft.util.ResourceLocation; //导入方法依赖的package包/类
public List<IResource> getAllResources(ResourceLocation location) throws IOException
{
    List<IResource> list = Lists.<IResource>newArrayList();
    ResourceLocation resourcelocation = getLocationMcmeta(location);

    for (IResourcePack iresourcepack : this.resourcePacks)
    {
        if (iresourcepack.resourceExists(location))
        {
            InputStream inputstream = iresourcepack.resourceExists(resourcelocation) ? this.getInputStream(resourcelocation, iresourcepack) : null;
            list.add(new SimpleResource(iresourcepack.getPackName(), location, this.getInputStream(location, iresourcepack), inputstream, this.frmMetadataSerializer));
        }
    }

    if (list.isEmpty())
    {
        throw new FileNotFoundException(location.toString());
    }
    else
    {
        return list;
    }
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:24,代码来源:FallbackResourceManager.java

示例3: getAllResources

import net.minecraft.util.ResourceLocation; //导入方法依赖的package包/类
public List<IResource> getAllResources(ResourceLocation location) throws IOException
{
    IResourceManager iresourcemanager = (IResourceManager)this.domainResourceManagers.get(location.getResourceDomain());

    if (iresourcemanager != null)
    {
        return iresourcemanager.getAllResources(location);
    }
    else
    {
        throw new FileNotFoundException(location.toString());
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:14,代码来源:SimpleReloadableResourceManager.java

示例4: makeItemModels

import net.minecraft.util.ResourceLocation; //导入方法依赖的package包/类
private void makeItemModels()
{
    for (ResourceLocation resourcelocation : this.itemLocations.values())
    {
        ModelBlock modelblock = (ModelBlock)this.models.get(resourcelocation);

        if (this.hasItemModel(modelblock))
        {
            ModelBlock modelblock1 = this.makeItemModel(modelblock);

            if (modelblock1 != null)
            {
                modelblock1.name = resourcelocation.toString();
            }

            this.models.put(resourcelocation, modelblock1);
        }
        else if (this.isCustomRenderer(modelblock))
        {
            this.models.put(resourcelocation, modelblock);
        }
    }

    for (TextureAtlasSprite textureatlassprite : this.sprites.values())
    {
        if (!textureatlassprite.hasAnimationMetadata())
        {
            textureatlassprite.clearFramesTextureData();
        }
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:32,代码来源:ModelBakery.java

示例5: getResource

import net.minecraft.util.ResourceLocation; //导入方法依赖的package包/类
public IResource getResource(ResourceLocation location) throws IOException
{
    IResourcePack iresourcepack = null;
    ResourceLocation resourcelocation = getLocationMcmeta(location);

    for (int i = this.resourcePacks.size() - 1; i >= 0; --i)
    {
        IResourcePack iresourcepack1 = (IResourcePack)this.resourcePacks.get(i);

        if (iresourcepack == null && iresourcepack1.resourceExists(resourcelocation))
        {
            iresourcepack = iresourcepack1;
        }

        if (iresourcepack1.resourceExists(location))
        {
            InputStream inputstream = null;

            if (iresourcepack != null)
            {
                inputstream = this.getInputStream(resourcelocation, iresourcepack);
            }

            return new SimpleResource(iresourcepack1.getPackName(), location, this.getInputStream(location, iresourcepack1), inputstream, this.frmMetadataSerializer);
        }
    }

    throw new FileNotFoundException(location.toString());
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:30,代码来源:FallbackResourceManager.java

示例6: bakeItemModels

import net.minecraft.util.ResourceLocation; //导入方法依赖的package包/类
private void bakeItemModels()
{
    for (ResourceLocation resourcelocation : this.itemLocations.values())
    {
        ModelBlock modelblock = (ModelBlock)this.models.get(resourcelocation);

        if (this.hasItemModel(modelblock))
        {
            ModelBlock modelblock1 = this.makeItemModel(modelblock);

            if (modelblock1 != null)
            {
                modelblock1.name = resourcelocation.toString();
            }

            this.models.put(resourcelocation, modelblock1);
        }
        else if (this.isCustomRenderer(modelblock))
        {
            this.models.put(resourcelocation, modelblock);
        }
    }

    for (TextureAtlasSprite textureatlassprite : this.sprites.values())
    {
        if (!textureatlassprite.hasAnimationMetadata())
        {
            textureatlassprite.clearFramesTextureData();
        }
    }
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:32,代码来源:ModelBakery.java

示例7: ShaderGroup

import net.minecraft.util.ResourceLocation; //导入方法依赖的package包/类
public ShaderGroup(TextureManager p_i1050_1_, IResourceManager p_i1050_2_, Framebuffer p_i1050_3_, ResourceLocation p_i1050_4_) throws JsonException, IOException, JsonSyntaxException
{
    this.resourceManager = p_i1050_2_;
    this.mainFramebuffer = p_i1050_3_;
    this.field_148036_j = 0.0F;
    this.field_148037_k = 0.0F;
    this.mainFramebufferWidth = p_i1050_3_.framebufferWidth;
    this.mainFramebufferHeight = p_i1050_3_.framebufferHeight;
    this.shaderGroupName = p_i1050_4_.toString();
    this.resetProjectionMatrix();
    this.parseGroup(p_i1050_1_, p_i1050_4_);
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:13,代码来源:ShaderGroup.java

示例8: getResource

import net.minecraft.util.ResourceLocation; //导入方法依赖的package包/类
public IResource getResource(ResourceLocation location) throws IOException
{
    this.checkResourcePath(location);
    IResourcePack iresourcepack = null;
    ResourceLocation resourcelocation = getLocationMcmeta(location);

    for (int i = this.resourcePacks.size() - 1; i >= 0; --i)
    {
        IResourcePack iresourcepack1 = (IResourcePack)this.resourcePacks.get(i);

        if (iresourcepack == null && iresourcepack1.resourceExists(resourcelocation))
        {
            iresourcepack = iresourcepack1;
        }

        if (iresourcepack1.resourceExists(location))
        {
            InputStream inputstream = null;

            if (iresourcepack != null)
            {
                inputstream = this.getInputStream(resourcelocation, iresourcepack);
            }

            return new SimpleResource(iresourcepack1.getPackName(), location, this.getInputStream(location, iresourcepack1), inputstream, this.frmMetadataSerializer);
        }
    }

    throw new FileNotFoundException(location.toString());
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:31,代码来源:FallbackResourceManager.java

示例9: getResource

import net.minecraft.util.ResourceLocation; //导入方法依赖的package包/类
public IResource getResource(ResourceLocation location) throws IOException
{
    IResourceManager iresourcemanager = (IResourceManager)this.domainResourceManagers.get(location.getResourceDomain());

    if (iresourcemanager != null)
    {
        return iresourcemanager.getResource(location);
    }
    else
    {
        throw new FileNotFoundException(location.toString());
    }
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:14,代码来源:SimpleReloadableResourceManager.java

示例10: DefierRecipe

import net.minecraft.util.ResourceLocation; //导入方法依赖的package包/类
public DefierRecipe(ResourceLocation itemlocation, long rfcost){
	this.item = Item.REGISTRY.getObject(itemlocation);
	if(item == null)throw new IllegalArgumentException("No item with resource location " + itemlocation.toString());
	this.rfcost = rfcost;
}
 
开发者ID:tiffit,项目名称:Defier,代码行数:6,代码来源:DefierRecipe.java

示例11: fromNative

import net.minecraft.util.ResourceLocation; //导入方法依赖的package包/类
private DomainPath fromNative(ResourceLocation resourceLocation) {
    return new DomainPath(resourceLocation.toString());
}
 
开发者ID:PizzaCrust,项目名称:Novous,代码行数:4,代码来源:LinkedResourceManager.java

示例12: makeAtlasSprite

import net.minecraft.util.ResourceLocation; //导入方法依赖的package包/类
protected static TextureAtlasSprite makeAtlasSprite(ResourceLocation spriteResourceLocation)
{
    return new TextureAtlasSprite(spriteResourceLocation.toString());
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:5,代码来源:TextureAtlasSprite.java

示例13: EnchantmentHolder

import net.minecraft.util.ResourceLocation; //导入方法依赖的package包/类
public EnchantmentHolder(ResourceLocation loc, int chance, int max, int min){
	enchantment = loc.toString();
	chanceToApply = chance;
	maxLvl = max;
	minLvl = min;
}
 
开发者ID:bookerthegeek,项目名称:Mob-Option-Redux,代码行数:7,代码来源:EnchantmentHolder.java

示例14: makeAtlasSprite

import net.minecraft.util.ResourceLocation; //导入方法依赖的package包/类
protected static TextureAtlasSprite makeAtlasSprite(ResourceLocation spriteResourceLocation)
{
    String s = spriteResourceLocation.toString();
    return (TextureAtlasSprite)(locationNameClock.equals(s) ? new TextureClock(s) : (locationNameCompass.equals(s) ? new TextureCompass(s) : new TextureAtlasSprite(s)));
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:6,代码来源:TextureAtlasSprite.java

示例15: ModelResourceLocation

import net.minecraft.util.ResourceLocation; //导入方法依赖的package包/类
public ModelResourceLocation(ResourceLocation p_i46080_1_, String p_i46080_2_)
{
    this(p_i46080_1_.toString(), p_i46080_2_);
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:5,代码来源:ModelResourceLocation.java


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