Posted August 16, 20169 yr 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
August 16, 20169 yr Does your TE render dynamically? 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.
August 16, 20169 yr Author If you mean that it can change color in middle of the game yes, it will Come and say hi at www.twitter.com/JoseluGames
August 16, 20169 yr 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.
August 16, 20169 yr Author So I just have to split the model right? No other option? As I said the model it's a bit complex and it'll help not to split it Come and say hi at www.twitter.com/JoseluGames
August 16, 20169 yr 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.
August 16, 20169 yr Author 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
August 16, 20169 yr 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.
August 16, 20169 yr Author http://pastebin.com/kbebrB1K Ymov, Head1, Head2 and Head3 should NOT be colored, and I know it can be a bit of an overkill but it's the only way I can think this can be done as we don't have RenderLayers as with Entities Come and say hi at www.twitter.com/JoseluGames
August 16, 20169 yr 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.
August 16, 20169 yr Author Yeah, but then I have to move each one individually when I animate it Come and say hi at www.twitter.com/JoseluGames
August 16, 20169 yr 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.
August 16, 20169 yr Author https://gyazo.com/49253451408f3cfb495f87f9d85daea6 Don't seems like to much of a problem Come and say hi at www.twitter.com/JoseluGames
August 16, 20169 yr 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.
August 16, 20169 yr Author It's not supposed to have that much on the screen at the same moment as they will need to have other blocks surrounding them, but yes, once I released it I'll see the feedback Come and say hi at www.twitter.com/JoseluGames
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.