Skip to main content

Host Objects and public facades

QuestScript provides scripts with global Host Objects. The primary objects are:

  • world — players, dimensions, events, Script Storage, and Script-Owned Resources;
  • system — deferred work, intervals, jobs, and the current game tick.

The primary API uses public facades such as World, Dimension, Block, Entity, and Player. The API declarations list their exact methods and values.

Method arguments pass through the same language-aware validation before Minecraft is accessed. JavaScript retains Bedrock-shaped camelCase calls and plain options objects, such as dimension.getEntities({ minDistance: 4 }). Python uses snake_case, explicit parameters, and flattens one top-level options DTO into keyword-only arguments, such as dimension.get_entities(min_distance=4). Nested DTOs, vectors, loadouts, and user mappings remain structured and are not recursively flattened.

Python distinguishes an omitted keyword from an explicit None: None has JavaScript null semantics, while omission selects the declared default or produces a required-field error. Returned Host Object vectors and facades can be passed to later parameters in both languages. An invalid argument shape throws before world state is changed.

Statically declared facade and DTO properties follow the same rule: JavaScript reads event.brokenBlockPermutation.typeId, while Python reads event.broken_block_permutation.type_id. Keys in ordinary mappings, Script Storage, tags, and Script Exports remain literal and are not automatically renamed.

The current alpha runtime uses a proxy-only Graal sandbox that denies direct Host/Polyglot access, Java-class lookup, processes, environment access, sockets, and unrestricted IO. A Script reaches the server only through QuestScript Host Objects and approved values. The deprecated minecraft global remains available, capability grants for commands and mutations are not yet enforced, and the complete native-value reachability audit remains separate work. Load only reviewed Scripts and account for the security limitations.

See the API reference for the complete list of available types and methods.