Item Providers and External Integrations
CraftingEngine includes a universal item matching and serialization SPI (ItemProvider) that allows recipes, inputs, tools, and outputs to reference custom items seamlessly across modern Minecraft plugins.
1. Supported Namespaces & Providers
You can reference items using namespaced string identifiers:
| Provider | Syntax Prefix | Example Identifier | Description |
|---|---|---|---|
| Vanilla | minecraft: | minecraft:diamond_sword | Standard Minecraft materials and items. |
| Item Tags (Vanilla & Convention) | #minecraft: / tag: | #minecraft:planks, tag:c:iron_ingots | Matches any material tagged in Bukkit’s Tag<Material> registry. |
| CustomModelData | cmd: | cmd:iron_sword:10042 | Vanilla material with specific CustomModelData tag. |
| ItemsAdder | ia: / itemsadder: | ia:ruby_sword | Full integration with ItemsAdder custom items. |
| Oraxen | oraxen: | oraxen:titanium_ingot | Full integration with Oraxen custom items. |
| MMOItems | mmoitems: | mmoitems:SWORD:DARK_REAPER | Format: mmoitems:<TYPE>:<ID>. |
| ExecutableItems | ei: | ei:god_pickaxe | ExecutableItems custom weapons and items. |
| ExecutableBlocks | eb: | eb:mana_crystal | ExecutableBlocks custom block items. |
| MythicMobs | mythicmobs: / mm: | mm:SkeletonKingCrown | MythicMobs 5.x and 4.x drop items. |
2. In-Game Inspection Tool
To verify the exact namespaced identifier of any item in your hand, execute:
/cfe item inspectCraftingEngine inspects the item’s NBT, PersistentDataContainer, and active external item provider hooks, printing the exact copy-paste string to use in your inputs: or outputs: YAML blocks.
3. Strict vs Loose Matching
In recipe definitions, you can control how strictly ingredients are matched:
inputs: - resource: "minecraft:diamond_sword" match_mode: "STRICT_NBT" # STRICT_NBT | IGNORE_DURABILITY | MATERIAL_ONLYSTRICT_NBT: Enforces identical NBT, custom lore, and enchantments.IGNORE_DURABILITY: Accepts damaged tools or weapons of the same material.MATERIAL_ONLY: Matches purely on Bukkit Material type, ignoring custom names and lore.
4. PersistentDataContainer (PDC) & Metadata Snapshotting (v2.9.0+)
CraftingEngine includes a deep metadata snapshotting pipeline (ItemMetadataSnapshotter). Whenever an ingredient is consumed (mode: CONSUME) or transactionally reserved (mode: RESERVE), the engine inspects the physical item:
- Captured PDC Primitive Types:
INTEGER,DOUBLE,FLOAT,LONG,BYTE,SHORT, andSTRING. - Captured Attributes:
custom_model_data, itemdisplay_name, anddurability. - Runtime Variable Storage: Captured metadata is stored in domain variables under
input_prop:<resource_id>:<key>andinput_prop:*:<key>.
These snapshot properties feed directly into the Ingredient Property Inheritance Pipeline to write persistent tags onto finished output items.
5. PlaceholderAPI Integration
CraftingEngine exposes contextual placeholders via PlaceholderAPI:
%craftingengine_active_processes%: Number of active crafts running for the player.%craftingengine_current_stage%: Name of the active stage at the current station.%craftingengine_process_progress%: Numeric percentage (0-100) of the active craft.
Next Steps
- Process Blueprints - Use external item identifiers in inputs and outputs.
- Workstations Reference - Bind custom ExecutableBlocks as workstations.