mirror of
https://github.com/xfl03/MCCustomSkinLoader.git
synced 2026-11-28 09:05:45 +00:00
Support Forge for Minecraft 1.15.x (#77)
This commit is contained in:
1 parent
e19b9d860f
commit
6fab945eb1
8 files changed
+69
-164
No files matched your search
@@ -19,7 +19,7 @@ import customskinloader.utils.HttpTextureUtil.HttpTextureInfo;
|
||||
import customskinloader.utils.MinecraftUtil;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.IImageBuffer;
|
||||
import net.minecraft.client.renderer.ThreadDownloadImageData;
|
||||
import net.minecraft.client.renderer.texture.SimpleTexture;
|
||||
import net.minecraft.client.renderer.texture.TextureManager;
|
||||
import net.minecraft.client.resources.DefaultPlayerSkin;
|
||||
import net.minecraft.client.resources.SkinManager.SkinAvailableCallback;
|
||||
@@ -49,7 +49,7 @@ public class FakeSkinManager {
|
||||
if (this.textureManager.getTexture(resourcelocation) != null)//Have already loaded
|
||||
makeCallback(skinAvailableCallback, textureType, resourcelocation, profileTexture);
|
||||
else {
|
||||
ThreadDownloadImageData threaddownloadimagedata = MinecraftUtil.createThreadDownloadImageData(info.cacheFile, info.url, DefaultPlayerSkin.getDefaultSkinLegacy(), new BaseBuffer(skinAvailableCallback, textureType, resourcelocation, profileTexture), textureType);
|
||||
SimpleTexture threaddownloadimagedata = MinecraftUtil.createThreadDownloadImageData(info.cacheFile, info.url, DefaultPlayerSkin.getDefaultSkinLegacy(), new BaseBuffer(skinAvailableCallback, textureType, resourcelocation, profileTexture), textureType);
|
||||
if (skinAvailableCallback instanceof FakeClientPlayer.LegacyBuffer)//Cache for client player
|
||||
FakeClientPlayer.textureCache.put(resourcelocation, threaddownloadimagedata);
|
||||
this.textureManager.loadTexture(resourcelocation, threaddownloadimagedata);
|
||||
|
||||
Reference in new issue
Block a user