Script file
Scripts are JSON files that contain key frames that can modify features of in-game elements.
{
"namespace": "example:example",
"load": "plugin",
"trigger": {
"type": "plugin"
},
"key_frames": [
{
"tick": 0,
"actions": []
}
]
}
namespace: String
The name in namespaced key format by which this script will be callable by commands and the server plugin.
E.g. dansemacabre:hoofdshow
load: String
Defines when the script is loaded into cache.
plugin: Loads the script on server start.
trigger: Trigger
Defines how the script is started.
type: Trigger type.<type-specific>: Additional fields depending on the trigger type.
plugin: Trigger type
The script should be triggered from inside the server plugin code.
- Additional fields:
- None
key_frames: Json array
A list of key frames. (See below)
Key frame
tick: Integer
The in-game tick at which this keyframe should start taking effect.
actions: Json array
A list of actions that should be triggered at the specified in-game tick. (See below)
Action
type: Action type.easing: Easing type.value: Additional fields depending on the action type.targets: List of namespaced key names of scriptable elements that should be affected by this action.
item_color: IndexedColor
Changes the color of an element at the specified index.
Additional fields:
index: Integercolor: String HEX code
{
"type": "item_color",
"easing": "sine_in",
"value": {
"index": 0,
"color": "#ffffff"
},
"targets": [
"example:example_element"
]
}
For models, index corresponds to the tint_index of Minecraft models!
light_level: Integer
Changes the brightness of an element to the specified light level.
{
"type": "light_level",
"easing": "linear",
"value": 10,
"targets": [
"example:example_element"
]
}
Minimum of 0 and maximum of 15!
opacity: Integer
Changes the opacity of an element to the specified value.
{
"type": "opacity",
"easing": "cubic_in",
"value": 180,
"targets": [
"example:example_element"
]
}
Minimum of 0 and maximum of 255!
animation: String
Starts playing specified animation on an element.
{
"type": "animation",
"easing": "none",
"value": "action_turn",
"targets": [
"example:example_rig"
]
}
Easing type for this action type should always be none. Currently only available for Animated Java rigs.
function: String
Triggers a function on an element.
{
"type": "function",
"easing": "none",
"value": "function_name",
"targets": [
"example:example_element"
]
}
Easing type for this action type should always be none.
Easing types
Easing determines how the transition of the action progresses.
nonelinearquad_in,quad_out,quad_in_outcubic_in,cubic_out,cubic_in_outquartic_in,quartic_out,quartic_in_outquintic_in,quintic_out,quintic_in_outsine_in,sine_out,sine_in_outexpo_in,expo_out,expo_in_outcirc_in,circ_out,circ_in_outelastic_in,elastic_out,elastic_in_outback_in,back_out,back_in_outbounce_in,bounce_out,bounce_in_out