Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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: 

327f3c460b.png081765e7f5.png

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 by Sunfished
solution found

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.

  • 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!

  • Sunfished changed the title to Dyeable entity not changing colors and only displaying as white (Solved)

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.