DAI 3.0 · STEP-BY-STEP
Custom Items
Create an item identity with vanilla fallback, custom data, name/lore, components and optional resource-pack presentation.
What you are building
Primary path:
Create an item identity with vanilla fallback, custom data, name/lore, components and optional resource-pack presentation.
data/<namespace>/dai_items/Create an item identity with vanilla fallback, custom data, name/lore, components and optional resource-pack presentation.
Step-by-step
- Create the pack shellMake
pack.mcmeta,data/<namespace>/and load/tick function tags. - Create the item definitionAdd one JSON file under
dai_items. Give it a stable namespaced ID and keep that ID unchanged across releases. - Choose a vanilla carrierPick an item that behaves acceptably even when no companion resource pack is installed. This is especially important for stackable addons.
- Add server-visible identityUse stable custom data/components so functions and reactions can distinguish your item from the vanilla carrier.
- Give it from a functionCreate
function/item/give_*.mcfunctionso the authoritative server constructs the exact item stack. - Add interaction logicRoute right-click, attack, inventory or reaction events to server functions; never make the visual model the source of gameplay truth.
- Add optional presentationA resource pack may target the stable item identity for a custom model while the datapack remains functional without it.
- Test the fallbackDisable the resource pack and verify the item still has usable vanilla visuals and all mechanics still work.
Definition of done
- The feature still works after save/reload.
- Server state is authoritative; presentation mirrors it.
- Invalid input cannot duplicate rewards or bypass costs.
- Two players can use the system without sharing unintended temporary state.
- Any optional resource pack can be disabled without breaking datapack logic.
Next integration
Once this feature works alone, connect it to a complete loop instead of adding more isolated content. Use the complete-game tracks to see where it belongs in ACMS, Space Between Blocks, MineTrigger or Hollow Spiral.