Presets

Item presets

Adventure map key item preset

This preset makes a practical adventure-map key instead of a decorative item only. The player sees a named Vault Key with lore, while command logic can detect the `custom_data` marker. The screenshots show the Give workbench fields and the in-game tripwire hook result so both creator and player use cases are covered.

Preset result

A readable Vault Key item with lore for players and custom_data for map logic.

Output

Adventure key give command

/give @p minecraft:tripwire_hook[custom_name={text:"Vault Key",color:"yellow",italic:false},lore=[{text:"Opens the trial vault",color:"gray",italic:false}],custom_data={key:"trial_vault"}] 1

Preset screenshot

The tripwire hook is a recognizable key-like item that works well in adventure maps.
The name and lore explain the key to players before any command logic runs.
The output includes both player-facing text and a machine-readable custom_data field.
The capture confirms the generated command delivers a key-like item in hand.

Build the preset

  1. Open Give and set the item to Tripwire Hook.
  2. Name the item Vault Key and choose a readable yellow color.
  3. Add a lore line that explains what the key opens.
  4. Add custom_data such as {key:"trial_vault"} for later detection.
  5. Check that the command is still under the chat limit.
  6. Copy the command for testing or save it with the rest of the map setup.

Player-facing and logic-facing data

A good map key needs two layers. The custom name and lore tell players what they found. The custom_data field gives your command logic a stable marker that is less fragile than checking only the displayed name.

NBTForge keeps both layers in one output review. That makes it easier to confirm the key still looks right after you add the data field needed by selectors, clear commands, or reward cleanup.

Choosing the item

A tripwire hook is a strong default key item because it already reads like a key in the inventory. If your resource pack has a custom model, you can later add item model or custom model data without changing the core logic.

Keep the first key command short. It should be easy to paste, test, clear, and detect before it becomes part of a larger door, vault, or quest chain.

  • Use tripwire hook for a vanilla key shape.
  • Use custom_data for command logic.
  • Use lore for player instructions.

Testing map logic

After the item appears correctly in-game, test detection separately. Use a small selector or clear command that checks for the custom_data marker before connecting the key to a door or vault event.

If detection fails, do not rename the item first. Check the custom_data syntax, version target, and selector path so the visual key and logic key stay aligned.

For adjacent item workflows, compare the custom sword preset, then use Minecraft command not working when selector detection needs debugging.

FAQ

Why use custom_data instead of only the name?

Names are player-facing and can change for presentation. custom_data is a better stable marker for map commands that need to identify the key.

Can I use another item as the key?

Yes. Change the item field and keep the same name, lore, and custom_data pattern if it fits your map.

Can this key be consumed after use?

Yes. Add a separate clear or item command that targets the custom_data marker after the door or vault action succeeds.

Open this workflow

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