Block Texture Variation
FORMAT VERSION 1.21.120
When using texture variation with the material instances component, ensure that the format_version in your pack manifest is 1.21.120 or higher.
Block texture variation is when a block type can have multiple textures that are randomly applied to the block based on its position in the world. This is useful for blocks such as dirt or grass, where some blocks may have slight variations, such as small rocks, and others don't.
Issues:
- Variations referencing texture set files do not use the defined heightmap, MER or normal map files (MCPE-126617).
Applying Texture Variation
To enable texture variations, create a terrain_texture.json file in your resource pack's textures folder.
This file contains a list of block textures. Variated block textures have a variation parameter which is an array of the different textures that will be randomly displayed on the block. Through use of the weight parameter, certain texture variations can be made more common than others (see here).
This is an example of how to create 3 texture variations for the vanilla dirt block:
- Create or modify three dirt textures, name them
dirt0.png,dirt1.png, anddirt2.png. - Copy the
dirt0.png,dirt1.png, anddirt2.pngto the location noted in the path variable. This could contain additional folders if you want to be orderly. - Add the following to dirt's texture entry:
{
"resource_pack_name": "wiki",
"texture_name": "atlas.terrain",
"texture_data": {
"dirt": {
"textures": {
"variations": [
{ "path": "textures/blocks/dirt0" },
{ "path": "textures/blocks/dirt1" },
{ "path": "textures/blocks/dirt2" }
]
}
}
}
}Weighted Texture Variation
After using the example above, you might want to adjust the weights, edit the terrain_texture.json to include a weight field as shown below.
To calculate how likely a texture variation is, add all of the weights together (in this case 70 + 20 + 10 = 100) and divide the weight by this total. For example, the probability of the dirt0 variation being chosen is 70 ÷ 100, so 70% of positions in the world will display dirt0 if dirt is placed there.
{
"resource_pack_name": "wiki",
"texture_name": "atlas.terrain",
"texture_data": {
"dirt": {
"textures": {
"variations": [
{ "path": "textures/blocks/dirt0", "weight": 70 },
{ "path": "textures/blocks/dirt1", "weight": 20 },
{ "path": "textures/blocks/dirt2", "weight": 10 }
]
}
}
}
}




