Block condition
Checks the block or environment at the context position. Embedded in BlockCondition fields.
Types
saturn:adjacent
Counts how many adjacent positions satisfy a block condition.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:adjacent |
adjacent_condition | Block condition | yes | — | Filter condition applied to adjacent blocks. |
comparison | Enum string | yes | — | One of ==, !=, <, <=, >, >=. |
compare_to | Number | yes | — | The target number to compare against. |
Example
{
"type": "saturn:adjacent",
"adjacent_condition": {
"type": "saturn:always"
},
"comparison": ">=",
"compare_to": 1
}
saturn:air
Checks whether the block is air.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:air |
Example
{
"type": "saturn:air"
}
saturn:attachable
Checks whether any adjacent block face can support an attachment at this position.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:attachable |
Example
{
"type": "saturn:attachable"
}
saturn:biome_tag
Checks whether the biome at the current position belongs to the given tag.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:biome_tag |
tag | Tag ID (with #) | yes | — | Registry tag, or the NBT data declared on this page. |
Example
{
"type": "saturn:biome_tag",
"tag": "#example:tag"
}
saturn:blast_resistance
Compares the blast resistance of the block.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:blast_resistance |
comparison | Enum string | yes | — | One of ==, !=, <, <=, >, >=. |
compare_to | Number | yes | — | The target number to compare against. |
Example
{
"type": "saturn:blast_resistance",
"comparison": ">=",
"compare_to": 1
}
saturn:block_entity
Checks whether a block entity exists at the target position.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:block_entity |
Example
{
"type": "saturn:block_entity"
}
saturn:block_id
Checks whether the block at the current position is the given type.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:block_id |
block | Resource ID | yes | — | Block ID or block argument. |
Example
{
"type": "saturn:block_id",
"block": "minecraft:stone"
}
saturn:block_state
Checks a boolean, serialized enum value or integer comparison of a block property.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:block_state |
property | String | yes | — | Block state property name. |
value | Boolean | no | omitted | The boolean result, or the expected/new boolean block property value. |
enum | String | no | omitted | Serialized property name, such as north or bottom. |
comparison | Enum string | no | omitted | Comparison operator: ==, !=, <, <=, > or >=. |
compare_to | Number | no | omitted | Numeric comparison target, used with comparison. |
Example
{
"type": "saturn:block_state",
"property": "age",
"comparison": ">=",
"compare_to": 7
}
Use value for booleans, enum for enum properties, and both comparison and compare_to for integers. Wrong types, incomplete fields or missing properties return false.
saturn:block_tag
Checks whether the block belongs to the given tag.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:block_tag |
tag | Tag ID (with #) | yes | — | Registry tag, or the NBT data declared on this page. |
Example
{
"type": "saturn:block_tag",
"tag": "#minecraft:logs"
}
saturn:exposed_to_sky
Checks whether the target block position can see the sky.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:exposed_to_sky |
Example
{
"type": "saturn:exposed_to_sky"
}
saturn:fluid
Checks whether the block’s fluid state matches the exact registered fluid.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:fluid |
fluid | Resource ID | yes | — | Registered fluid ID. |
Example
{
"type": "saturn:fluid",
"fluid": "minecraft:water"
}
saturn:hardness
Compares the hardness of the context block.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:hardness |
comparison | Enum string | yes | — | One of ==, !=, <, <=, >, >=. |
compare_to | Number | yes | — | The target number to compare against. |
Example
{
"type": "saturn:hardness",
"comparison": ">=",
"compare_to": 1
}
saturn:height
Compares the Y coordinate of the block position.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:height |
comparison | Enum string | yes | — | One of ==, !=, <, <=, >, >=. |
compare_to | Number | yes | — | The target number to compare against. |
Example
{
"type": "saturn:height",
"comparison": ">=",
"compare_to": 1
}
saturn:in_rain
Checks whether the target is exposed to rain at its current location.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:in_rain |
Example
{
"type": "saturn:in_rain"
}
saturn:in_snow
Checks whether the target is exposed to snow at its current position.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:in_snow |
Example
{
"type": "saturn:in_snow"
}
saturn:in_thunderstorm
Checks whether the target is exposed to rain during a thunderstorm.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:in_thunderstorm |
Example
{
"type": "saturn:in_thunderstorm"
}
saturn:light_blocking
Checks whether the block state can occlude light.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:light_blocking |
Example
{
"type": "saturn:light_blocking"
}
saturn:light_level
Compares the light level of the given light layer.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:light_level |
light_type | Object | no | omitted | Light layer, sky or block. Available values: sky, block. |
comparison | Enum string | yes | — | One of ==, !=, <, <=, >, >=. |
compare_to | Number | yes | — | The target number to compare against. |
Example
{
"type": "saturn:light_level",
"comparison": ">=",
"compare_to": 8,
"light_type": "sky"
}
saturn:movement_blocking
Checks whether the block blocks movement.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:movement_blocking |
Example
{
"type": "saturn:movement_blocking"
}
saturn:nbt
Matches a subset of the target’s saved NBT, including subset matching for lists.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:nbt |
nbt | NBT object | yes | — | NBT subset to match, expressed as a JSON object. |
Example
{
"type": "saturn:nbt",
"nbt": {
"Items": []
}
}
Uses vanilla NbtUtils.compareNbt subset matching. Match the fields actually saved by this Minecraft version. Block conditions require a block entity and return false when none exists.
saturn:raining
Checks whether the level currently reports rainy weather.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:raining |
Example
{
"type": "saturn:raining"
}
saturn:replaceable
Checks whether the block state can be replaced.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:replaceable |
Example
{
"type": "saturn:replaceable"
}
saturn:slipperiness
Compares the slipperiness of the block.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:slipperiness |
comparison | Enum string | yes | — | One of ==, !=, <, <=, >, >=. |
compare_to | Number | yes | — | The target number to compare against. |
Example
{
"type": "saturn:slipperiness",
"comparison": ">=",
"compare_to": 1
}
saturn:thundering
Checks whether the level currently reports a thunderstorm.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:thundering |
Example
{
"type": "saturn:thundering"
}
saturn:water_loggable
Checks whether the block implements LiquidBlockContainer.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:water_loggable |
Example
{
"type": "saturn:water_loggable"
}
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 | Block condition | yes | — | The condition to check. |
Example
{
"type": "saturn:not",
"condition": {
"type": "saturn:always"
}
}
saturn:offset
Moves the block context by the given offset before checking or executing the sub-value.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:offset |
condition | Block condition | yes | — | The condition to check. |
x | Integer | no | 0 | X coordinate, offset or vector component, depending on this page's behavior. |
y | Integer | no | 0 | Y coordinate, offset or vector component, depending on this page's behavior. |
z | Integer | no | 0 | Z coordinate, offset or vector component, depending on this page's behavior. |
Example
{
"type": "saturn:offset",
"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": []
}