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.

Changing the color of blocks using data from Block Entity instead of Blockstate 1.20.1

Featured Replies

Posted

Hey. In my mod I am changing the texture color depending on custom enum property. I do it normally through extends BlockColors (RegisterColorHandlersEvent) and everything works ok, however, I have quite a lot of colors and also other properties which increases the number of blockstats very quickly. 

E.g. Only one type of leaves generates DISTANCE * PERSISTENT * WATERLOGGED * COLOR * One More State = 7*2*2*56*2 = 3156. Few blocks have one more new state and its *2 or even *3. So 6272/9408

And with each successive block that uses this method, another large number of new blockstats come in. So I found that it would be better to do it through a block entity and save the data that way. That's what I did, the data saves fine, but I can't find a way to use this data to change the color. Can't figure out how to call. I'm losing hope that it's even possible. Would anyone be able to help and suggest something? Is there even a point to such a solution, because maybe it is not possible?

Edited by DanteTooMayCry

  • DanteTooMayCry changed the title to Changing the color of blocks using data from Block Entity instead of Blockstate 1.20.1

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.