Posted June 23, 20214 yr Hello! I'm fairly new to modding so I apologize for how noobish I am, and I am on the cusp of finally moving past the rendering of my custom entity but am currently stuck at figuring out what I'm doing wrong. For starters, my entity has dyeable properties, which should allow it to change colors. However, no matter what I do it doesn't seem to be coloring the entity correctly, which I believe may be due to me not including something that I can't figure out. Without the dyeing code/properties, my entity looks like the image on the left, but enabling the layers, it ends up becoming pure white: My entity has two layers that are being rendered, being the green and yellow sections. I know that these layers are being rendered since it contains a fuzzy filter that I've only applied on the two layers. The only problem is that these layers aren't being colored, and I've almost completely replicated the code found in the wolf classes. Checking the NBT data on the entity also shows that these two colors are existing, and using dyes on it is changing these values. Is there potentially something I'm missing? From what's going on, I'm assuming it's because I'm not somehow blending the color correctly, but the lack of documentation on this has given me no hints as to what I'm actually doing wrong. The github can be found here: https://github.com/Sunfished/PoggMod For quickness, here is a link to the important files regarding the entity: Renderer Layer 1(Green Colors) - Layer 2(Yellow Colors) Model Entity Thank you for taking your time to look over this! I'm still learning so I would love at least a little poke in the right direction so I can do it myself! Edit: Solution was found. Had to use one of the overloaded render methods that accepted the rgb values in the model class Edited June 23, 20214 yr by Sunfished solution found
June 23, 20214 yr 3 hours ago, Sunfished said: Thank you for taking your time to look over this! I'm still learning so I would love at least a little poke in the right direction so I can do it myself! You are using the overload for ModelRenderer.render() that doesn't take rgb parameters and always renders the texture white. Change the call to body.render() in the renderToBuffer() method in your PoggModel class to actually use the supplied red, green, blue, alpha parameters.
June 23, 20214 yr Author 18 minutes ago, vemerion said: You are using the overload for ModelRenderer.render() that doesn't take rgb parameters and always renders the texture white. Change the call to body.render() in the renderToBuffer() method in your PoggModel class to actually use the supplied red, green, blue, alpha parameters. Bless! I knew there was something I forgot! Thanks a lot!
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.