Skip to main content

Script callback

saturn:js

Calls a callback registered by KubeJS and passes the params argument.

Checks the relationship between the actor and the target. Swapping the two sides changes the meaning of some conditions.

JSON fields​

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.

JSON example​

{
"type": "saturn:js",
"id": "example_callback",
"params": {}
}

This is a value to embed in the corresponding field, not a standalone loadable data pack file. The example: references in the examples must be replaced with defined entries.

Java entry point​

com.iafenvoy.saturn.compat.kubejs.type.condition.JsBiEntityCondition. This page is based on the Codec in the current 26.1.2 source.