Skip to content

Conditions Reference

Conditions determine when a transmutation rule should be applied to an item. This page documents all available condition types.

All conditions have a type field that determines their behavior:

{
"type": "condition_type_name",
// ... additional fields depending on type
}

Always matches, regardless of item data. Useful for catch-all rules.

Fields:

  • None

Example:

{
"type": "always"
}

Use Case: Fallback rules that should apply to all items that weren’t caught by higher-priority rules.


Checks if a component or NBT path exists on the item.

Fields:

FieldTypeRequiredDescription
pathStringYesDot-notation path to check

Example:

{
"type": "component_exists",
"path": "components.minecraft:custom_data.PublicBukkitValues.oraxen:id"
}

Use Case: Detecting items from specific plugins or systems that add marker data.


Checks if a component value equals a specific value.

Fields:

FieldTypeRequiredDescription
pathStringYesDot-notation path to check
valueAnyYesExpected value (string, number, boolean, or null)

Example:

{
"type": "component_equals",
"path": "components.minecraft:custom_data.item_type",
"value": "weapon"
}

Supported Value Types:

  • Strings: "sword", "magic_wand"
  • Numbers: 42, 3.14
  • Booleans: true, false
  • Null: null

Use Case: Matching specific item types or categories.


Matches items with a specific item ID.

Fields:

FieldTypeRequiredDescription
itemIdStringYesItem ID to match (e.g., minecraft:diamond_sword)

Example:

{
"type": "item_id",
"itemId": "minecraft:diamond_sword"
}

Use Case: Applying conversions only to specific vanilla or modded item types.


Matches if ANY of the sub-conditions match (logical OR).

Fields:

FieldTypeRequiredDescription
anyArrayYesArray of condition objects

Example:

{
"type": "any",
"any": [
{
"type": "item_id",
"itemId": "minecraft:diamond_sword"
},
{
"type": "item_id",
"itemId": "minecraft:netherite_sword"
}
]
}

Use Case: Matching multiple item types or multiple possible data structures.


Matches if ALL of the sub-conditions match (logical AND).

Fields:

FieldTypeRequiredDescription
allArrayYesArray of condition objects

Example:

{
"type": "all",
"all": [
{
"type": "item_id",
"itemId": "minecraft:diamond_sword"
},
{
"type": "component_exists",
"path": "components.minecraft:custom_data.enchanted"
},
{
"type": "component_equals",
"path": "components.minecraft:custom_data.tier",
"value": "legendary"
}
]
}

Use Case: Matching items that meet multiple criteria simultaneously.


You can nest any and all conditions for complex logic:

{
"type": "all",
"all": [
{
"type": "component_exists",
"path": "components.minecraft:custom_data.legacy_data"
},
{
"type": "any",
"any": [
{
"type": "component_equals",
"path": "components.minecraft:custom_data.legacy_data.version",
"value": 1
},
{
"type": "component_equals",
"path": "components.minecraft:custom_data.legacy_data.version",
"value": 2
}
]
}
]
}

Logic: Item has legacy_data AND (version == 1 OR version == 2)

{
"type": "all",
"all": [
{
"type": "any",
"any": [
{"type": "item_id", "itemId": "minecraft:diamond_sword"},
{"type": "item_id", "itemId": "minecraft:diamond_axe"},
{"type": "item_id", "itemId": "minecraft:diamond_pickaxe"}
]
},
{
"type": "component_exists",
"path": "components.minecraft:custom_data.PublicBukkitValues"
}
]
}

Logic: Item is a diamond tool AND has Bukkit data

{
"type": "all",
"all": [
{
"type": "component_exists",
"path": "components.minecraft:custom_data.PublicBukkitValues.oraxen:id"
},
{
"type": "component_equals",
"path": "components.minecraft:custom_data.PublicBukkitValues.oraxen:id",
"value": "ruby_sword"
}
]
}

Logic: Item has Oraxen ID AND the ID equals “ruby_sword”

Paths use dot-notation to navigate nested structures:

id # Root item ID
components # Components container
components.minecraft:custom_data # Custom data component
components.minecraft:custom_data.my_key.nested # Nested keys
components.custom:namespace # Custom namespace

Important:

  • Always include namespace prefixes (e.g., minecraft:custom_data)
  • Paths are case-sensitive
  • Non-existent paths return null (use component_exists to check)
// Check if path exists before checking its value
{
"type": "all",
"all": [
{"type": "component_exists", "path": "components.minecraft:custom_data.type"},
{"type": "component_equals", "path": "components.minecraft:custom_data.type", "value": "weapon"}
]
}
// Multiple item types that should be converted the same way
{
"type": "any",
"any": [
{"type": "item_id", "itemId": "minecraft:iron_sword"},
{"type": "item_id", "itemId": "minecraft:iron_axe"}
]
}
// Bad: Matches too many items
{
"type": "component_exists",
"path": "components.minecraft:custom_data"
}
// Good: Specific marker
{
"type": "component_exists",
"path": "components.minecraft:custom_data.oraxen_marker"
}

Enable logConversions in the config to verify your conditions are matching the intended items:

{
"enableTransmutation": true,
"logConversions": true
}