
Cinematic Library 是一个数据包库(Datapack Library),提供系统以通过 Animated Java + Cameras 插件以简单的方式运行电影化演出。
使用此库需要具备中等程度的 Blockbench 操作能力和数据包知识。
用法
入门
你必须在 Blockbench 5.1.4+ 中下载以下插件:
Animated Java by SnaveSutit
Cameras by JannisX11
初步步骤
创建一个新的 Animated Java 蓝图(Blueprint)

自定义你的工具栏并添加“Add Camera”按钮

按下新按钮应在视口中创建一个新的摄像机。

你可以按照自己的喜好对摄像机进行动画制作。

现在,配置你的 Animated Java 蓝图并导出它!有关 Animated Java 的更多信息请查看 此处


在 Cinematic Library API 中你可以找到:
cinematic_library:api/cinematic/schedule
cinematic_library:api/cinematic/end
cinematic_library:api/cinematic/change_camera
对于第一个函数,你必须指定 args 才能使其生效。
Cinematic/Schedule
此函数用于调度一场电影化演出,这意味着当所有标记的区块加载完毕后它将立即运行(详见下文说明)。
你需要添加以下参数才能使此函数生效:
placement : string
XYZ 坐标,Animated Java Rig 将在此处被召唤,并且 extra_function 将在此处执行。
rotation : string
XY 旋转角度,Animated Java Rig 将按此角度旋转。
blueprint_name : string
你的 Animated Java 蓝图的名称,你可以从蓝图 ID(粉色下划线)推断出它。
blueprint_namespace : string
你的 Animated Java 蓝图的命名空间,你可以从蓝图 ID(蓝色下划线)推断出它。

blueprint_cameraname : string
你的 CAMERA 的名称,如果是 camera,则填入 "camera"。

player : string
完整的目标选择器,例如 @a 或 @a[gamemode=survival]。
marked_chunks : array
在此处指定你想要标记的区块,结构如下:
{
marked_chunks: [
{sx:22,sz:5,ex:22,ez:5}
]
}
sx 和 sz 指的是强制加载(forceload)的起始点(X 和 Z),ex 和 ez 指的是强制加载的结束点。
标记你的区块非常重要,因为你希望播放电影化演出的区块可能未被加载。
可选
extra_function : string
在 placement 处运行指定的函数。
ending_function : string
在 placement 处运行指定的函数。
ending_gamemode : string
这是匹配 player 选择器的玩家在游戏化演出结束时所处的游戏模式。默认为冒险模式(adventure),因此建议更改它。
最终命令应类似如下所示:
function cinematic_library:api/cinematic/schedule {args:{placement:"22 -60 -5",rotation:"0 0",blueprint_name:"test",blueprint_namespace:"cinematics",blueprint_cameraname:"camera",blueprint_animation:"cinematic",player:"@a",marked_chunks:[{sx:22,sz:5,ex:22,ez:5}]}}
Cinematic/Change Camera
此函数以简单的方式更改摄像机名称,只需填入新摄像机的名称即可实现切换。
new_cameraname : string
你希望玩家观看的新摄像机名称。
最终命令应类似如下所示:
function cinematic_library:api/cinematic/change_camera {new_cameraname:"camera2"}
Cinematic/End
此函数结束正在运行的电影化演出。
建议
这是该库的早期版本,它是全局性的,无法同时支持不同玩家的多个电影化演出,但这将在未来的更新中添加。
目前,它是为需要全局电影化演出的活动和地图设计的。
待添加(未来计划)
- 同时处理多个电影化演出
- 将名称从 "schedule" 更改为类似 "append" 的内容
- 使 Modrinth 页面更加美观且不那么简陋 lol

Cinematic Library is a Datapack Library that provides systems to run cinematics in a simple way, using Animated Java + Cameras Plugin.
You must have medium blockbench and datapack knowledge to use this Library.
Usage
Get Started
You must download the following plugins in your Blockbench 5.1.4+:
Animated Java by SnaveSutit
Cameras by JannisX11
First Steps
Create a new Animated Java blueprint

Customize your Toolbar and add the button 'Add Camera'

Pressing the new button should create a New Camera in your Viewport.

You can animate the camera however you like.

Now, configure your Animated Java Blueprint and export it! More information about Animated Java Here


In the Cinematic Library API you can find:
cinematic_library:api/cinematic/schedule
cinematic_library:api/cinematic/end
cinematic_library:api/cinematic/change_camera
For the first function, you must specify args to make it work.
Cinematic/Schedule
This function schedules a cinematic, which means it will run as soon as all the marked chunks are loaded (Explained further on)
You must add the arguments below to make this function work:
placement : string
Coordinates XYZ where the Animated Java Rig will be summoned and the extra_function will be executed.
rotation : string
Rotation XY as the Animated Java Rig will be rotated.
blueprint_name : string
Name of your Animated Java Blueprint, you can deduce it from the Blueprint ID (Pink Underline)
blueprint_namespace : string
Namespace of your Animated Java Blueprint, you can deduce it from the Blueprint ID (Blue Underline)

blueprint_cameraname : string
Name of your CAMERA, if it is camera, then put there "camera"

player : string
Entire target selector, an example is @a or @a[gamemode=survival]
marked_chunks : array
Here you must specify the chunks you want to mark, with this structure:
{
marked_chunks: [
{sx:22,sz:5,ex:22,ez:5}
]
}
sx and sz refers to the starting point (X and Z) of the forceload, ex and ez refers to the ending point of the foceload.
Marking your chunks is important, since the chunks where you want your cinematic may be unloaded.
Optional
extra_function : string
Runs the specified function at placement
ending_function : string
Runs the specified function at placement
ending_gamemode : string
Its the gamemode the players with the selector player will have when the cinematic ends. By default its adventure, so its great idea change it.
The ending command should look something like this:
function cinematic_library:api/cinematic/schedule {args:{placement:"22 -60 -5",rotation:"0 0",blueprint_name:"test",blueprint_namespace:"cinematics",blueprint_cameraname:"camera",blueprint_animation:"cinematic",player:"@a",marked_chunks:[{sx:22,sz:5,ex:22,ez:5}]}}
Cinematic/Change Camera
This function changes the camera name in an easy way, just put in there the name of your new camera and it will change.
new_cameraname : string
Name of the camera you want the players to spectate.
The ending command should look something like this:
function cinematic_library:api/cinematic/change_camera {new_cameraname:"camera2"}
Cinematic/End
This function ends the running cinematic.
Advice
This is an early version of this Library, it is global and can't support many cinematics for different players at the same time, but it will be added in a future update.
For now, its made for events and maps that need global cinematics.
To add (In the future)
- Handle multiple cinematics at the same time
- Change the name from "schedule" to something like "append"
- Make the Modrinth page fancier and less comfortable lol
评论 0
登录后参与评分
还没有评论,来抢沙发吧