Basic format (WIP) - thewinnt/Cutscene-API GitHub Wiki
The very basics of the mod.
To start with,
- you need a datapack
- your cutscenes will go into the
data/(namespace)/cutscenes
folder as json files.
A cutscene can specify these fields:
length
[number] (required) - the length of the cutscene in game tickspath
androtation
[list of path segments] - specify the path and rotation of your camera using path segmentsstart_transition
andend_transition
[transitions] - specify the transitions when entering and leaving a cutscenedisable_actions
[boolean or object] - allow you to disable certain actions or all of them at once (see here for an incomplete list)effects
[list of effects] - a list of on-screen effects for your cutsceneblock_movement
andblock_rotation
[booleans] - allow blocking the player's movement and rotation when the camera path or rotation is not specifiedhide_hand
andhide_block_outline
[booleans] - should be self-explanatoryrotation_handler
[object] - how the player's mouse movement is handled during the cutscene
You can see some examples of cutscenes in the Example Cutscenes datapack in the repository. Some good ones IMO are transition_test, rotation_handler_test and seconds_test
Effects are well-explained in these release notes.
To play a cutscene, you can run the /cutscene start @s <id>
command, where id
is the name of your cutscene. You can then stop it using /cutscene stop
.