Custom Blocks

File Structure

  • Blockstate to Modify: assets/minecraft/blockstates - To create a custom block, you will need to modify one of the JSON files located in the Minecraft namespace since you're overriding an existing block's model.

  • Custom Model: assets/your_namespace/models/block - Place your custom model file here.

  • Custom Texture: assets/your_namespace/textures/block - Place your texture here.

Modifying the Block States JSON

  • File: Choose a block that has many blockstates. For example, note blocks have hundreds of states to override and is found in the assets/minecraft/blockstates/note_block.json JSON file.

  • Content: Modify this file to reference your custom model when the block is placed with specific block states.

Inside note_block.json:

"variants": {
  "instrument=banjo,note=1": {
    "model": "your_namespace:block/custom_block_model"
  }
}

Note for Plugin Developers

When a player attempts to place the custom item, intercept the event in your plugin. Cancel the default placement and programmatically set a note block (or any other suitable block) at the location, with its block state configured to display your custom block model and texture.

Last updated