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.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:amount |
comparison | Enum string | yes | — | One of ==, !=, <, <=, >, >=. |
compare_to | Number | yes | — | 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.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:armor_value |
comparison | Enum string | yes | — | One of ==, !=, <, <=, >, >=. |
compare_to | Number | yes | — | 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.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:base_enchantment |
enchantment | Resource ID | yes | — | Enchantment ID or list of enchantments. |
comparison | Enum string | yes | — | One of ==, !=, <, <=, >, >=. |
compare_to | Number | yes | — | 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.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:block_item |
Example
{
"type": "saturn:block_item"
}
saturn:component
Checks the data of the given component on the item stack.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:component |
component | Resource ID | yes | — | Data component ID, or a switch for whether to read it as a text component. |
nbt | Object | yes | — | Vanilla CompoundTag data. |
Example
{
"type": "saturn:component",
"component": "minecraft:custom_data",
"nbt": {}
}
saturn:durability
Compares the remaining durability of the item.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:durability |
comparison | Enum string | yes | — | One of ==, !=, <, <=, >, >=. |
compare_to | Number | yes | — | The target number to compare against. |
Example
{
"type": "saturn:durability",
"comparison": ">=",
"compare_to": 1
}
saturn:empty
Checks whether the item stack is empty.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:empty |
Example
{
"type": "saturn:empty"
}
saturn:enchantable
Checks whether the stack can currently be enchanted at an enchanting table.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:enchantable |
Example
{
"type": "saturn:enchantable"
}
saturn:food
Checks whether the stack has a food data component.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:food |
Example
{
"type": "saturn:food"
}
saturn:fuel
Compares the burn time of the item as fuel.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:fuel |
comparison | Enum string | yes | — | One of ==, !=, <, <=, >, >=. |
compare_to | Number | yes | — | 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.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:has_component |
component | Resource ID | yes | — | 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.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:ingredient |
ingredient | Vanilla 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.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:is_damageable |
Example
{
"type": "saturn:is_damageable"
}
saturn:is_equipable
Checks whether the item can be equipped in the given slot.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:is_equipable |
slot | Enum string | no | omitted | Equipment 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.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:item_id |
item | Resource ID | yes | — | 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.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:item_matcher |
items | Array of item matcher entries | yes | — | 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.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:item_tag |
tag | Tag 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.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:on_cooldown |
Example
{
"type": "saturn:on_cooldown"
}
saturn:relative_durability
Compares the ratio of the remaining durability to the max durability.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:relative_durability |
comparison | Enum string | yes | — | One of ==, !=, <, <=, >, >=. |
compare_to | Number | yes | — | 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.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:smeltable |
Example
{
"type": "saturn:smeltable"
}
saturn:tool_ability
Checks whether the item supports the given NeoForge ItemAbility.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:tool_ability |
ability | Resource ID | yes | — | 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.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:always |
Example
{
"type": "saturn:always"
}
saturn:and
Matches only when every sub-condition holds.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:and |
conditions | Array of conditions of the same kind | yes | — | 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.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:chance |
chance | Number | yes | — | 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.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:constant |
value | Boolean | yes | — | 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.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:js |
id | String | yes | — | Identifier of the callback, option or entry. |
params | Object | no | {} | 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.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:never |
Example
{
"type": "saturn:never"
}
saturn:not
Inverts the match result of the sub-condition.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:not |
condition | Item condition | yes | — | The condition to check. |
Example
{
"type": "saturn:not",
"condition": {
"type": "saturn:always"
}
}
saturn:or
Matches when any sub-condition holds.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:or |
conditions | Array of conditions of the same kind | yes | — | List of sub-conditions of the same kind. |
Example
{
"type": "saturn:or",
"conditions": []
}