Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

Hi! Hwo to change player skin in modification? I tried to change RenderPlayer using RenderRegistry, but i recevie this error:

Failed to load texture java.io.FileNotFoundException

I know i have to download this skin to mine disc but it doesn't work:

    public static ThreadDownloadImageData getDownloadImageSkin(ResourceLocation par0ResourceLocation, String par1Str)
    {
        return getDownloadImage(par0ResourceLocation, getSkinUrl(par1Str), texture, new ImageBufferDownload());
    }

    /*public static ThreadDownloadImageData getDownloadImageCape(ResourceLocation par0ResourceLocation, String par1Str)
    {
        return getDownloadImage(par0ResourceLocation, getCapeUrl(par1Str), (ResourceLocation)null, (IImageBuffer)null);
    }*/

    private static ThreadDownloadImageData getDownloadImage(ResourceLocation par0ResourceLocation, String par1Str, ResourceLocation par2ResourceLocation, IImageBuffer par3IImageBuffer)
    {
        TextureManager var4 = Minecraft.getMinecraft().getTextureManager();
        Object var5 = var4.getTexture(par0ResourceLocation);

        if (var5 == null)
        {
            var5 = new ThreadDownloadImageData(par1Str, par2ResourceLocation, par3IImageBuffer);
            var4.loadTexture(par0ResourceLocation, (ITextureObject)var5);
        }

        return (ThreadDownloadImageData)var5;
    }

Thanks for help:)

Skins are being held in AbstractClientPlayer.class

 

They are private so you have to use reflection to access them and override with your own.

1.7.10 is no longer supported by forge, you are on your own.

  • Author

IS this code good?:

	@Override
protected ResourceLocation getEntityTexture(AbstractClientPlayer par1AbstractClientPlayer) {
        String var1 = par1AbstractClientPlayer.getCommandSenderName();

        if (!var1.isEmpty())
        {
            this.locationSkin = getLocationSkin(var1);
            //this.locationCape = getLocationCape(var1);
            this.downloadImageSkin = getDownloadImageSkin(this.locationSkin, var1);
            //this.downloadImageCape = getDownloadImageCape(this.locationCape, var1);
        }
	return HPsRPAbstractClientPlayer.getSkinHP();
	try
	{
		Method method = AbstractClientPlayer.class.getDeclaredMethod("getSkinUrl", String.class);
		method.setAccessible(true);
		method.invoke(null, "http://dl.dropboxusercontent.com/link");
		return par1AbstractClientPlayer.getLocationSkin();
	}
	catch (Exception e)
	{
		e.printStackTrace();
	}
	return null;
}

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.