-
Notifications
You must be signed in to change notification settings - Fork 0
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.
Note
All function identifiers here will be a child of reef:api/ unless specified explicitly.
Example: ~/screen/summon points to reef:api/screen/summon
Registers a slideshow definition to the Reef registry.
Macro argument
identifier: The identifier to register this slideshow as.
Macro argumentstorage_path: The location of the slideshow data written as a storage identifier and NBT path.
None
Throws if there is no slideshow data present in the given storage path.
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"}Registers a page definition to the Reef registry.
Macro argument
identifier: The identifier to register this page as.
Macro argumentstorage_path: The location of the page data written as a storage identifier and NBT path.
None
Throws if there is no page data present in the given storage path.
Register a page named ns:credits
function reef:api/register/page {identifier: "ns:credits", storage_path: "ns:my_storage path.to.credits"}Registers a transition definition to the Reef registry.
Macro argument
identifier: The identifier to register this transition as.
Macro argumentstorage_path: The location of the transition data written as a storage identifier and NBT path.
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"}Compiles a Reef Mini definition back to a normal Reef slideshow definition and registers it to the Reef registry.
Macro argument
identifier: The identifier to compile and register this mini definition as.
Macro argumentstorage_path: The location of the mini definition data written as a storage identifier and NBT path.
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"}