Skip to main content

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.

FieldTypeRequiredDefaultDescription
typeResource IDyes—saturn:adjacent
adjacent_conditionBlock conditionyes—Filter condition applied to adjacent blocks.
comparisonEnum stringyes—One of ==, !=, <, <=, >, >=.
compare_toNumberyes—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.

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

saturn:attachable​

Checks whether any adjacent block face can support an attachment at this position.

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

saturn:biome_tag​

Checks whether the biome at the current position belongs to the given tag.

FieldTypeRequiredDefaultDescription
typeResource IDyes—saturn:biome_tag
tagTag 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.

FieldTypeRequiredDefaultDescription
typeResource IDyes—saturn:blast_resistance
comparisonEnum stringyes—One of ==, !=, <, <=, >, >=.
compare_toNumberyes—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.

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

saturn:block_id​

Checks whether the block at the current position is the given type.

FieldTypeRequiredDefaultDescription
typeResource IDyes—saturn:block_id
blockResource IDyes—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.

FieldTypeRequiredDefaultDescription
typeResource IDyes—saturn:block_state
propertyStringyes—Block state property name.
valueBooleannoomittedThe boolean result, or the expected/new boolean block property value.
enumStringnoomittedSerialized property name, such as north or bottom.
comparisonEnum stringnoomittedComparison operator: ==, !=, <, <=, > or >=.
compare_toNumbernoomittedNumeric 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.

FieldTypeRequiredDefaultDescription
typeResource IDyes—saturn:block_tag
tagTag 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.

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

saturn:fluid​

Checks whether the block’s fluid state matches the exact registered fluid.

FieldTypeRequiredDefaultDescription
typeResource IDyes—saturn:fluid
fluidResource IDyes—Registered fluid ID.
Example
{
"type": "saturn:fluid",
"fluid": "minecraft:water"
}

saturn:hardness​

Compares the hardness of the context block.

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

saturn:height​

Compares the Y coordinate of the block position.

FieldTypeRequiredDefaultDescription
typeResource IDyes—saturn:height
comparisonEnum stringyes—One of ==, !=, <, <=, >, >=.
compare_toNumberyes—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.

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

saturn:in_snow​

Checks whether the target is exposed to snow at its current position.

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

saturn:in_thunderstorm​

Checks whether the target is exposed to rain during a thunderstorm.

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

saturn:light_blocking​

Checks whether the block state can occlude light.

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

saturn:light_level​

Compares the light level of the given light layer.

FieldTypeRequiredDefaultDescription
typeResource IDyes—saturn:light_level
light_typeObjectnoomittedLight layer, sky or block. Available values: sky, block.
comparisonEnum stringyes—One of ==, !=, <, <=, >, >=.
compare_toNumberyes—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.

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

saturn:nbt​

Matches a subset of the target’s saved NBT, including subset matching for lists.

FieldTypeRequiredDefaultDescription
typeResource IDyes—saturn:nbt
nbtNBT objectyes—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.

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

saturn:replaceable​

Checks whether the block state can be replaced.

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

saturn:slipperiness​

Compares the slipperiness of the block.

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

saturn:thundering​

Checks whether the level currently reports a thunderstorm.

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

saturn:water_loggable​

Checks whether the block implements LiquidBlockContainer.

FieldTypeRequiredDefaultDescription
typeResource IDyes—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.

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
conditionBlock conditionyes—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.

FieldTypeRequiredDefaultDescription
typeResource IDyes—saturn:offset
conditionBlock conditionyes—The condition to check.
xIntegerno0X coordinate, offset or vector component, depending on this page's behavior.
yIntegerno0Y coordinate, offset or vector component, depending on this page's behavior.
zIntegerno0Z 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.

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": []
}