public class DownloadingTexture extends SimpleTexture
SimpleTexture.TextureData
Modifier and Type | Field and Description |
---|---|
private java.io.File |
cacheFile |
private java.util.concurrent.CompletableFuture<?> |
future |
private java.lang.String |
imageUrl |
private boolean |
legacySkin |
private static org.apache.logging.log4j.Logger |
LOGGER |
private java.lang.Runnable |
processTask |
private boolean |
textureUploaded |
textureLocation
blur, glTextureId, mipmap
Constructor and Description |
---|
DownloadingTexture(java.io.File cacheFileIn,
java.lang.String imageUrlIn,
ResourceLocation textureResourceLocation,
boolean legacySkinIn,
java.lang.Runnable processTaskIn) |
Modifier and Type | Method and Description |
---|---|
private NativeImage |
loadTexture(java.io.InputStream inputStreamIn) |
void |
loadTexture(IResourceManager manager) |
private static NativeImage |
processLegacySkin(NativeImage nativeImageIn) |
private static void |
setAreaOpaque(NativeImage image,
int x,
int y,
int width,
int height) |
private static void |
setAreaTransparent(NativeImage image,
int x,
int y,
int width,
int height) |
private void |
setImage(NativeImage nativeImageIn) |
private void |
upload(NativeImage imageIn) |
getTextureData
bindTexture, deleteGlTexture, getGlTextureId, loadTexture, restoreLastBlurMipmap, setBlurMipmap, setBlurMipmapDirect
private static final org.apache.logging.log4j.Logger LOGGER
@Nullable private final java.io.File cacheFile
private final java.lang.String imageUrl
private final boolean legacySkin
@Nullable private final java.lang.Runnable processTask
@Nullable private java.util.concurrent.CompletableFuture<?> future
private boolean textureUploaded
public DownloadingTexture(@Nullable java.io.File cacheFileIn, java.lang.String imageUrlIn, ResourceLocation textureResourceLocation, boolean legacySkinIn, @Nullable java.lang.Runnable processTaskIn)
private void setImage(NativeImage nativeImageIn)
private void upload(NativeImage imageIn)
public void loadTexture(IResourceManager manager) throws java.io.IOException
loadTexture
in class SimpleTexture
java.io.IOException
@Nullable private NativeImage loadTexture(java.io.InputStream inputStreamIn)
private static NativeImage processLegacySkin(NativeImage nativeImageIn)
private static void setAreaTransparent(NativeImage image, int x, int y, int width, int height)
private static void setAreaOpaque(NativeImage image, int x, int y, int width, int height)