Skip to content
Trplnr edited this page Jun 11, 2026 · 8 revisions

API

The Reef library provides API functions users can run to perform multiple actions on a screen.

If you want to control screens by intended means, use the Linked Remote. Most of the screen API functions are already ran by using the Linked Remote UI. This article is meant for people who want to purposely run then manually.

[!INFO] All function identifiers here will be a child of reef:api/ unless specified explicitly. Example: ~/screen/summon points to reef:api/screen/summon

~/register/slideshow

Registers a slideshow definition to the Reef registry.

Inputs

Macro argument identifier: The identifier to register this slideshow as.
Macro argument storage_path: The location of the slideshow data written as a storage identifier and NBT path.

Outputs

None

Throws if there is no slideshow data present in the given storage path.

Example

Register a slideshow named ns:my_awesome_presentation

function reef:api/register/slideshow {identifier: "ns:my_awesome_presentation", storage_path: "ns:my_storage path.to.my_awesome_presentation"}

~/register/page

Registers a page definition to the Reef registry.

Inputs

Macro argument identifier: The identifier to register this page as.
Macro argument storage_path: The location of the page data written as a storage identifier and NBT path.

Outputs

None

Throws if there is no page data present in the given storage path.

Example

Register a page named ns:credits

function reef:api/register/page {identifier: "ns:credits", storage_path: "ns:my_storage path.to.credits"}

~/register/transition

Registers a transition definition to the Reef registry.

Inputs

Macro argument identifier: The identifier to register this transition as.
Macro argument storage_path: The location of the transition data written as a storage identifier and NBT path.

Outputs

None

Throws if there is no transition data present in the given storage path.

Register a transition named ns:color_wipe

function reef:api/register/transition {identifier: "ns:color_wipe", storage_path: "ns:my_storage path.to.color_wipe"}

~/register/mini

Compiles a Reef Mini definition back to a normal Reef slideshow definition and registers it to the Reef registry.

Inputs

Macro argument identifier: The identifier to compile and register this mini definition as.
Macro argument storage_path: The location of the mini definition data written as a storage identifier and NBT path.

Outputs

Slideshow registered at <namespace>:<identifier> Page registered at <namespace>:<identifier>/<page_index>

Throws if there is no mini definition data present in the given storage path.

Compile and register a Reef Mini definition named ns:my_simple_slideshow

function reef:api/register/mini {identifier: "ns:my_simple_slideshow", storage_path: "ns:my_storage path.to.my_simple_slideshow"}

Clone this wiki locally