Skip to main content
gg.grounds:scene-format owns the platform-neutral document model and canonical JSON codec. It exposes Adventure text components, but no Bukkit, Minestom, Jackson, or service-maps objects. scene-testkit is a test dependency only. Start with the content concepts if you need definitions of scenes, elements, assets, and bindings.

JVM dependency

build.gradle.kts
Resolve these artifacts from the groundsgg/library-scene GitHub Packages Maven repository with authorized package-read credentials. Use JVM 25; keep testkit off the runtime classpath.

Document and identity

A map has zero or one root scene.json. Absence means no scene. Hosts decide where to find the file; the format library does not scan directories. SceneId, AssetKey, ActionKey, and CatalogId use namespace:path/segments. Segments contain lowercase letters, digits, ., _, or -; empty, . and .. path segments are invalid. LocalId is one lowercase segment. Catalog versions are nonempty printable ASCII without whitespace.

Element types

Every element has id, nullable group, a transform, visible, and activation (AUTOMATIC or ALWAYS). Position uses world blocks; Euler rotation uses degrees; scale is positive on every axis. Numeric values must be finite. Angles normalize to the range from -180 inclusive to 180 exclusive. A composite part’s transform is local to its root. A targeted action uses ElementTarget(element, part); part = null selects the root. Parts are not independent top-level elements.

NPC fields

TrackNearest updates the generation-owned runtime transform used by rendering, labels, geometry, and effect targets. Reactivation resets it to the authored transform. Proximity’s separate enter/exit radii prevent repeated toggling near an edge. Bounce has either legacy bounceStrength (default 6.0) or optional bounceDistance in blocks. Both values range from 0 through 20. In the Kotlin model, a distance cannot coexist with a non-default legacy strength. In JSON, bounceDistance and bounceStrength are mutually exclusive keys: omit bounceStrength entirely when specifying distance, even if you would have set it to 6.0. Travel distance is approximate and depends on collisions in the world.

Trigger and condition reference

Bindings contain conditions, cooldownMillis, debounceMillis, and at least one action. Durations are nonnegative. Conditions can require HandCondition(MAIN/OFF), sneaking state, permission, or game mode (SURVIVAL, CREATIVE, ADVENTURE, SPECTATOR). A permission is printable ASCII without whitespace.

Action reference

Application argument variants are StringArgument, LongArgument, DecimalArgument, BooleanArgument, EnumArgument, and AssetArgument (JSON types string, long, decimal, boolean, enum, asset). The action catalog validates names, types, required parameters, enum values, and referenced assets. Arbitrary command execution and resource-pack operations are not scene actions.
A valid scene document can still be unsupported by a host. The current lobby rejects animations, viewer-scale actions, sound, and particle actions during preflight. Use the runtime capability boundary before authoring these features.

Decode, validate, and encode

SceneJson.decode(bytes) returns SceneDecodeResult.Success(scene) or Failure(problems). SceneJson.encode(scene) returns SceneEncodeResult.Success(bytes) or Failure(problems). SceneValidation.validateIntrinsic(scene) checks document invariants; validateCatalogs(scene, assets, actions) also checks exact references and capabilities. Use full catalog validation before accepting a scene. This function can be included in a JVM consumer with scene-format on its classpath:
SceneLoading.kt
Persist only SceneJson.encode output. A successful decode does not justify using a partially compatible scene or inventing a replacement catalog version.

Input limits

Failures include structured paths, codes, identities where available, and messages. Preserve those diagnostics in editor and derivation feedback. Never treat an invalid document as partially usable.

Implementation sources

Verified against the main-branch source on October 14, 2026.