Jump to content

[1.10.2] ["SOLVED"] TE Model with "tinted" texture in some parts


JoseluGames

Recommended Posts

Hi everyone, I'm trying to figure out how to add color to some of the boxes of custom Model for a TileEntity, I can do GL11.glColor3f() on the renderTileEntityAt() method but that as you suppose tints all the model, I though of spliting the model on colorable/not coloreable models but some of the boxes are childs of anothers and It's going to be a mess, so, is there a way to tint some parts of the texture or to tint some parts of the model??

Come and say hi at www.twitter.com/JoseluGames

Link to comment
Share on other sites

You will need to do this in your model file where the rendering actually happens or create multiple models and do it in renderTileEntityAt ()

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.

Link to comment
Share on other sites

I haven't looked at a models code for a while but in there is where the rendering happens find the "cube" that changes color and use gl11.whatever to change the color of that model then afterwards gl11.whatever to change it back.

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.

Link to comment
Share on other sites

Yeah, you use GL11.glColor3f(r, g, b) to change color and GLStateManager.resetColor() to change it back for the next rendering, but this change the color of all the model, so what I did to fix it is render the model two times, each with the textures that need to be colored or not like this: http://pastebin.com/Qy8SJVd4

Come and say hi at www.twitter.com/JoseluGames

Link to comment
Share on other sites

Don't do that it may work and all but serious lag can happen from that. Instead please post your code for your model.

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.

Link to comment
Share on other sites

I see you are using addChild to add the existing models to render with the other models. If you remove the ones that you want to color from being a child and add them to the render method you can call Gl11.glColor3f(...) and then after the model.render you can call GLStateManager.resetColor().

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.

Link to comment
Share on other sites

Yeah, but then I have to move each one individually when I animate it

Then here is where you ask yourself Increased lag and easier programmed animations or Normal Frame Rates and harder to program animations?

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.

Link to comment
Share on other sites

https://gyazo.com/49253451408f3cfb495f87f9d85daea6 Don't seems like to much of a problem

I'm talking about others that have low end computers. But then again, are players likely to have many in one area? If not I guess it is fine, but I would still make the changes at some point.

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.

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.