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

Hello,

How can I get players face (front).

I want to put it on GuiIngame (alredy did window for .png) (like in DOOM game)

Either I want to make it inside code so the skin will updated on tick, or everytime game is launched I want the .png to be created and saved is SOME dir (as a resource).

Thanks

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

  • Author

Would getting (pseudo) player.skin and then cutting it with drawTexturedModal work here? (I am not on computer)

I'm not sure if I can get it as a resource.

Maybe something from Skulls?

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

  • Author

Guys, anyone?

How would I do this? (head is added via GIMP to show you what I meant)

I know plugin that can get player's skull skin onto item skull, yet I cannot find how is it done :o How can I make Skull show players face, and then render it like character in inventory GUI. Asking if there is Forge hook for anything related to this, or should I code it from beginning.

2quhfu9.jpg

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

I think in entity player there is a method called like getPlayerUsernameSkin or something if you are using a IDE of some sort you could use the find tool(CRTL + F on eclipse) to look up all the places the work skin is used, I don't know what it returns because I have never looked at it, but could be useful in your case.

It is pretty much done completely in the TileEntitySkullRenderer, for example.

 

AbstractClientPlayer.getLocationSkull(String)

bindTexture(ResourceLocation)

Then ModelSkeletonHead#render(...)

 

 

  • Author

Thank you good sir.

Also I have no idea how to use model renderer on screen (GuiIngame).

private void drawCharWindow(final FontRenderer fr, final int width, final int height)
{
ModelSkeletonHead head = new ModelSkeletonHead(0, 0, 64, 32);
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
mc.getTextureManager().bindTexture(STATSICONS);
this.drawTexturedModalRect(0, 0, 0, 0, 36, 36);
//Skull starts...
ResourceLocation resourcelocation = AbstractClientPlayer.locationStevePng;
String nick = mc.thePlayer.username.toString();
        if (nick != null && nick.length() > 0)
        {
            resourcelocation = AbstractClientPlayer.getLocationSkull(nick);
            AbstractClientPlayer.getDownloadImageSkin(resourcelocation, nick);
        }
        mc.getTextureManager().bindTexture(resourcelocation);
        head.render((Entity)null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F);
}

This is pretty much copy of SkullRenderer, how do I render model on x:y on screen? (And yes, I've been looking on GuiInventory and other stuff, but I can't see how it renders the char.)

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

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.