Search in sources :

Example 1 with ITextureObject

use of net.minecraft.client.renderer.texture.ITextureObject in project ArsMagica2 by Mithion.

the class CloakUtils method downloadCapeTexture.

private static ThreadDownloadImageData downloadCapeTexture(ResourceLocation resourceLocation, String uuid) {
    ThreadDownloadImageData data = downloadedCloaks.get(uuid);
    if (data == null) {
        TextureManager texturemanager = Minecraft.getMinecraft().getTextureManager();
        Object object = new ThreadDownloadImageData((File) null, AMCore.proxy.playerTracker.getCLF(uuid), null, null);
        texturemanager.loadTexture(resourceLocation, (ITextureObject) object);
        data = (ThreadDownloadImageData) object;
        downloadedCloaks.put(uuid, data);
    }
    return data;
}
Also used : TextureManager(net.minecraft.client.renderer.texture.TextureManager) ITextureObject(net.minecraft.client.renderer.texture.ITextureObject) ThreadDownloadImageData(net.minecraft.client.renderer.ThreadDownloadImageData)

Example 2 with ITextureObject

use of net.minecraft.client.renderer.texture.ITextureObject in project ArsMagica2 by Mithion.

the class ShadowSkinHelper method getDownloadImage.

private static ThreadDownloadImageData getDownloadImage(ResourceLocation par0ResourceLocation, String par1Str, ResourceLocation par2ResourceLocation, IImageBuffer par3IImageBuffer) {
    TextureManager texturemanager = Minecraft.getMinecraft().getTextureManager();
    Object object = texturemanager.getTexture(par0ResourceLocation);
    if (object == null) {
        object = new ThreadDownloadImageData((File) null, par1Str, par2ResourceLocation, par3IImageBuffer);
        texturemanager.loadTexture(par0ResourceLocation, (ITextureObject) object);
    }
    return (ThreadDownloadImageData) object;
}
Also used : TextureManager(net.minecraft.client.renderer.texture.TextureManager) ITextureObject(net.minecraft.client.renderer.texture.ITextureObject) File(java.io.File) ThreadDownloadImageData(net.minecraft.client.renderer.ThreadDownloadImageData)

Aggregations

ThreadDownloadImageData (net.minecraft.client.renderer.ThreadDownloadImageData)2 ITextureObject (net.minecraft.client.renderer.texture.ITextureObject)2 TextureManager (net.minecraft.client.renderer.texture.TextureManager)2 File (java.io.File)1