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

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 */);
}
}

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.

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.