Jump to content

[1.14.4] Is there a way to recycle Mod Renderers or Models?


Recommended Posts

Posted (edited)

I want to create a mod that adds mobs with wich you can fight other people (I call those mobs "Fighters"), like in Pokemon, with the difference that this mod uses mobs from the vanilla version and other mods that choose to add thier own fighters.

Now, if I were to add a renderer, model and mob class that represents one mob that exists in vanilla, I don't know if I can run into issues like a lack of memory (especially if other mods implement my mod), so I wanted to use only one entity and renderer that represents all fighters, and when the mob get's spawned the renderer reads from that mob (like an ID or something) and pulls out the correct model and renders it.

If that explanation was a bit confusing, here is a flowchart of how I want the render process to be.

Flowchart.png

Edited by Keheck
Posted
6 hours ago, Keheck said:

I don't know if I can run into issues like a lack of memory (especially if other mods implement my mod), so I wanted to use only one entity and renderer that represents all fighters, and when the mob get's spawned the renderer reads from that mob (like an ID or something) and pulls out the correct model and renders it.

I think you are worrying over nothing to be honest. Adding extra classes is little to no RAM really.

 

Also you wouldn't want to be querying a database every frame, so you would have to cache parts of the database. Also you wouldn't want to send a request to a server during a render call, so the database file would need to be stored locally, now you would also not want to query the database during a render call either. Therefore the database would already be loaded up into memory anyway defeating the purpose of having it. Because now we have an Entity, Model, and "Model Data" instead of Entity, Model, and Renderer. 

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

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.