Skip to main content

Item condition

Checks a single ItemStack. An item ID string cannot be treated directly as an arbitrary ItemCondition.

Types​

saturn:amount​

Compares the count of the item stack.

FieldTypeRequiredDefaultDescription
typeResource IDyes—saturn:amount
comparisonEnum stringyes—One of ==, !=, <, <=, >, >=.
compare_toNumberyes—The target number to compare against.
Example
{
"type": "saturn:amount",
"comparison": ">=",
"compare_to": 1
}

saturn:armor_value​

Compares the armor value provided by the equipment.

FieldTypeRequiredDefaultDescription
typeResource IDyes—saturn:armor_value
comparisonEnum stringyes—One of ==, !=, <, <=, >, >=.
compare_toNumberyes—The target number to compare against.
Example
{
"type": "saturn:armor_value",
"comparison": ">=",
"compare_to": 1
}

saturn:base_enchantment​

Compares the level of the given base enchantment on the item.

FieldTypeRequiredDefaultDescription
typeResource IDyes—saturn:base_enchantment
enchantmentResource IDyes—Enchantment ID or list of enchantments.
comparisonEnum stringyes—One of ==, !=, <, <=, >, >=.
compare_toNumberyes—The target number to compare against.
Example
{
"type": "saturn:base_enchantment",
"enchantment": "minecraft:unbreaking",
"comparison": ">=",
"compare_to": 1
}

saturn:block_item​

Checks whether the item is a block item.

FieldTypeRequiredDefaultDescription
typeResource IDyes—saturn:block_item
Example
{
"type": "saturn:block_item"
}

saturn:component​

Checks the data of the given component on the item stack.

FieldTypeRequiredDefaultDescription
typeResource IDyes—saturn:component
componentResource IDyes—Data component ID, or a switch for whether to read it as a text component.
nbtObjectyes—Vanilla CompoundTag data.
Example
{
"type": "saturn:component",
"component": "minecraft:custom_data",
"nbt": {}
}

saturn:durability​

Compares the remaining durability of the item.

FieldTypeRequiredDefaultDescription
typeResource IDyes—saturn:durability
comparisonEnum stringyes—One of ==, !=, <, <=, >, >=.
compare_toNumberyes—The target number to compare against.
Example
{
"type": "saturn:durability",
"comparison": ">=",
"compare_to": 1
}

saturn:empty​

Checks whether the item stack is empty.

FieldTypeRequiredDefaultDescription
typeResource IDyes—saturn:empty
Example
{
"type": "saturn:empty"
}

saturn:enchantable​

Checks whether the stack can currently be enchanted at an enchanting table.

FieldTypeRequiredDefaultDescription
typeResource IDyes—saturn:enchantable
Example
{
"type": "saturn:enchantable"
}

saturn:food​

Checks whether the stack has a food data component.

FieldTypeRequiredDefaultDescription
typeResource IDyes—saturn:food
Example
{
"type": "saturn:food"
}

saturn:fuel​

Compares the burn time of the item as fuel.

FieldTypeRequiredDefaultDescription
typeResource IDyes—saturn:fuel
comparisonEnum stringyes—One of ==, !=, <, <=, >, >=.
compare_toNumberyes—The target number to compare against.
Example
{
"type": "saturn:fuel",
"comparison": ">=",
"compare_to": 1
}

saturn:has_component​

Checks whether the item stack has the given data component.

FieldTypeRequiredDefaultDescription
typeResource IDyes—saturn:has_component
componentResource IDyes—Data component ID, or a switch for whether to read it as a text component.
Example
{
"type": "saturn:has_component",
"component": "minecraft:custom_data"
}

saturn:ingredient​

Matches items using a Minecraft Ingredient.

