Skip to main content

Item Condition Types

Item conditions check properties of an item stack.

origins:amount

Checks the item stack size.

FieldTypeDefaultDescription
comparisonStringrequiredComparison operator
compare_toIntegerrequiredStack size to compare against

origins:armor_value

Checks the item's armor protection value.

FieldTypeDefaultDescription
comparisonStringrequiredComparison operator
compare_toIntegerrequiredValue to compare against
Example
"item_condition": {
"type": "origins:armor_value",
"comparison": ">",
"compare_to": 3
}

This example will check if the armor item (in this context, a chestplate) has a higher armor value than 3, which is the armor value for the leather chestplate armor item.

origins:base_enchantment

Unstable

This condition is currently unstable and may not work as intended. Please report if you encounter any issues with it.

Checks an enchantment level stored directly on the item, without applying enchantment-level powers.

FieldTypeDefaultDescription
enchantmentIdentifierrequiredEnchantment to inspect
comparisonString>=Comparison operator
compare_toIntegerrequiredEnchantment level to compare against

origins:block_item

Unstable

This condition is currently unstable and may not work as intended. Please report if you encounter any issues with it.

Checks whether the item stack contains a block item.

origins:component

Checks a specific data component value.

FieldTypeDefaultDescription
componentIdentifierrequiredData component ID
valueNBToptionalExpected value

origins:durability

Checks the item's current durability.

FieldTypeDefaultDescription
comparisonStringrequiredComparison operator
compare_toIntegerrequiredDurability to compare against
Example
"item_condition": {
"type": "origins:durability",
"comparison": "<=",
"compare_to": 100
}

This example will check if the item has a durability value of 100 or less.

origins:empty

Checks if the item stack is empty.

origins:enchantable

Checks if the item can be enchanted.

origins:food

Checks if the item is a food item.

origins:fuel

Example

Checks if the item can be used as furnace fuel.

"item_condition": {
"type": "origins:fuel",
"comparison": ">=",
"compare_to": 10
}

This example will check if the item fuel time value of 10 or more.

origins:has_component

Checks if the item has a specific data component.

FieldTypeDefaultDescription
componentIdentifierrequiredData component ID

origins:has_power

Checks if the item has a specific power (from Origins items).

FieldTypeDefaultDescription
powerIdentifierrequiredPower ID
Example
"item_condition": {
"type": "origins:has_power",
"power": "origins:water_breathing"
}

This example will check if the item has Merling's Gills (origins:water_breathing) power embedded to it.

origins:in_tag

Checks if the item is in an item tag.

FieldTypeDefaultDescription
tagIdentifierrequiredItem tag ID
Example
"item_condition": {
"type": "origins:in_tag",
"tag": "origins:meat"
}

This example will check whether item is in the origins:meat item tag.

origins:ingredient

Checks if the item matches an ingredient (item, tag, or list).

FieldTypeDefaultDescription
ingredient[Ingredient]requiredItem, tag, or List of items/tags

Ingredient format: {"item": "minecraft:diamond"} or {"tag": "minecraft:planks"} or [{"item": "..."}, {"tag": "..."}]

Example
"item_condition": {
"type": "origins:ingredient",
"ingredient": {
"tag": "minecraft:wool"
}
}

An ingredient which matches a diamond.

origins:is_damageable

Checks if the item is damageable (i.e. has durability).

origins:is_equipable

Checks if the item can be equipped in a specific slot.

origins:on_cooldown

Unstable

This condition is currently unstable and may not work as intended. Please report if you encounter any issues with it.

Checks whether the player currently holding the item has that item type on cooldown.

FieldTypeDefaultDescription
None---

origins:power_count

Checks the number of powers the item has.

FieldTypeDefaultDescription
comparisonStringrequiredComparison operator
compare_toIntegerrequiredValue to compare against
Example
"item_condition": {
"type": "origins:power_count",
"comparison": ">",
"compare_to": 0
}

This example will check if the item has more than 0 powers embedded in it.

origins:relative_durability

Checks the item's durability as a percentage.

FieldTypeDefaultDescription
comparisonStringrequiredComparison operator
compare_toFloatrequiredPercentage (0-1) to compare against
Example
"item_condition": {
"type": "origins:relative_durability",
"comparison": ">=",
"compare_to": 0.9
}

This example will check if the item has a 90% durability or greater.

origins:smeltable

Checks if the item can be smelted in a furnace. (i.e. has a furnace recipe)

origins:tool_ability

Checks if the item is the correct tool for a specific block-mining ability.

FieldTypeDefaultDescription
abilityStringrequiredTool ability name