玩家步骤记录器(Player Steps Recorder)可保存步骤录制内容,供地图制作者进行录制。这些录制可以通过人偶实体(mannequin entities)进行播放,在需要精确控制玩家移动的地图或游戏中非常有用。
PSR 支持的功能包括:
- 移动
- 旋转
- 物品与盔甲
- 姿势(站立、潜行、爬行、游泳)
……你的数据包还可以通过动作追踪更多数据!
使用方法
如果你想要一个简短的命令列表,可以使用 /function psr:help,或者继续阅读下方更详细的说明。
录制
function psr:record {name:<name>,x:<x>,y:<y>,z:<z>}(也支持使用 ~ 和 ^)
每次录制都从一个原点开始生成,位于 x,y,z 处。
该原点有助于在你希望的任何位置回放你的录制内容。
function psr:stop_recording 停止录制
播放你的录制
function psr:play {name:<name>,x:<x>,y:<y>,z:<z>}(也支持使用 ~ 和 ^)
趣味提示:通过移动原点,你可以在播放过程中移动整个录制内容。
此外,你还可以同时播放同一录制的多个实例!
function:psr:stop_playback {name:<name>} 停止所有具有相同名称的正在播放的录制实例。注意:当播放同一录制的多个实例时要小心!
其他 / 文档
步数仅保存发生变化的值。例如,你静止不动的时间越长,保存的数据就越少。
每次录制都会像文件一样存储。如果你想通过其他数据包访问它,录制会保存在这个存储中:psr:recordings recordings。
录制
录制是存储在 SNBT 数据中的内容,可用于重现类似玩家的动作。
存储中的组件
| 组件 |
类型 |
描述 |
| name |
String |
录制的名称 |
| version |
String |
录制保存时的版本 |
| frames |
Int |
帧数。用于在没有任何更新时防止录制比正常情况更快地截断 |
| steps |
Array (包含 Steps) |
录制的步骤 |
步骤(Steps)
步骤是录制的一部分。它们用于追踪玩家属性,且仅保存发生变化的值。
存储中的组件
| 组件 |
类型 |
描述 |
| frame |
Int |
步骤所追踪的帧。由于步骤仅追踪变化的值,若使用索引值作为帧值,将导致回放出错 |
| Pos |
Array |
录制器所在的位置(相对于原点) |
| Rotation |
Array |
录制器的旋转角度(相对于原点) |
| mainhand |
Item NBT |
录制器在主手持有的物品 |
| offhand |
Item NBT |
录制器在副手持有的物品 |
| head |
Item NBT |
录制器头部佩戴的物品 |
| chest |
Item NBT |
录制器胸部佩戴的物品 |
| legs |
Item NBT |
录制器腿部佩戴的物品 |
| feet |
Item NBT |
录制器脚部佩戴的物品 |
| action |
String |
录制器触发的动作 |
动作(Actions)
动作是在录制期间可通过右键点击添加的项目,用于添加注释或为其他数据包用途轻松标记帧。
Player Steps Recorder saves step recordings that map creators can record. They can be played via mannequin entities and can be helpful in maps or games where you have to use accurate player movement.
The features that PSR can support are:
- Movement
- Rotation
- Items & Armor
- Pose (standing, sneaking, crawling, swimming)
... More can be tracked by your datapack via actions!
How To Use
If you want a short command list, you can use /function psr:help, or read below for a more in-detail explanation.
Recording
function psr:record {name:<name>,x:<x>,y:<y>,z:<z>} (also works with ~ and ^)
Each recording starts with spawning an origin point, at x,y,z.
The origin point helps by replaying your recording anywhere you'd like.
function psr:stop_recording stops the recording
Playing your recording
function psr:play {name:<name>,x:<x>,y:<y>,z:<z>} (also works with ~ and ^)
Fun Fact: By moving the origin point, you can move the whole recording while it's playing.
Also, you can play multiple instances of the same recording at the same time!
function:psr:stop_playback {name:<name>} stops all playing recording instances with the same name. Be careful when playing multiple instances of the same recording!
Other / Documentation
Steps can only save values that have changed. For example, the longer you stay still, the less data will be saved.
Each recording gets stored like a file. If you want to access it via other datapacks, recordings is saved in this storage: psr:recordings recordings.
Recordings
Recordings are SNBT data in a storage that can be used to recreate player-like movement.
Components in storage
| Component |
Type |
Description |
| name |
String |
Name of the recording |
| version |
String |
Version the recording was saved in |
| frames |
Int |
Number of frames. Used to keep the recording from cutting off faster than usual when not updating anything |
| steps |
Array (contains Steps) |
Steps of the recording |
Steps
Steps are parts of a Recording. They track player properties and only save changes.
Components in storages
| Component |
Type |
Description |
| frame |
Int |
The frame that the step tracks. Since steps only track changing values, using the index value as a frame value would break the playback |
| Pos |
Array |
Position that the recorder had (relative to the origin point) |
| Rotation |
Array |
Rotation that the recorder had (relative to the origin point) |
| mainhand |
Item NBT |
Item that the recorder had in their mainhand |
| offhand |
Item NBT |
Item that the recorder had in their offhand |
| head |
Item NBT |
Item that the recorder was wearing on their head |
| chest |
Item NBT |
Item that the recorder was wearing on their chest |
| legs |
Item NBT |
Item that the recorder was wearing on their legs |
| feet |
Item NBT |
Item that the recorder was wearing on their feet |
| action |
String |
Action that the recorder triggered |
Actions
Actions are items that can be right clicked while recording to add comments or mark frames easily for other datapack purposes.
评论 0
登录后参与评分
还没有评论,来抢沙发吧