Skip to content

How do I tint blocks and items? #1211

Discussion options

You must be logged in to vote

This functionality is enabled by a system called color providers. Although Minecraft does not easily allow new color providers to be added, Fabric API provides a set of hooks in the form of ColorProviderRegistry to allow mods to register their own color providers. Color providers are completely client-side, and thus this should be registered in the client-only mod initializer only.

Both block and item color providers require a tint index to be specified. This is useful for two reasons:

  • Certain parts of the model can be left untinted.
  • Multiple tints can be present on the model.

Blocks

For block models, each face of a cube can have its own tint index, specified as an integer using the tin…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by haykam821
Comment options

You must be logged in to vote
1 reply
@haykam821
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants