Jump to content

Rendering player's skull on Gui (6th post).


Ernio

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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