SkinManager.java 文件源码

java
阅读 19 收藏 0 点赞 0 评论 0

项目:Cauldron 作者:
public ResourceLocation func_152789_a(MinecraftProfileTexture p_152789_1_, final Type p_152789_2_, final SkinManager.SkinAvailableCallback p_152789_3_)
{
    final ResourceLocation resourcelocation = new ResourceLocation("skins/" + p_152789_1_.getHash());
    ITextureObject itextureobject = this.field_152795_c.getTexture(resourcelocation);

    if (itextureobject != null)
    {
        if (p_152789_3_ != null)
        {
            p_152789_3_.func_152121_a(p_152789_2_, resourcelocation);
        }
    }
    else
    {
        File file1 = new File(this.field_152796_d, p_152789_1_.getHash().substring(0, 2));
        File file2 = new File(file1, p_152789_1_.getHash());
        final ImageBufferDownload imagebufferdownload = p_152789_2_ == Type.SKIN ? new ImageBufferDownload() : null;
        ThreadDownloadImageData threaddownloadimagedata = new ThreadDownloadImageData(file2, p_152789_1_.getUrl(), field_152793_a, new IImageBuffer()
        {
            private static final String __OBFID = "CL_00001828";
            public BufferedImage parseUserSkin(BufferedImage p_78432_1_)
            {
                if (imagebufferdownload != null)
                {
                    p_78432_1_ = imagebufferdownload.parseUserSkin(p_78432_1_);
                }

                return p_78432_1_;
            }
            public void func_152634_a()
            {
                if (imagebufferdownload != null)
                {
                    imagebufferdownload.func_152634_a();
                }

                if (p_152789_3_ != null)
                {
                    p_152789_3_.func_152121_a(p_152789_2_, resourcelocation);
                }
            }
        });
        this.field_152795_c.loadTexture(resourcelocation, threaddownloadimagedata);
    }

    return resourcelocation;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号