Wiki 9Minecraft Wiki 9Minecraft
Dispenser Configurator Wiki › Guides › Create a Custom Dispenser Behavior for a Specific Item

Create a Custom Dispenser Behavior for a Specific Item

Setting Up Your Configuration File

Dispenser Configurator uses JSON data packs to define custom behaviors. Create a new data pack in your world's datapacks folder, then add a configuration file in the structure: data/namespace/dispenser_config/items/your_item.json.

Defining Item Behavior

In your JSON file, specify:

  • item: The item ID you want to configure (e.g., minecraft:diamond_pickaxe)
  • usage_type: How the dispenser should use it—common types include ITEM_USE (right-click behavior) or BLOCK_USE (block interaction)
  • targets: A list defining what happens when dispensed. Each target can specify block types, positions, or conditions the item should interact with

Example Structure

Your configuration might look like:

`json

{

"item": "minecraft:bone_meal",

"usage_type": "ITEM_USE",

"targets": [

{"type": "block", "blocks": ["minecraft:grass"]}

]

}

`

Reload your data pack with /reload to apply changes. Test by placing the configured item in a dispenser and powering it.