Presets

Datapack presets

Item modifier preset for custom rewards

Item modifier preset for custom rewards is now a complete Data Pack workflow instead of a templated command note. Use this preset when the reward item should be shaped by datapack logic after loot generation. Item modifiers let loot tables, `/item modify`, and reward functions share the same item polish without duplicating the custom name, lore, rarity, and custom data in several command strings. The article keeps the setup fields, output review, Project placement, and result capture together so the command is easy to audit before it becomes part of a map setup, event trigger, or reusable command pack. The Data Pack workbench ties the modifier function, namespace, path, and item text fields together. That matters because a modifier is often referenced from another resource, so the path is just as important as the JSON body.

Preset result

An item modifier resource that turns a generated reward into a named quest medal.

Output

Reward item modifier JSON

data/nbtforge/item_modifier/rewards/quest_medal.json
{
  "function": "minecraft:set_components",
  "components": {
    "minecraft:custom_name": {
      "text": "Crypt Medal",
      "color": "gold",
      "italic": false
    },
    "minecraft:lore": [
      {
        "text": "Awarded for clearing the crypt",
        "color": "gray",
        "italic": false
      }
    ],
    "minecraft:rarity": "rare",
    "minecraft:custom_data": {
      "quest_reward": "crypt_clear"
    }
  }
}

Preset screenshot

Start with the Data Pack controls that define the preset state.
The second shot highlights the setting or companion command that changes player-facing behavior.
The output shot keeps the final command or command pair visible before it enters Project.

Build the preset

  1. Open Data Pack and select Item Modifier.
  2. Set namespace to `nbtforge` and resource path to `rewards/quest_medal`.
  3. Choose `set_components` when the reward needs name, lore, rarity, or custom data.
  4. Fill the visible reward text in the item component editor.
  5. Review the generated JSON and copy the path.
  6. Reference the modifier from loot, advancement, or `/item modify` workflow.
  7. Save the modifier path in Project with the command that uses it.

Why this Data Pack preset belongs in Project

Use this preset when the reward item should be shaped by datapack logic after loot generation. Item modifiers let loot tables, `/item modify`, and reward functions share the same item polish without duplicating the custom name, lore, rarity, and custom data in several command strings.

The Data Pack workbench ties the modifier function, namespace, path, and item text fields together. That matters because a modifier is often referenced from another resource, so the path is just as important as the JSON body. A copied command is only useful when the surrounding assumptions are visible: selector scope, world state, order inside the pack, and the exact output that will be pasted into Minecraft. Treat this preset as a checkpoint where those details can be reviewed before the command leaves NBTForge.

The gallery is structured around that review. The first shot shows the workbench state, the second shot calls out the field or companion module that changes player-facing behavior, and the output shot keeps the command or command pair visible. When the preset has a visible result, the in-game capture confirms the same idea in a restored test world rather than relying on a generic overlay.

Testing and scope checks

Keep display text and detection data separate. The name can change for balance or localization, but `custom_data.quest_reward` should remain stable so other commands can identify the reward item.

Run the first smoke test with a narrow selector and a clean world state. Environment, utility, routing, and feedback commands can look harmless, but they often affect every player or the whole world. Confirm the command changes only the intended state, then save the exact output beside the setup or follow-up lines that explain why it exists.

If the command becomes part of a function file or command-block chain, test the copied artifact, not only the live workbench state. That catches stale selectors, wrong command order, missing setup lines, and effects that only appeared to work because a previous test left state behind.

  • Keep selectors narrow until the full pack is reviewed.
  • Place world setup before encounter-specific overrides.
  • Save feedback commands next to the state change that triggers them.

Where to go next

Attach the modifier to a loot table entry or item command only after the standalone JSON reads correctly.

For connected rewards, compare the advancement reward preset and loot table boss drop preset.

FAQ

Can I paste this Data Pack command into chat?

Usually yes for a one-command smoke test if the selector is safe and the line is short. For repeatable map behavior, save it to Project and copy the ordered pack or function-style output.

Why is this gallery UI-only?

This preset produces JSON, project organization, or review workflow rather than a visible in-world object. The useful proof is the workbench state, output, and Project placement.

What should I check before sharing this preset?

Check selector scope, command order, target version, and whether the command belongs in setup, encounter logic, feedback, or cleanup. Those categories decide where it should sit in a Project pack.

Open this workflow

Start from the related Data Pack workbench, then adjust the preset fields for your world.