August 17, 201411 yr You have 2 options: 1. You can override the mapping done by the RenderManager by registering a new renderliving class to the EntityPlayer. 2. There is an event, RenderLivingEvent.Pre, that cancels the doRender method in RenderLiving classes. Allowing you to render a new renderliving class for that entity. by calling the doRender method again during the event. Small example : private final RenderPlayer2 renderPlayer = new RenderPlayer2(); @SubscribeEvent void overrideRenderPlayer(RenderLivingEvent.Pre event) { if (event.entity instanceof EntityPlayer) { event.setCanceled(true); renderPlayer.doRender(/* what ever parameters */); } }
August 20, 201411 yr So many bumps. Well, a quick look through some classes revealed the following: Entity.class has the following method: protected void setSize(float parwidth, float parheight) and EntityPlayerMP has this method: /** * Returns the default eye height of the player * @return player default eye height */ @Override public float getDefaultEyeHeight() { return 1.62F; } setsize sets the boundingbox. So you can set the size and height of the player there the default eye height method sets, well, the default eye height and is used in the item class and in the EntityPlayer class. The EntityPlayer class also has a variable called Eyeheight. So while I didn't really look deeply into it I think those two functions are a decent start to set the eyeheight and boundingbox. As for the model, I think that the best method is as ShaneCraft mentioned, adding your own render class. I hope this gives you enough information to get a good start on it and stop bumping.
August 20, 201411 yr Author setSize I installed using reflection because he protected. Eye position: And I will give this method? What do I do with it?
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.