本文整理匯總了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();
}
}
}