Block Tinting
Static Tinting
In the terrain atlas file, the following parameters can be used on a texture to tint it in two different ways:
tint_colorapplies a basic multiply tint to a texture.overlay_colorapplies a tint to a texture, using the alpha channel of the texture to determine tint intensity.
{
"texture_data": {
"wiki:tinted_texture": {
"textures": {
"path": "textures/blocks/untinted_texture",
"tint_color": "#ff5522" // Tints the texture orange
}
}
}
}Tint Methods
Tint methods can be used to tint a block based on the biome it is placed in.
Texture Tinting
Tinting is applied to textures by specifying the tint_method parameter for the relevant material instance. Different material instances of a block can use different tint methods. When the block is an item, textures will be tinted as if the block were placed in a plains biome.
Similarly to the static texture tinting mentioned previously, tint methods can be applied to textures in two different ways:
- If
alpha_masked_tintis set tofalse(default), each color channel of the texture will be multiplied by the color of the tint.- This is equivalent to the
tint_colorparameter in texture atlas files.
- This is equivalent to the
- If
alpha_masked_tintis set totrue, the alpha channel of the texture is not multiplied and is instead used to determine the intensity of the tint.- This can be used to restrict the tint to certain pixels in a texture.
- This results in the texture becoming opaque.
- This is equivalent to the
overlay_colorparameter in texture atlas files.
Here's how the material instances of a grass block would look:
"minecraft:material_instances": {
"*": {
"texture": "wiki:custom_grass_side", // The dirt pixels would have an alpha value of 0, making them unaffected by the green tint
"tint_method": "grass",
"alpha_masked_tint": true
},
"down": {
"texture": "wiki:custom_dirt"
},
"up": {
"texture": "wiki:custom_grass_top",
"tint_method": "grass"
}
}Map Color Tinting
If your texture has tinting applied, the chances are, you'll want maps to display your block with that tint too.
Tint methods can be applied to the block's map color, not just its textures!
"minecraft:map_color": {
"color": "#ffffff",
"tint_method": "grass"
}List of Tint Methods
Tint Method | Preview | Vanilla Usage | Tint Modification |
|---|---|---|---|
birch_foliage | #80A755 |
|
|
default_foliage | #77AB2F |
|
|
dry_foliage | #A37546 |
|
|
evergreen_foliage | #619961 |
|
|
grass | #92BC58 |
|
|
water | #44AFF5 |
|
|
Contributors
Edit Block Tinting on GitHubText and image content on this page is licensed under the Creative Commons Attribution 4.0 International License
Code samples on this page are licensed under the MIT License
