本文整理汇总了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;
}
}
示例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;
}
}
示例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());
}
}
示例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();
}
}
}
示例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());
}
示例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();
}
}
}
示例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_);
}
示例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());
}
示例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());
}
}
示例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;
}
示例11: fromNative
import net.minecraft.util.ResourceLocation; //导入方法依赖的package包/类
private DomainPath fromNative(ResourceLocation resourceLocation) {
return new DomainPath(resourceLocation.toString());
}
示例12: makeAtlasSprite
import net.minecraft.util.ResourceLocation; //导入方法依赖的package包/类
protected static TextureAtlasSprite makeAtlasSprite(ResourceLocation spriteResourceLocation)
{
return new TextureAtlasSprite(spriteResourceLocation.toString());
}
示例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;
}
示例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)));
}
示例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_);
}