Jump to content

[1.16] Render an Entity with an OBJ model


kiou.23

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 comment
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 comment
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 comment
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 comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.