Block Generator - Faith-and-Code-Technologies/mDirt GitHub Wiki

Blocks

This page explains how to use the Block generator in mDirt to add custom blocks to your Minecraft datapack.


Creating a New Block

  1. In the Menu Bar, go to New Element → Block
  2. The main area will update with fields for configuring your block.

Filling Out the Fields

Display Name

  • The name shown to the player in-game.
  • This appears in inventory tooltips and when hovered over.

Name

  • The internal ID of the block (e.g., ruby_ore)
  • Must be:
    • All lowercase
    • No spaces
    • Use underscores (_) to separate words

Base Block

  • Choose an existing Minecraft block (e.g., minecraft:stone)
  • This controls:
    • What tool can mine it
    • Hardness
    • Default sounds
    • Redstone properties
  • Think of it as the template for your custom block’s behavior.

Drop

  • What the block will drop when broken.
  • Options:
    • A Minecraft item/block (diamond)
    • A custom item/block/equipment from your project
    • "self" (default): the block drops itself

🔧 If the drop doesn't work in-game, make sure the referenced item or block exists and is registered correctly.

Place Sound

  • A Minecraft sound event that plays when the block is placed (e.g., block.stone.place)
  • Optional, but adds polish.

🔧 Make sure you do not use a minecraft: prefix!

Directional

  • On: The block will rotate depending on the player’s facing direction when placed (like logs).
  • Off: The block will always face a default direction (like stone).

📏 Use this for blocks like pillars.

Model

  • Choose one:
    • Block: A standard cube model (uses 6 separate textures)
    • Custom: Use a .json block model you provide
      • This must follow Minecraft’s block model format
      • Be sure to only fill the Bottom texture if using custom

Texture

  • Controls how the block looks.
  • Standard blocks require 6 textures (Top, Bottom, North, South, East, West)
  • Custom models only use the Bottom texture field — leave the rest empty

🖼 Must be .png files. 16x16 or 32x32 look best in game, though any size will work.