Block action
Acts on the world and block position given by the context. It is not a standalone data pack file; embed it in a field that requires a BlockAction.
Types
saturn:bonemeal
Attempts to apply the bonemeal effect to the block in the context.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:bonemeal |
effect | Boolean | no | true | Status effect ID. |
Example
{
"type": "saturn:bonemeal"
}
saturn:break_block
Breaks the block at the context position and optionally controls whether items drop.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:break_block |
drop | Boolean | no | true | Whether block drops are generated. |
Example
{
"type": "saturn:break_block"
}
saturn:execute_command
Executes a vanilla command with gamemaster permission (level 2).
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:execute_command |
command | String | yes | — | Vanilla command; a leading / is optional. |
Example
{
"type": "saturn:execute_command",
"command": "setblock ~ ~1 ~ minecraft:stone"
}
Server-only, with command feedback suppressed. Entity actions use the entity as @s at the activation position; block actions use the block centre and have no @s entity.
saturn:explode
Creates an explosion at the context position, with configurable destruction behavior and protection conditions.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:explode |
power | Number | yes | — | Explosion power. |
interaction | Enum string | no | "mob" | How the explosion interacts with blocks. Available values: none, block, mob, tnt, trigger. |
indestructible | Block condition | no | omitted | Condition for blocks that are protected from this explosion. |
create_fire | Boolean | no | false | Whether the explosion tries to create fire. |
Example
{
"type": "saturn:explode",
"power": 1
}
saturn:light_up
Tries to set the context position on fire.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:light_up |
Example
{
"type": "saturn:light_up"
}
saturn:modify_block_state
Cycles or sets a block property, or adds to an integer property. Server-only; invalid values leave the state unchanged.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:modify_block_state |
property | String | yes | — | Block state property name. |
cycle | Boolean | no | false | When true, cycle to the next allowed value; takes precedence over other modification fields. |
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. |
change | Number provider | no | omitted | Operand for an integer property, truncated toward zero after evaluation. |
operation | Enum string | no | "add" | add adjusts, or set replaces, an integer property. |
Example
{
"type": "saturn:modify_block_state",
"property": "age",
"change": 1
}
cycle takes precedence; otherwise the property type selects value, enum or change. A value outside the property’s allowed set leaves it unchanged instead of clamping.
saturn:region_apply
Applies an action to matching targets in a region, preserving the parent context.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:region_apply |
radius | Number provider | no | 16 | Radius in blocks. |
shape | Enum string | no | "cube" | cube uses maximum axis distance; star uses Manhattan distance; sphere uses Euclidean distance. |
block_action | Block actions | yes | — | Nested action of the declared context type. |
block_condition | Block conditions | no | saturn:always | Filter condition of the declared context type. |
Example
{
"type": "saturn:region_apply",
"radius": 2,
"block_condition": {
"type": "saturn:air"
},
"block_action": {
"type": "saturn:no_op"
}
}
Distances are relative to the query centre. Entity queries use entity positions and exclude spectators. Block radii are floored to a non-negative integer and positions are enumerated lazily. Negative or non-finite radii yield an empty region.
The centre is the target block; nested actions keep the original face direction.
saturn:relative_offset
Moves the block action along the context face by the evaluated distance.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:relative_offset |
action | Block actions | yes | — | Nested action of the declared context type. |
distance | Number provider | yes | — | Block offset along the context face, truncated toward zero; may be negative. |
Example
{
"type": "saturn:relative_offset",
"distance": 1,
"action": {
"type": "saturn:no_op"
}
}
Does nothing if the context has no face direction. The shifted action keeps the face, formula and extension data.
saturn:schedule_tick
Schedules a delayed tick for the block at the context position.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:schedule_tick |
delay | Integer | yes | — | Delay in ticks. |
Example
{
"type": "saturn:schedule_tick",
"delay": 1
}
saturn:send_message
Sends a text component to players that match the recipient condition, optionally to the chat bar or the action bar.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:send_message |
message | Text component | yes | — | Text component sent to players; strings are treated as translation keys. |
channel | Enum string | no | "chat" | Message channel; see the enum notes below for available values. Available values: chat, action_bar. |
target | Enum string | no | "self" | Action target, target ID or target selection; see the type description on this page. Available values: self, other, all. |
recipients | Entity condition | no | {"type":"saturn:always"} | Entity condition checked for each candidate recipient player. |
channel accepts chat and action_bar. target=self selects the actor / item holder, other selects the bi-entity target, and all selects the players in the current server dimension. Block actions have no recipients of their own, so they usually use all. recipients is checked separately for every candidate player.
Example
{
"type": "saturn:send_message",
"message": {
"text": "Operation complete"
}
}
saturn:set_block
Sets the current position to the given block.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:set_block |
block | Resource ID | yes | — | Block ID or block argument. |
Example
{
"type": "saturn:set_block",
"block": "minecraft:stone"
}
saturn:spawn_entity
Spawns an entity at the position given by the context or at the specified coordinates.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:spawn_entity |
entity_type | Resource ID | yes | — | Entity type ID. |
tag | Object | no | omitted | Registry tag, or the NBT data declared on this page. |
entity_action | Entity action | no | {"type":"saturn:no_op"} | Entity action run on the ability holder or the context entity. |
Example
{
"type": "saturn:spawn_entity",
"entity_type": "minecraft:arrow"
}
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:chance
Decides whether the action fires based on a given chance.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:chance |
action | Block action | yes | — | The sub-action to run; its kind must match what this field expects. |
chance | Number | yes | — | Hit chance; 0 never fires, 1 always fires. Codec range: 0.0F, 1.0F. |
fail_action | Block action | no | {"type":"saturn:no_op"} | Action to run when the chance check fails. |
Example
{
"type": "saturn:chance",
"action": {
"type": "saturn:no_op"
},
"chance": 1
}
saturn:choice
Picks one action at random by weight and runs it.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:choice |
actions | Array of weighted entries (value, weight) | yes | — | Array of sub-actions; sequential kinds run in order, weighted kinds pick by value and weight. |
Each entry contains value and weight; see Weighted entries. Negative weights are treated as 0; when the total weight is 0, an entry is picked uniformly from the non-empty action list. An empty action list does nothing.
Example
{
"type": "saturn:choice",
"actions": [
{
"value": {
"type": "saturn:no_op"
},
"weight": 1
}
]
}
saturn:for_range
Executes an action a fixed number of times, up to the configured iteration limit.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:for_range |
range | Number provider | yes | — | Repetition count, truncated toward zero; negative values execute nothing. |
action | Block actions | yes | — | Nested action of the declared context type. |
max_iterations | Integer | no | 1024 | Maximum iterations per invocation; must be at least 1. |
Example
{
"type": "saturn:for_range",
"range": 3,
"action": {
"type": "saturn:no_op"
}
}
The count is evaluated once before the loop and capped at max_iterations.
saturn:if_else
Runs if_action when the condition holds, otherwise runs else_action.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:if_else |
condition | Block condition | yes | — | The condition to check. |
if_action | Block action | yes | — | Action to run when the condition holds. |
else_action | Block action | no | {"type":"saturn:no_op"} | Action to run when the condition does not hold. |
Example
{
"type": "saturn:if_else",
"condition": {
"type": "saturn:always"
},
"if_action": {
"type": "saturn:no_op"
}
}
saturn:if_else_list
Executes the first branch whose condition matches, then stops checking branches.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:if_else_list |
actions | Branch array | yes | — | Ordered branches; each entry contains condition and action. |
Each actions entry:
| Field | Type | Required | Description |
|---|---|---|---|
condition | BlockCondition | yes | Condition selecting this branch. |
action | BlockAction | yes | Action to run; later branches are not checked. |
Example
{
"type": "saturn:if_else_list",
"actions": [
{
"condition": {
"type": "saturn:always"
},
"action": {
"type": "saturn:no_op"
}
}
]
}
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:no_op
Does nothing; usable as a placeholder action value.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:no_op |
Example
{
"type": "saturn:no_op"
}
saturn:offset
Moves the block context by the given offset before checking or running the child.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:offset |
action | Block action | yes | — | Child action to run; its kind must match what the current field requires. |
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",
"action": {
"type": "saturn:no_op"
}
}
saturn:sequence
Runs several actions of the same kind in array order.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:sequence |
actions | Array of actions of the same kind | yes | — | Array of sub-actions; sequential kinds run in order, weighted kinds pick by value and weight. |
Example
{
"type": "saturn:sequence",
"actions": []
}
saturn:side
Executes the nested action only on the selected logical side.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:side |
action | Block actions | yes | — | Nested action of the declared context type. |
side | Enum string | yes | — | Logical side: client or server. |
Example
{
"type": "saturn:side",
"side": "server",
"action": {
"type": "saturn:no_op"
}
}
Uses the level’s logical side. An integrated server is server even inside a client process. This action does not send a packet or execute remotely.
saturn:while
Repeats an action while its condition matches, with a configurable iteration limit.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | Resource ID | yes | — | saturn:while |
condition | Block conditions | yes | — | Filter condition of the declared context type. |
action | Block actions | yes | — | Nested action of the declared context type. |
max_iterations | Integer | no | 1024 | Maximum iterations per invocation; must be at least 1. |
Example
{
"type": "saturn:while",
"max_iterations": 64,
"condition": {
"type": "saturn:never"
},
"action": {
"type": "saturn:no_op"
}
}
The condition is checked before every iteration. If it is still true after max_iterations, the action throws and stops; actions already executed are not rolled back.