tutorial:colorprovider
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| tutorial:colorprovider [2025/04/01 11:37] – solidblock | tutorial:colorprovider [2025/12/05 17:03] (current) – redirect to docs cassiancc | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ~~REDIRECT> | ||
| + | ~~REDIRECT> | ||
| ======= Color Providers ======= | ======= Color Providers ======= | ||
| Ever wonder how grass and leaves change hues depending on the biome, or how leather armor can have seemingly infinite color patterns? Meet **color providers**, | Ever wonder how grass and leaves change hues depending on the biome, or how leather armor can have seemingly infinite color patterns? Meet **color providers**, | ||
| Line 134: | Line 136: | ||
| } | } | ||
| + | // Since 1.21.4, this method is not required anymore, because all block entities use their block model by default. | ||
| @Override | @Override | ||
| protected BlockRenderType getRenderType(BlockState state) { | protected BlockRenderType getRenderType(BlockState state) { | ||
| Line 251: | Line 254: | ||
| ===== Custom item tint (1.21.4 and after) ===== | ===== Custom item tint (1.21.4 and after) ===== | ||
| - | Since 1.21.4 | + | Since 1.21.4, tints of items are defined in the Items model definition. Some common tint source types are provided in vanilla, see [[https:// |
| <code javascript / | <code javascript / | ||
| { | { | ||
| Line 271: | Line 274: | ||
| > If the tint does not work, check the value of tintindex in the model, which should be consistent with the element subscript in the '' | > If the tint does not work, check the value of tintindex in the model, which should be consistent with the element subscript in the '' | ||
| - | In version 1.21.3 and before, item model providers | + | In version 1.21.3 and before, item model providers |
| For item models, we can directly inherite the block model that uses tintindex: | For item models, we can directly inherite the block model that uses tintindex: | ||
tutorial/colorprovider.1743507422.txt.gz · Last modified: 2025/04/01 11:37 by solidblock