Jump to content

MPM // Is it possible to override the eye height in MorePlayerModels?


Xan the Dragon

Recommended Posts

Edit (Important): I have managed to get somewhat of a fix to be functional. This fix involves listening for the same render event that MPM listens to in RenderEvent. What I did was set my event's priority to EventPriority.HIGHEST and, upon the event being called, manually set my eyeHeight then cancelled the event. This fix is not entirely satisfactory as it causes jittering in third person, and I would still appreciate some help if possible.

 

Edit 2: I have tinkered around with my fix a bit more, and I have gotten it to work on a level that's satisfactory. It was much similar to above but I just appended some different conditions for when the user is in third person.

 

Hi all.

I'm writing a mod that overrides players' collision sizes, allowing them to fit within 1x1 tunnels. I'm using this mod in conjunction with MorePlayerModels so that smaller models have more realistic collision on my server. However, there are some issues that come from MorePlayerModels's override to eyeHeight. The first side effect, and the most impacting, is that my inability to edit the eyeHeight value causes Minecraft's vanilla collision system to think the player is suffocating should they be in a 1x1 tunnel. The collision system that detects suffocation uses eye height for its reference rather than the player's bounding box. The second side effect is that, if the player jumps inside of a 1x1 tunnel, they will clip through the top block very briefly. Is there a field I can remotely change within whatever class is overriding eyeHeight? If not, what's the best way to allow me to customize eyeHeight in my own code without having MPM interfere?

 

Thanks.

Edited by Xan the Dragon
Update to my manual fix

Check out my website!

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.