mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2024-11-25 13:57:59 +01:00
Don't "convert" a skin if it's an elytra or cape.
This commit is contained in:
parent
e38611637a
commit
3dce2be978
1 changed files with 10 additions and 7 deletions
|
@ -124,22 +124,25 @@ public final class HDSkinManager implements IResourceManagerReloadListener {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
String skinDir = "hd" + type.toString().toLowerCase() + "s/";
|
String skinDir = type.toString().toLowerCase() + "s/";
|
||||||
final ResourceLocation skin = new ResourceLocation(skinDir + texture.getHash());
|
final ResourceLocation skin = new ResourceLocation("hdskins", skinDir + texture.getHash());
|
||||||
File file1 = new File(new File("assets/" + skinDir), texture.getHash().substring(0, 2));
|
File file2 = new File(LiteLoader.getAssetsDirectory(), "hd" + skinDir + "/" + texture.getHash().substring(0, 2) + "/" + texture.getHash());
|
||||||
File file2 = new File(file1, texture.getHash());
|
final IImageBuffer imagebufferdownload = type == Type.SKIN ? new ImageBufferDownloadHD() : null;
|
||||||
final IImageBuffer imagebufferdownload = new ImageBufferDownloadHD();
|
|
||||||
ThreadDownloadImageData threaddownloadimagedata = new ThreadDownloadImageData(file2, texture.getUrl(),
|
ThreadDownloadImageData threaddownloadimagedata = new ThreadDownloadImageData(file2, texture.getUrl(),
|
||||||
DefaultPlayerSkin.getDefaultSkinLegacy(),
|
DefaultPlayerSkin.getDefaultSkinLegacy(),
|
||||||
new IImageBuffer() {
|
new IImageBuffer() {
|
||||||
@Override
|
@Override
|
||||||
public BufferedImage parseUserSkin(BufferedImage image) {
|
public BufferedImage parseUserSkin(BufferedImage image) {
|
||||||
return imagebufferdownload.parseUserSkin(image);
|
if (imagebufferdownload != null)
|
||||||
|
return imagebufferdownload.parseUserSkin(image);
|
||||||
|
return image;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void skinAvailable() {
|
public void skinAvailable() {
|
||||||
imagebufferdownload.skinAvailable();
|
if (imagebufferdownload != null) {
|
||||||
|
imagebufferdownload.skinAvailable();
|
||||||
|
}
|
||||||
if (callback != null) {
|
if (callback != null) {
|
||||||
callback.skinAvailable(type, skin, texture);
|
callback.skinAvailable(type, skin, texture);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue