-
Notifications
You must be signed in to change notification settings - Fork 0
definition_schemas
Trplnr edited this page Jun 12, 2026
·
11 revisions
This article describes the schemas for making a slideshow.
All schemas here will use TypeScript as the pseudocode language.
A string that follows https://minecraft.wiki/w/Identifier#Legal_characters
// https://minecraft.wiki/w/Identifier#Legal_characters
type Identifier = string"namespace:path"
"my.project:path/to/thing"A list of pages.
/** Identifier pointing to pages. */
type Slideshow = Identifier[];[
"trplnr:summit_slideshow/intro",
"trplnr:summit_slideshow/what_is_reef",
"trplnr:summit_slideshow/outro",
"trplnr:summit_slideshow/credits"
]A single page that contains elements and other metadata.
interface Page {
/**
* List of commands to run when this page loads.
* Runs as and at the screen.
* ⚠ This feature hasn't been released yet.
*/
commands?: string[];
/** Transition to play when transitioning to this page. */
transition?: Identifier;
/** A list of Element groups to display sequentially when reef:api/screen/next is ran. */
sequence: Element[][];
}{
"commands": ["playsound minecraft:entity.cat.ambient master @a ~ ~ ~ 2 1 2"],
"transition": "trplnr:color_wipe",
"sequence": [
[{
"type": "graphic",
...
}],
[
{
"type": "text",
...
},
{
"type": "animated_element",
...
}
]
]
}The main building block of pages.
/** Can either be a graphic element, a text element, or an animated graphic element based on the `type` field. */
type Element = GraphicElement | TextElement | AnimatedGraphicElement;
interface ElementBase {
/**
* List of commands to run when this page loads.
* Runs as and at the element.
* ⚠ This feature hasn't been released yet.
*/
commands?: string[];
/** Entity position of the element */
pos?: Vector3;
/** Decomposed transformation form (See https://minecraft.wiki/w/Display#Entity_data "Tags common to all display entities"). */
translation?: Transformation.translation;
scale?: Transformation.scale;
left_rotation?: Transformation.left_rotation;
right_rotation?: Transformation.right_rotation;
/**
* Optional map of additional (non-default) data components (See https://minecraft.wiki/w/Data_component_format).
* ⚠ It is not advised to change the `minecraft:item_model` and the `minecraft:custom_model_data` component unless you know what you are doing!
*/
components?: ItemStack.components;
}
interface GraphicElement {
/** An element that displays a static or animated texture */
type: "graphic";
/** Identifier pointing to an items model definition (See https://minecraft.wiki/w/Items_model_definition). */
model: Identifier;
}
interface TextElement {
/** An element that displays a text component */
type: "text";
/** See https://minecraft.wiki/w/Display#Text_Displays */
text: TextComponent;
background?: int;
alignment?: "left" | "center" | "right";
line_width?: int;
}
interface AnimatedGraphicElement {
/** An element that displays an animated texture and holds the last frame. */
type: "animated_graphic";
/** Identifier pointing to an items model definition (See https://minecraft.wiki/w/Items_model_definition). */
model: Identifier;
/** Frame count of the animated texture. */
frames: int;
}{
"type": "graphic",
"model": "trplnr:my_slideshow/background_image",
"pos": [5, 5, 5],
"scale": [2, 1, 2]
}{
"type": "text",
"text": ["", {"text": "Welcome to my very cool presentation!"}, "\n", {"player": "Trplnr"}],
"background": 65280,
"alignment": "left",
"line_width": 500,
"pos": [10, 5, 10]
}{
"type": "animated_graphic",
"model": "trplnr:my_slideshow/walking_moose",
"frames": 35
}{
"type": "graphic",
"model": "trplnr:my_evil_slideshow/haha_die_everyone_image",
"commands": ["kill @a"],
}A Reef Mini definition.
interface ReefMini {
/** Transition to play when transitioning to this page. */
transition?: Identifier;
/** Identifier pointing to an items model definition with a custom model data range dispatch (See https://minecraft.wiki/w/Items_model_definition). */
model: Identifier;
page_count: int;
}{
"transition": "trplnr:color_wipe",
"model": "trplnr:my_mini_slideshow",
"page_count": 10
}