Damage condition
Checks the damage source, damage amount and related entities. Embedded in DamageCondition fields.
Types
saturn:amount
Compares the damage amount with a number.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:amount |
comparison | Enum string | yes | — | Comparison operator: ==, !=, <, <=, > or >=. |
compare_to | Number | yes | — | Numeric comparison target, used with comparison. |
Example
{
"type": "saturn:amount",
"comparison": ">=",
"compare_to": 5
}
saturn:amount_range
Checks whether the damage amount is between min and max, inclusive.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:amount_range |
min | Number provider | yes | — | Lower bound. |
max | Number provider | yes | — | Upper bound. |
Example
{
"type": "saturn:amount_range",
"min": 1,
"max": 1
}
saturn:attacker
Checks the causing entity of the damage source; returns false when there is none.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:attacker |
entity_condition | Entity conditions | yes | — | Filter condition of the declared context type. |
Example
{
"type": "saturn:attacker",
"entity_condition": {
"type": "saturn:living"
}
}
saturn:damage_type
Checks the type of the damage source.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:damage_type |
damage_type | Resource ID | yes | — | A vanilla damage type ID. |
Example
{
"type": "saturn:damage_type",
"damage_type": "minecraft:generic"
}
saturn:damage_type_tag
Checks whether the damage type belongs to the given tag.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:damage_type_tag |
tag | Tag ID (without #) | yes | — | A registry tag, or the NBT data declared by this page. |
Example
{
"type": "saturn:damage_type_tag",
"tag": "example:tag"
}
saturn:directness
Checks whether the damage is direct damage.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:directness |
direct | Boolean | no | true | true requires direct damage, false requires indirect damage. |
Example
{
"type": "saturn:directness"
}
saturn:fire
Checks whether the damage source is fire damage.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:fire |
Example
{
"type": "saturn:fire"
}
saturn:magic
Checks whether the damage source is magic damage.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:magic |
Example
{
"type": "saturn:magic"
}
saturn:projectile
Checks whether the damage comes from a projectile matching the type or condition.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:projectile |
projectile | Resource ID | no | omitted | Projectile entity type ID. |
projectile_condition | Entity condition | no | {"type":"saturn:always"} | Condition applied to the projectile entity. |
Example
{
"type": "saturn:projectile"
}
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 | Damage 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": []
}