Jump to content

[1.8] Rendering a players' skin to GuiMainMenu


broutwurscht

Recommended Posts

Hi everyone,

i am currently working on a custom main menu. I hooked into the GuiOpenEvent to display my modded version of the gui and it is working so far.

After i finished the basics, I wanted to have a look at rendering the U/V maps of the current users' skin.

I tried to use the Method

public static void drawEntityOnScreen(int p_147046_0_, int p_147046_1_, int p_147046_2_, float p_147046_3_, float p_147046_4_, EntityLivingBase p_147046_5_) [...]

provided by

GuiInventory.class

which requires an EntityLivingBase-object as parameter.

I tried passing the field

Minecraft.getMinecraft().thePlayer

to the method, but it results in a NPE.

I searched for a solution on the forums but I can't find working code for my project.

I figured out that rendering an Entity would require a World object.

That's why i tried to create a FakePlayer, but the Constructor requires a world as well.

 

So finally my questions are:

1) Could i create a "virtual" world, if yes, how?

...or can i simply create an entity that doesn't need a world?

 

Thank you in advance,

broutwurscht

 

If you should have problems understanding my english, feel free to ask me what i tried to say :P

Edited by broutwurscht
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.