本文整理汇总了Java中net.minecraft.client.resources.IResource.hasMetadata方法的典型用法代码示例。如果您正苦于以下问题:Java IResource.hasMetadata方法的具体用法?Java IResource.hasMetadata怎么用?Java IResource.hasMetadata使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.client.resources.IResource
的用法示例。
在下文中一共展示了IResource.hasMetadata方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: loadTexture
import net.minecraft.client.resources.IResource; //导入方法依赖的package包/类
public void loadTexture(IResourceManager resourceManager) throws IOException
{
this.deleteGlTexture();
IResource iresource = null;
try
{
iresource = resourceManager.getResource(this.textureLocation);
BufferedImage bufferedimage = TextureUtil.readBufferedImage(iresource.getInputStream());
boolean flag = false;
boolean flag1 = false;
if (iresource.hasMetadata())
{
try
{
TextureMetadataSection texturemetadatasection = (TextureMetadataSection)iresource.getMetadata("texture");
if (texturemetadatasection != null)
{
flag = texturemetadatasection.getTextureBlur();
flag1 = texturemetadatasection.getTextureClamp();
}
}
catch (RuntimeException runtimeexception)
{
LOG.warn("Failed reading metadata of: {}", new Object[] {this.textureLocation, runtimeexception});
}
}
TextureUtil.uploadTextureImageAllocate(this.getGlTextureId(), bufferedimage, flag, flag1);
}
finally
{
IOUtils.closeQuietly((Closeable)iresource);
}
}
示例2: loadTexture
import net.minecraft.client.resources.IResource; //导入方法依赖的package包/类
public void loadTexture(IResourceManager resourceManager) throws IOException
{
this.deleteGlTexture();
InputStream inputstream = null;
try
{
IResource iresource = resourceManager.getResource(this.textureLocation);
inputstream = iresource.getInputStream();
BufferedImage bufferedimage = TextureUtil.readBufferedImage(inputstream);
boolean flag = false;
boolean flag1 = false;
if (iresource.hasMetadata())
{
try
{
TextureMetadataSection texturemetadatasection = (TextureMetadataSection)iresource.getMetadata("texture");
if (texturemetadatasection != null)
{
flag = texturemetadatasection.getTextureBlur();
flag1 = texturemetadatasection.getTextureClamp();
}
}
catch (RuntimeException runtimeexception)
{
logger.warn((String)("Failed reading metadata of: " + this.textureLocation), (Throwable)runtimeexception);
}
}
TextureUtil.uploadTextureImageAllocate(this.getGlTextureId(), bufferedimage, flag, flag1);
}
finally
{
if (inputstream != null)
{
inputstream.close();
}
}
}
示例3: loadTexture
import net.minecraft.client.resources.IResource; //导入方法依赖的package包/类
public void loadTexture(IResourceManager resourceManager) throws IOException
{
this.deleteGlTexture();
InputStream inputstream = null;
try
{
IResource iresource = resourceManager.getResource(this.textureLocation);
inputstream = iresource.getInputStream();
BufferedImage bufferedimage = TextureUtil.readBufferedImage(inputstream);
boolean flag = false;
boolean flag1 = false;
if (iresource.hasMetadata())
{
try
{
TextureMetadataSection texturemetadatasection = (TextureMetadataSection)iresource.getMetadata("texture");
if (texturemetadatasection != null)
{
flag = texturemetadatasection.getTextureBlur();
flag1 = texturemetadatasection.getTextureClamp();
}
}
catch (RuntimeException runtimeexception)
{
logger.warn((String)("Failed reading metadata of: " + this.textureLocation), (Throwable)runtimeexception);
}
}
if (Config.isShaders())
{
ShadersTex.loadSimpleTexture(this.getGlTextureId(), bufferedimage, flag, flag1, resourceManager, this.textureLocation, this.getMultiTexID());
}
else
{
TextureUtil.uploadTextureImageAllocate(this.getGlTextureId(), bufferedimage, flag, flag1);
}
}
finally
{
if (inputstream != null)
{
inputstream.close();
}
}
}
示例4: loadTexture
import net.minecraft.client.resources.IResource; //导入方法依赖的package包/类
public void loadTexture(IResourceManager resourceManager) throws IOException
{
this.deleteGlTexture();
IResource iresource = null;
try
{
iresource = resourceManager.getResource(this.textureLocation);
BufferedImage bufferedimage = TextureUtil.readBufferedImage(iresource.getInputStream());
boolean flag = false;
boolean flag1 = false;
if (iresource.hasMetadata())
{
try
{
TextureMetadataSection texturemetadatasection = (TextureMetadataSection)iresource.getMetadata("texture");
if (texturemetadatasection != null)
{
flag = texturemetadatasection.getTextureBlur();
flag1 = texturemetadatasection.getTextureClamp();
}
}
catch (RuntimeException runtimeexception)
{
LOG.warn("Failed reading metadata of: {}", new Object[] {this.textureLocation, runtimeexception});
}
}
if (Config.isShaders())
{
ShadersTex.loadSimpleTexture(this.getGlTextureId(), bufferedimage, flag, flag1, resourceManager, this.textureLocation, this.getMultiTexID());
}
else
{
TextureUtil.uploadTextureImageAllocate(this.getGlTextureId(), bufferedimage, flag, flag1);
}
}
finally
{
IOUtils.closeQuietly((Closeable)iresource);
}
}
示例5: loadTexture
import net.minecraft.client.resources.IResource; //导入方法依赖的package包/类
public void loadTexture(IResourceManager par1ResourceManager) throws IOException
{
this.func_147631_c();
InputStream var2 = null;
try
{
IResource var3 = par1ResourceManager.getResource(this.textureLocation);
var2 = var3.getInputStream();
BufferedImage var4 = ImageIO.read(var2);
boolean var5 = false;
boolean var6 = false;
if (var3.hasMetadata())
{
try
{
TextureMetadataSection var7 = (TextureMetadataSection)var3.getMetadata("texture");
if (var7 != null)
{
var5 = var7.getTextureBlur();
var6 = var7.getTextureClamp();
}
}
catch (RuntimeException var11)
{
logger.warn("Failed reading metadata of: " + this.textureLocation, var11);
}
}
TextureUtil.uploadTextureImageAllocate(this.getGlTextureId(), var4, var5, var6);
}
finally
{
if (var2 != null)
{
var2.close();
}
}
}
示例6: loadTexture
import net.minecraft.client.resources.IResource; //导入方法依赖的package包/类
@Override
public void loadTexture(IResourceManager resourceManager) throws IOException {
this.deleteGlTexture();
InputStream inputstream = null;
try
{
IResource iresource = resourceManager.getResource(this.textureLocation);
inputstream = iresource.getInputStream();
BufferedImage bufferedimage = manipulateImage(resourceManager, ImageIO.read(inputstream));
boolean flag = false;
boolean flag1 = false;
if (iresource.hasMetadata())
{
try
{
TextureMetadataSection texturemetadatasection = (TextureMetadataSection)iresource.getMetadata("texture");
if (texturemetadatasection != null)
{
flag = texturemetadatasection.getTextureBlur();
flag1 = texturemetadatasection.getTextureClamp();
}
}
catch (RuntimeException runtimeexception)
{
LOGGER.warn("Failed reading metadata of: " + this.textureLocation, runtimeexception);
}
}
TextureUtil.uploadTextureImageAllocate(this.getGlTextureId(), bufferedimage, flag, flag1);
}
finally
{
if (inputstream != null)
{
inputstream.close();
}
}
}
示例7: loadTexture
import net.minecraft.client.resources.IResource; //导入方法依赖的package包/类
public void loadTexture(IResourceManager p_110551_1_) throws IOException
{
this.deleteGlTexture();
InputStream inputstream = null;
try
{
IResource iresource = p_110551_1_.getResource(this.textureLocation);
inputstream = iresource.getInputStream();
BufferedImage bufferedimage = ImageIO.read(inputstream);
boolean flag = false;
boolean flag1 = false;
if (iresource.hasMetadata())
{
try
{
TextureMetadataSection texturemetadatasection = (TextureMetadataSection)iresource.getMetadata("texture");
if (texturemetadatasection != null)
{
flag = texturemetadatasection.getTextureBlur();
flag1 = texturemetadatasection.getTextureClamp();
}
}
catch (RuntimeException runtimeexception)
{
logger.warn("Failed reading metadata of: " + this.textureLocation, runtimeexception);
}
}
TextureUtil.uploadTextureImageAllocate(this.getGlTextureId(), bufferedimage, flag, flag1);
}
finally
{
if (inputstream != null)
{
inputstream.close();
}
}
}