Package net.minecraft.client.texture
Class PlayerSkinTexture
java.lang.Object
net.minecraft.client.texture.AbstractTexture
net.minecraft.client.texture.ResourceTexture
net.minecraft.client.texture.PlayerSkinTexture
- All Implemented Interfaces:
AutoCloseable
@Environment(CLIENT) public class PlayerSkinTexture extends ResourceTexture
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.client.texture.ResourceTexture
ResourceTexture.TextureData
-
Field Summary
Fields Modifier and Type Field Description private File
cacheFile
private boolean
convertLegacy
private boolean
loaded
private Runnable
loadedCallback
private CompletableFuture<?>
loader
private static Logger
LOGGER
private String
url
Fields inherited from class net.minecraft.client.texture.ResourceTexture
location
Fields inherited from class net.minecraft.client.texture.AbstractTexture
bilinear, glId, mipmap
-
Constructor Summary
Constructors Constructor Description PlayerSkinTexture(File cacheFile, String url, Identifier fallbackSkin, boolean convertLegacy, Runnable callback)
-
Method Summary
Modifier and Type Method Description void
load(ResourceManager manager)
private NativeImage
loadTexture(InputStream stream)
private void
onTextureLoaded(NativeImage image)
private static NativeImage
remapTexture(NativeImage image)
private static void
stripAlpha(NativeImage image, int x1, int y1, int x2, int y2)
private static void
stripColor(NativeImage image, int x1, int y1, int x2, int y2)
private void
uploadTexture(NativeImage image)
Methods inherited from class net.minecraft.client.texture.ResourceTexture
loadTextureData
Methods inherited from class net.minecraft.client.texture.AbstractTexture
bindTexture, clearGlId, close, getGlId, registerTexture, setFilter
-
Field Details
-
LOGGER
-
cacheFile
-
url
-
convertLegacy
private final boolean convertLegacy -
loadedCallback
-
loader
-
loaded
private boolean loaded
-
-
Constructor Details
-
PlayerSkinTexture
-
-
Method Details
-
onTextureLoaded
-
uploadTexture
-
load
- Overrides:
load
in classResourceTexture
- Throws:
IOException
-
loadTexture
-
remapTexture
-
stripColor
-
stripAlpha
-