Bi-entity condition
Checks the relationship between the actor and the target. Swapping the two sides changes the meaning of some conditions.
Types
saturn:attack_target
Checks whether target is the mob actor’s current attack target.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:attack_target |
Example
{
"type": "saturn:attack_target"
}
actor is the initiator and target the other entity; their order is defined by the caller.
saturn:attacker
Checks whether actor is the last living attacker of target.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:attacker |
Example
{
"type": "saturn:attacker"
}
actor is the initiator and target the other entity; their order is defined by the caller.
saturn:can_see
Checks the line of sight between the two sides with a block and fluid ray.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:can_see |
shape_type | Object | no | "visual" | Block shape mode used by the line-of-sight ray. Available values: collider, outline, visual, falldamage_resetting. |
fluid_handling | Object | no | "none" | How the line-of-sight ray handles fluids. Available values: none, source_only, any, water. |
Example
{
"type": "saturn:can_see"
}
saturn:distance
Checks whether the distance between the actor and the target is within the maximum.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:distance |
maximum | Number provider | yes | — | The maximum value, or upper bound. |
Example
{
"type": "saturn:distance",
"maximum": 1
}
saturn:equal
Checks whether actor and target are the same entity instance.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:equal |
Example
{
"type": "saturn:equal"
}
actor is the initiator and target the other entity; their order is defined by the caller.
saturn:owner
Checks whether actor’s UUID matches the owner reference of target.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:owner |
Example
{
"type": "saturn:owner"
}
actor is the initiator and target the other entity; their order is defined by the caller.
saturn:relation
Checks whether the actor and the target are allied to each other.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:relation |
allied | Boolean | no | true | Expected alliance state. |
Example
{
"type": "saturn:relation"
}
saturn:relative_rotation
Compares the rotation difference between the actor and the target on the given axes.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:relative_rotation |
axis | Array of enum strings | no | ["x","y","z"] | Rotation axes included in the calculation. Available values: x, y, z. |
actor_rotation | Enum string | no | "head" | Whether the actor uses head or body rotation. Available values: head, body. |
target_rotation | Enum string | no | "body" | Whether the target uses head or body rotation. Available values: head, body. |
comparison | Enum string | yes | — | One of ==, !=, <, <=, >, >=. |
compare_to | Number | yes | — | The target number to compare against. |
Example
{
"type": "saturn:relative_rotation",
"comparison": ">=",
"compare_to": 1
}
saturn:riding
Checks whether actor is directly riding target.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:riding |
Example
{
"type": "saturn:riding"
}
actor is the initiator and target the other entity; their order is defined by the caller.
saturn:riding_recursive
Checks multi-level riding relationships.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:riding_recursive |
Example
{
"type": "saturn:riding_recursive"
}
saturn:riding_root
Checks whether target is actor’s root vehicle.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:riding_root |
Example
{
"type": "saturn:riding_root"
}
actor is the initiator and target the other entity; their order is defined by the caller.
An unmounted entity is its own root vehicle, so the same entity passed at both ends can also match.
saturn:same_team
Checks whether the actor and the target are on the same team.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:same_team |
Example
{
"type": "saturn:same_team"
}
saturn:team
Reads or checks the scoreboard team of the entity.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:team |
same_team | Boolean | no | true | true requires the same team, false requires different teams. |
Example
{
"type": "saturn:team"
}
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:actor_condition
Lets the actor be checked by an entity condition.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:actor_condition |
condition | Entity condition | yes | — | The condition to check. |
Example
{
"type": "saturn:actor_condition",
"condition": {
"type": "saturn:always"
}
}
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:both
Checks the same entity condition against both the actor and the target; matches only when both hold.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:both |
condition | Entity condition | yes | — | The condition to check. |
Example
{
"type": "saturn:both",
"condition": {
"type": "saturn:always"
}
}
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
}
actor is the initiator and target the other entity; their order is defined by the caller.
saturn:either
Checks the same entity condition against the actor and the target; matches when at least one side holds.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:either |
condition | Entity condition | yes | — | The condition to check. |
Example
{
"type": "saturn:either",
"condition": {
"type": "saturn:always"
}
}
saturn:invert
Swaps actor and target before evaluating the nested object.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:invert |
condition | Bi-entity conditions | yes | — | Filter condition of the declared context type. |
Example
{
"type": "saturn:invert",
"condition": {
"type": "saturn:always"
}
}
actor is the initiator and target the other entity; their order is defined by the caller.
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:mutual
Requires the bi-entity condition to hold both in the original order and with the actor and target swapped.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:mutual |
condition | Bi-entity condition | yes | — | The condition to check. |
Example
{
"type": "saturn:mutual",
"condition": {
"type": "saturn:always"
}
}
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 | Bi-entity 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": []
}
saturn:target_condition
Lets the target be checked by an entity condition.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:target_condition |
condition | Entity condition | yes | — | The condition to check. |
Example
{
"type": "saturn:target_condition",
"condition": {
"type": "saturn:always"
}
}
saturn:undirected
Matches if the original order or the swapped actor and target order matches once.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:undirected |
condition | Bi-entity condition | yes | — | The condition to check. |
Example
{
"type": "saturn:undirected",
"condition": {
"type": "saturn:always"
}
}