@Environment(value=CLIENT) public class PlayerSkinTexture extends ResourceTexture
ResourceTexture.TextureData| Modifier and Type | Field and Description |
|---|---|
private File |
cacheFile |
private boolean |
convertLegacy |
private boolean |
loaded |
private Runnable |
loadedCallback |
private CompletableFuture<?> |
loader |
private static Logger |
LOGGER |
private String |
url |
locationbilinear, glId, mipmap| Constructor and Description |
|---|
PlayerSkinTexture(File cacheFile,
String url,
Identifier fallbackSkin,
boolean convertLegacy,
Runnable callback) |
| Modifier and Type | Method and 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) |
loadTextureDatabindTexture, clearGlId, close, getGlId, registerTexture, setFilterprivate static final Logger LOGGER
private final String url
private final boolean convertLegacy
@Nullable private CompletableFuture<?> loader
private boolean loaded
private void onTextureLoaded(NativeImage image)
private void uploadTexture(NativeImage image)
public void load(ResourceManager manager) throws IOException
load in class ResourceTextureIOException@Nullable private NativeImage loadTexture(InputStream stream)
private static NativeImage remapTexture(NativeImage image)
private static void stripColor(NativeImage image, int x1, int y1, int x2, int y2)
private static void stripAlpha(NativeImage image, int x1, int y1, int x2, int y2)