Jump to content

[1.7.10] Vanilla Entity Render Modifications


Spartan322

Recommended Posts

I have been searching for about two months and have been unable to find a method to modify vanilla entity rendering, like rotating the player along a 90 degree pitch or rotating a cow sideways. My search has left me with ideas but nothing yet feasible, and I have no solution, could someone help me out with this. (As if I should state it but I would prefer not using reflection or an external source unless those are the only ways)

Power, even in the Darkness, Courage shall prevail

Link to comment
Share on other sites

What do you need to do this for? There may be an easier solution than changing the rendering methods of vanilla entities.

I have been attempting to create a gliding effect when doing certain things (like if you jump off a high cliff). I have the glide for the player itself down but I need a way to make it so when you enter third-person or if someone else is observing you, you don't look like some fast moving creative player, I believe I've seen this done in mods but the open-source ones always either resort to external tools or reflection (and usually the tool uses reflection), so simply, I want to rotate the player around  in certain ways (like maybe a roll for turning in a glide or pitch when gliding for a more realistic look/feel/sense)

Power, even in the Darkness, Courage shall prevail

Link to comment
Share on other sites

unless I want to incorporate everything from the OpenMods lib, I can't use it.

 

Seriously dude?  That class is everything you need, just copy that ONE class.  That class imports Jack and All from the OpenMods library.  JACK AND ALL.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

unless I want to incorporate everything from the OpenMods lib, I can't use it.

 

Seriously dude?  That class is everything you need, just copy that ONE class.  That class imports Jack and All from the OpenMods library.  JACK AND ALL.

While that would be a good point if I could separate it from OpenMods, I have already searched this as a possible viable option and it would not work. There are too many classes involved with RenderBodyEvent, it is not practical, PLEASE stop asking me to use it, it is too impractical. Trust me, I have tried. The biggest thing is it requires using ASM and a bunch of internal OpenMod Classes (and I don't want to copy out an entire part of OpenMods that would do what I am pretty sure I said I want to avoid). Here is why the OpenMods Lib way even works: https://github.com/OpenMods/OpenModsLib/blob/master/src/main/java/openmods/renderer/PlayerRendererHookVisitor.java

Power, even in the Darkness, Courage shall prevail

Link to comment
Share on other sites

I replace the entire player model for myself here:

https://github.com/SanAndreasP/SAPManagerPack/blob/master/java/de/sanandrew/core/manpack/mod/client/event/RenderPlayerEventHandler.java#L36-L51

 

You can use those events to manipulate the rendering in some ways w/o needing to replace the entirety of the model (just don't cancel the event there).

 

There are 2 sub-events, Pre and Post. For example you want to rotate the model 90 degrees, in the pre you rotate it with

GL11#glRotatef(angle, x, y, z)

and in post, you revert your rotation by either adding

GL11#glRotatef(-angle, x, y, z)

or "wrap" the rotation in GL11#glPushMatrix() in Pre and GL11#glPopMatrix() in Post.

 

Manipulating individual parts of the model? I'm not sure if this is possible w/o replacing the entire player model...

Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! |

mah twitter

This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.

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.