mirror of
https://github.com/xfl03/MCCustomSkinLoader.git
synced 2026-11-22 03:52:15 +00:00
refactor: rebuild ASM transformation framework and support 26.3 (#399)
This commit is contained in:
1 parent
f334a61faa
commit
5830503dfc
41 files changed
+1118
-1218
No files matched your search
@@ -38,14 +38,16 @@ public class FakeSkinBuffer implements FakeHttpTextureProcessor {
|
||||
* 19w38a ~ 24w45a
|
||||
* Invoked from {@link HttpTexture#loadTexture(InputStream)}
|
||||
*/
|
||||
public static NativeImage processLegacySkin(NativeImage image, Runnable processTask, Function<NativeImage, NativeImage> processLegacySkin) {
|
||||
if (processTask instanceof FakeHttpTextureProcessor) {
|
||||
return ((FakeHttpTextureProcessor) processTask).process(image);
|
||||
} else if (processLegacySkin != null) {
|
||||
return processLegacySkin.apply(image);
|
||||
} else {
|
||||
return image;
|
||||
}
|
||||
public static boolean shouldProcessLegacySkin(Runnable processTask) {
|
||||
return processTask instanceof FakeHttpTextureProcessor;
|
||||
}
|
||||
|
||||
/**
|
||||
* 19w38a ~ 24w45a
|
||||
* Invoked from {@link HttpTexture#loadTexture(InputStream)}
|
||||
*/
|
||||
public static NativeImage processLegacySkin(NativeImage image, Runnable processTask) {
|
||||
return ((FakeHttpTextureProcessor) processTask).process(image);
|
||||
}
|
||||
|
||||
//parseUserSkin for 1.13+
|
||||
|
||||
Reference in new issue
Block a user