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

Items

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


Creating a New Item

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

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 item (e.g., ruby)
  • Must be:
    • All lowercase
    • No spaces
    • Use underscores (_) to separate words

Base Item

  • Choose an existing Minecraft item (e.g., flint)
  • Think of it as the template for your custom item behavior.

Max Stack Size

  • The stack size of your item.
  • Can be from 1 - 99

Right Click Function?

  • Whether or not your item should do anything special when Right-clicked.

Right Click Mode

  • Only enabled if Right Click Function? is enabled.
  • Lets you choose Tick or Impulse:
    • Tick will run your custom behavior every tick (20 times per second) that the right click button is held down.
    • Impulse will run your custom behavior the tick the right click button is pressed, and nothing else.

Right Click Function

  • Only enabled if Right Click Function? is enabled.
  • This is the actual custom behavior to be ran when the item is right-clicked.
  • This is a list of Minecraft commands (without the /) to run.

Model

  • Choose one:
    • Generated: A standard item model.
    • Handheld: An item model for things like weapons.
    • Custom: Use a .json item model you provide
      • This must follow Minecraft’s item model format

Texture

  • Controls how the item looks.
  • The item requires a texture.

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