Welcome on MasterOf13FPS! MasterOf13FPS

Register today or sign up if you are already a member and never miss any cool content again :)

Custom Client Cape

Status
Not open for further replies.

MasterOf13FPS

Administrator
Staff member
Administrator
MasterOf13FPS
Joined
Jul 11, 2020
Messages
0
Reaction score
25
Points
0

Wie das ganze aussieht (DO NOT CLICK @ImFrozen_ , Full Code)

Code:
public static void downloadCape(final AbstractClientPlayer player) {
        String s = player.getNameClear();
        if (s != null && !s.isEmpty()) { String s1 = "http://s.optifine.net/capes/" + s + ".png";
            String s2 = FilenameUtils.getBaseName(s1);
            final ResourceLocation resourcelocation = new ResourceLocation("capeof/" + s2);
            TextureManager texturemanager = Minecraft.getMinecraft().getTextureManager();
            ITextureObject itextureobject = texturemanager.getTexture(resourcelocation);

            if (itextureobject != null && itextureobject instanceof ThreadDownloadImageData)
            {
                ThreadDownloadImageData threaddownloadimagedata = (ThreadDownloadImageData)itextureobject;

                if (threaddownloadimagedata.imageFound != null)
                {
                    if (threaddownloadimagedata.imageFound.booleanValue()) {
                        player.setLocationOfCape(resourcelocation);
                    }
                    return;
                }
            }

            IImageBuffer iimagebuffer = new IImageBuffer()
            {
                ImageBufferDownload ibd = new ImageBufferDownload();
                public BufferedImage parseUserSkin(BufferedImage image) {
                    return CapeUtils.parseCape(image);
                }
                public void skinAvailable() {
                    player.setLocationOfCape(resourcelocation);
                }
            };
            ThreadDownloadImageData threaddownloadimagedata1 = new ThreadDownloadImageData((File)null, s1, (ResourceLocation)null, iimagebuffer);
            threaddownloadimagedata1.pipeline = true;
            texturemanager.loadTexture(resourcelocation, threaddownloadimagedata1);
        }
    }

    public static void downloadCapeAC(final AbstractClientPlayer player) {
        String s = player.getNameClear();
        if (s != null && !s.isEmpty())
        {

            String s1 = "https://alpha-centauri.tk/capes/" + s + ".png";
            String s2 = FilenameUtils.getBaseName(s1);
            final ResourceLocation resourcelocation = new ResourceLocation("capeac/" + s2);
            TextureManager texturemanager = Minecraft.getMinecraft().getTextureManager();
            ITextureObject itextureobject = texturemanager.getTexture(resourcelocation);

            if (itextureobject != null && itextureobject instanceof ThreadDownloadImageData)
            {

                ThreadDownloadImageData threaddownloadimagedata = (ThreadDownloadImageData)itextureobject;

                if (threaddownloadimagedata.imageFound != null)
                {

                    if (threaddownloadimagedata.imageFound.booleanValue()) {
                        player.setLocationOfCape(resourcelocation);
                    }
                    return;
                }
            }

            IImageBuffer iimagebuffer = new IImageBuffer()
            {
                ImageBufferDownload ibd = new ImageBufferDownload();
                public BufferedImage parseUserSkin(BufferedImage image) {
                    return CapeUtils.parseCape(image);
                }
                public void skinAvailable() {
                    player.setLocationOfCape(resourcelocation);
                }
            };
            ThreadDownloadImageData threaddownloadimagedata1 = new ThreadDownloadImageData((File)null, s1, (ResourceLocation)null, iimagebuffer);
            threaddownloadimagedata1.pipeline = true;
            texturemanager.loadTexture(resourcelocation, threaddownloadimagedata1);
        }
    }
 
xvxU2Sm.png
nachdenken.jpg
 

(ಠ_ಠ) nope. funktioniert aus unerfindlichen Gründen nicht, wenn ich Hide Tags hinzufüge, verschwindet einfach der Link. @FantaCoke kann es vielleicht verbessern, oder bestätigen.

//EDIT Es war ein Fehler des Forums, wo die eckigen Klammern falsch gesetzt wurden.
 
Last edited by a moderator:
//EDIT Es war ein Fehler des Forums, wo die eckigen Klammern falsch gesetzt wurden.
Schlauer Junge, das hätte ich dir auch sagen können.
 
Status
Not open for further replies.
shape1
shape2
shape3
shape4
shape5
shape6
Back
Top