1. Wiki
  2. /Blocks
  3. /Block textures, sounds and names

Block textures, sounds and names

The resource pack side of a custom block: terrain_texture.json, material_instances, blocks.json sounds and the name in en_US.lang.

A custom block, like an item, lives in two packs. The behavior pack says how it behaves. The resource pack holds its textures, sound and name.

The files

Resource pack
RP/
  blocks.json
  textures/
    terrain_texture.json
    blocks/
      ruby_block.png
  texts/
    en_US.lang

Step 1: the texture

Save a 16x16 PNG in RP/textures/blocks/. Then give it a short name in terrain_texture.json:

RP/textures/terrain_texture.json
{
  "resource_pack_name": "My Ruby Add-on",
  "texture_name": "atlas.terrain",
  "padding": 8,
  "num_mip_levels": 4,
  "texture_data": {
    "ruby_block": {
      "textures": "textures/blocks/ruby_block"
    }
  }
}

Step 2: put it on the block

The behavior pack block picks textures with minecraft:material_instances. * means every face.

BP/blocks/ruby_block.json
"minecraft:material_instances": {
  "*": {
    "texture": "ruby_block",
    "render_method": "opaque"
  }
}

For different faces, name them. Faces you leave out use *:

BP/blocks/ruby_block.json
"minecraft:material_instances": {
  "*": { "texture": "ruby_block_side" },
  "up": { "texture": "ruby_block_top" },
  "down": { "texture": "ruby_block_bottom" }
}
render_methodUse it for
opaqueSolid blocks. The default.
alpha_testCut-out pixels, like leaves or glass panes. Both sides drawn.
alpha_test_single_sidedCut-out pixels, front side only.
blendSee-through colour, like stained glass.
double_sidedSolid, but drawn from both sides.

Step 3: the sound

blocks.json sits in the root of the resource pack. It sets the sound for breaking, placing and walking:

RP/blocks.json
{
  "format_version": "1.21.40",
  "wiki:ruby_block": {
    "sound": "stone"
  }
}

Common sounds: stone, wood, gravel, grass, glass, metal, sand, cloth, amethyst_block.

Step 4: the name

RP/texts/en_US.lang
tile.wiki:ruby_block.name=Ruby Block

Blocks use tile. and end with .name. You can also set minecraft:display_name in the block file.

Custom shapes

For a shape that is not a full cube, make a model, save it as RP/models/blocks/<name>.geo.json and point minecraft:geometry at its geometry.<name>. The face names in material_instances then match the bone face names of your model.

Purple and black checkerboard

The texture's short name is not in terrain_texture.json, or its path is wrong. Leave .png out of the path, and remember the file is cached: restart the world after changing it.

We use cookies to improve your experience and analyse site traffic. Learn more