FieldTypeRequiredDefaultDescription
typeResource IDyes—saturn:ingredient
ingredientVanilla Ingredient (item ID, #tag or item ID array)yes—Vanilla Ingredient.
Example
{
"type": "saturn:ingredient",
"ingredient": "#minecraft:logs"
}

saturn:is_damageable​

Checks whether the stack is damageable.

FieldTypeRequiredDefaultDescription
typeResource IDyes—saturn:is_damageable
Example
{
"type": "saturn:is_damageable"
}

saturn:is_equipable​

Checks whether the item can be equipped in the given slot.

FieldTypeRequiredDefaultDescription
typeResource IDyes—saturn:is_equipable
slotEnum stringnoomittedEquipment slot. Available values: mainhand, offhand, feet, legs, chest, head, body, saddle.
Example
{
"type": "saturn:is_equipable"
}

saturn:item_id​

Checks whether the item stack is the given item.

FieldTypeRequiredDefaultDescription
typeResource IDyes—saturn:item_id
itemResource IDyes—Item ID, predicate, or an item parameter key in the context.
Example
{
"type": "saturn:item_id",
"item": "minecraft:diamond"
}

saturn:item_matcher​

Checks the item stack against multiple item matcher entries.

FieldTypeRequiredDefaultDescription
typeResource IDyes—saturn:item_matcher
itemsArray of item matcher entriesyes—Item matcher entries, item predicates or an item list.
Example
{
"type": "saturn:item_matcher",
"items": [
"minecraft:diamond"
]
}

saturn:item_tag​

Checks whether the item belongs to the given tag.

FieldTypeRequiredDefaultDescription
typeResource IDyes—saturn:item_tag
tagTag ID (with #)yes—Registry tag, or the NBT data declared on this page.
Example
{
"type": "saturn:item_tag",
"tag": "#minecraft:logs"
}

saturn:on_cooldown​

Checks whether the item in the context is on cooldown.

FieldTypeRequiredDefaultDescription
typeResource IDyes—saturn:on_cooldown
Example
{
"type": "saturn:on_cooldown"
}

saturn:relative_durability​

Compares the ratio of the remaining durability to the max durability.

FieldTypeRequiredDefaultDescription
typeResource IDyes—saturn:relative_durability
comparisonEnum stringyes—One of ==, !=, <, <=, >, >=.
compare_toNumberyes—The target number to compare against.
Example
{
"type": "saturn:relative_durability",
"comparison": ">=",
"compare_to": 1
}

saturn:smeltable​

Checks whether the stack has a furnace smelting recipe. Server-only.

FieldTypeRequiredDefaultDescription
typeResource IDyes—saturn:smeltable
Example
{
"type": "saturn:smeltable"
}

saturn:tool_ability​

Checks whether the item supports the given NeoForge ItemAbility.

FieldTypeRequiredDefaultDescription
typeResource IDyes—saturn:tool_ability
abilityResource IDyes—Ability ID or tool ability, depending on the field type.
Example
{
"type": "saturn:tool_ability",
"ability": "example:heal"
}

Meta types​

These types do not test a concrete value themselves; they combine or delegate other types of the same kind and are embedded in the same fields.

saturn:always​

The condition is always true.

FieldTypeRequiredDefaultDescription
typeResource IDyes—saturn:always
Example
{
"type": "saturn:always"
}

saturn:and​

Matches only when every sub-condition holds.

FieldTypeRequiredDefaultDescription
typeResource IDyes—saturn:and
conditionsArray of conditions of the same kindyes—List of sub-conditions of the same kind.
Example
{
"type": "saturn:and",
"conditions": []
}

saturn:chance​

Decides whether the check succeeds based on a given chance.

FieldTypeRequiredDefaultDescription
typeResource IDyes—saturn:chance
chanceNumberyes—Hit chance; 0 never matches, 1 always matches. Codec range: 0.0D, 1.0D.
Example
{
"type": "saturn:chance",
"chance": 1
}

saturn:constant​

Returns the configured boolean value.

FieldTypeRequiredDefaultDescription
typeResource IDyes—saturn:constant
valueBooleanyes—The boolean result, or the expected/new boolean block property value.
Example
{
"type": "saturn:constant",
"value": true
}

saturn:js​

Calls a callback registered by KubeJS and passes the params argument.

FieldTypeRequiredDefaultDescription
typeResource IDyes—saturn:js
idStringyes—Identifier of the callback, option or entry.
paramsObjectno{}Parameter object passed to the script or formula.

Registered only when KubeJS is installed. JSON only selects an existing callback; it never executes a JavaScript string inside the JSON directly.

Example
{
"type": "saturn:js",
"id": "example_callback",
"params": {}
}

saturn:never​

The condition is always false.

FieldTypeRequiredDefaultDescription
typeResource IDyes—saturn:never
Example
{
"type": "saturn:never"
}

saturn:not​

Inverts the match result of the sub-condition.

FieldTypeRequiredDefaultDescription
typeResource IDyes—saturn:not
conditionItem conditionyes—The condition to check.
Example
{
"type": "saturn:not",
"condition": {
"type": "saturn:always"
}
}

saturn:or​

Matches when any sub-condition holds.

FieldTypeRequiredDefaultDescription
typeResource IDyes—saturn:or
conditionsArray of conditions of the same kindyes—List of sub-conditions of the same kind.
Example
{
"type": "saturn:or",
"conditions": []
}