Skip to content

How to make a block with a different texture on each side (Minecraft mod)

A block is drawn from three files. The blockstate (assets/<modid>/blockstates) says which model to use. The block model (models/block) says its shape and textures. The item model (models/item) makes the item in the inventory look like the block. For a different top, side and bottom, use the parent minecraft:block/cube_bottom_top and name three textures. Use minecraft:block/cube_column for a log with end caps.

Works on Minecraft 1.20.1 to 26.3 on NeoForge; Minecraft 1.16.5 to 26.3 on Fabric; Minecraft 1.16.5 to 1.20.1 on Forge; Minecraft 1.12.2 on Forge. Each example was compiled against its loader and version before it shipped in Linen.

  1. Write the block model with parent cube_bottom_top and three texture names.
  2. Write the blockstate that points to the model.
  3. Write the item model with the block model as its parent.
  4. Draw the three PNGs at 16 by 16 and look at the block in the game.

The example mod is examplemod in the package com.example.examplemod. Use your own mod id and package.

Fabric and NeoForge 1.20.4 to 1.21.1, NeoForge 1.20.1 to 1.20.2, Fabric 1.16.5 to 1.20.3, Forge 1.16.5 to 1.20.1

Section titled “Fabric and NeoForge 1.20.4 to 1.21.1, NeoForge 1.20.1 to 1.20.2, Fabric 1.16.5 to 1.20.3, Forge 1.16.5 to 1.20.1”

Uses:

  • minecraft:block/cube_bottom_top
  • minecraft:block/cube_column
  • blockstates
  • models/block

Draw three textures: ruby_pillar_top.png, ruby_pillar_side.png and ruby_pillar_bottom.png in assets/<modid>/textures/block. Until they exist the block shows purple and black.

src/main/resources/assets/examplemod/models/block/ruby_pillar.json

{
"parent": "minecraft:block/cube_bottom_top",
"textures": {
"top": "examplemod:block/ruby_pillar_top",
"side": "examplemod:block/ruby_pillar_side",
"bottom": "examplemod:block/ruby_pillar_bottom"
}
}

src/main/resources/assets/examplemod/blockstates/ruby_pillar.json

{
"variants": {
"": { "model": "examplemod:block/ruby_pillar" }
}
}

src/main/resources/assets/examplemod/models/item/ruby_pillar.json

{
"parent": "examplemod:block/ruby_pillar"
}

Uses:

  • minecraft:block/cube_bottom_top
  • minecraft:block/cube_column
  • blockstates
  • models/block

Draw three textures: ruby_pillar_top.png, ruby_pillar_side.png and ruby_pillar_bottom.png in assets/<modid>/textures/block. Until they exist the block shows purple and black. From 1.21.4 the item also needs assets/<mod_id>/items/<name>.json that points at its model.

src/main/resources/assets/examplemod/models/block/ruby_pillar.json

{
"parent": "minecraft:block/cube_bottom_top",
"textures": {
"top": "examplemod:block/ruby_pillar_top",
"side": "examplemod:block/ruby_pillar_side",
"bottom": "examplemod:block/ruby_pillar_bottom"
}
}

src/main/resources/assets/examplemod/blockstates/ruby_pillar.json

{
"variants": {
"": { "model": "examplemod:block/ruby_pillar" }
}
}

src/main/resources/assets/examplemod/models/item/ruby_pillar.json

{
"parent": "examplemod:block/ruby_pillar"
}

Uses:

  • minecraft:block/cube_bottom_top
  • blockstates
  • models/block

Draw three textures: ruby_pillar_top.png, ruby_pillar_side.png and ruby_pillar_bottom.png in assets/<modid>/textures/blocks (1.12.2 says blocks and items, in the plural). Until they exist the block shows purple and black. In a 1.12.2 blockstate the model name is relative to models/block, and the state with no properties is called normal.

src/main/resources/assets/examplemod/models/block/ruby_pillar.json

{
"parent": "minecraft:block/cube_bottom_top",
"textures": {
"top": "examplemod:blocks/ruby_pillar_top",
"side": "examplemod:blocks/ruby_pillar_side",
"bottom": "examplemod:blocks/ruby_pillar_bottom"
}
}

src/main/resources/assets/examplemod/blockstates/ruby_pillar.json

{
"variants": {
"normal": { "model": "examplemod:ruby_pillar" }
}
}

src/main/resources/assets/examplemod/models/item/ruby_pillar.json

{
"parent": "examplemod:block/ruby_pillar"
}

Linen’s How-tos library has this page too, with the example for your own mod’s loader and Minecraft version. Hover a name in your code and Linen points to the how-tos that explain it. Both are free. Download Linen.