Jump to content

[FORGE v1.7.10] Custom Entity Rendering


DemonScythe45

Recommended Posts

I have successfully created an entity and registered it into the game, it is a direct subclass of Entity, because it is not meant to be an animal.  I have also made two classes for handling entity models, one for parsing a Wavefront .obj file, and the other stores this information and has a rendering method to display it.  This all works, and I do not use the existing entity modeling classes (I make direct calls to OpenGL).  I have two problems, the first is the model disappears and reappears when looking around in the game, and at times disappears completely (though I am sure the entity is there still, and the default white box model has the exact same flickering behavior), what would be causing this?  Second, I would like to know if it is possible to have parts of an entity texture appear to emit light (not necessarily shine light on blocks and other objects, I would think the material emissive property would be appropriate here), however this may just be me misunderstanding how OpenGL lighting works.  Whenever I try this, upon summoning the entity it affects all entities in the world and items in the inventory (sets the emissiveness for everything).

 

I have searched for this information for hours, have looked at source for other mods for examples, and have found absolutely no documentation on it whatsoever.  Any help would be greatly appreciated!

 

Pastebin links for relevant code:

 

Entity class: http://pastebin.com/iXyw5Mu9

Entity Render: http://pastebin.com/8hGGgS6Z

Model class: http://pastebin.com/jf3wpsd9

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

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