Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[1.16] Render an Entity with an OBJ model


Recommended Posts

I've got an entity that I wish to render using  an obj model. The entity is a ProjectileItemEntity, and I've already got the obj model working for the item.

I tried to render my entity with the same Item Renderer, but the model wouldn't rotate with the entity, and instead would always face the player, which doesn't work for me since I need my entity to rotate around

Link to post
Share on other sites

I haven't touched obj models in MC since 1.12.2 so I wouldn't know if anything changed, but with a TESR I recall I could just override the render method and make OpenGL transforms (which I'm sure has been replaced with matrixstacks) in it...

Link to post
Share on other sites
9 minutes ago, Turtledove said:

I haven't touched obj models in MC since 1.12.2 so I wouldn't know if anything changed, but with a TESR I recall I could just override the render method and make OpenGL transforms (which I'm sure has been replaced with matrixstacks) in it...

wasn't TEST for item stacks, or tile entities?

I know I have to extend an EntityRenderer, but I don't know how to get an obj to render from there

Link to post
Share on other sites
5 minutes ago, kiou.23 said:

wasn't TEST for item stacks, or tile entities?

I know I have to extend an EntityRenderer, but I don't know how to get an obj to render from there

Ah sorry, you're right. I can refer you to the way Lycanites renders all of their .obj model entities, and best of all it's up to date for 1.16, but it is pretty complicated than just your standard java model. Depending on what you're doing it might not be worth it...

https://gitlab.com/Lycanite/LycanitesMobs/-/tree/master/src/main/java/com/lycanitesmobs/client

Link to post
Share on other sites
2 hours ago, Turtledove said:

Ah sorry, you're right. I can refer you to the way Lycanites renders all of their .obj model entities, and best of all it's up to date for 1.16, but it is pretty complicated than just your standard java model. Depending on what you're doing it might not be worth it...

https://gitlab.com/Lycanite/LycanitesMobs/-/tree/master/src/main/java/com/lycanitesmobs/client

it does feel more complicated than what I may need, since my entity isn't actually a mob with animations and all that, just a static obj model would work, but I guess that if I go through and read how lycanitesmobs does it, I'll be able to extract what I need, thanks for the reference

Link to post
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.

Guest
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.



×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.