@Override
public CachedImage load(Image image)
{
ITextureObject textureObj = Minecraft.getMinecraft().getTextureManager().getTexture(resource);
if(textureObj != null)
{
return new CachedImage(textureObj.getGlTextureId(), 0, 0, false);
}
else
{
AbstractTexture texture = new SimpleTexture(resource);
if(Minecraft.getMinecraft().getTextureManager().loadTexture(resource, texture))
{
return new CachedImage(texture.getGlTextureId(), 0, 0, false);
}
return new CachedImage(TextureUtil.MISSING_TEXTURE.getGlTextureId(), 0, 0, false);
}
}
}