截图
介绍
MCAnim – A Minecraft animation library by Gears
MCAnim is a Minecraft datapack library that aims to make it easy to run certain animations in your Minecraft world. It currently only supports display entity interpolation, but I plan on expanding it to include particle utility functions later.
Current features:
- Animation playing There are four ways to play animations:
generic,scale,translateandrotate. Generic allows you to apply many animations including modifying duration at the same time. Called by running first the commanddata modify storage mcanim:api/display_animation/generic animation set value {}, and replacing the{}with your data. This supports setting thedurationproperty, which decides the length of the animation, and any other property will be treated as an animation. Scale and translate do the same, but take x, y and z properties instead. Rotate converts the x, y and z values into a quaternion first. Then run the functionmcanim:api/display_animation/<function>as the entity you want to animate, to see it play.
- Rotation and quaternions Rotation also takes x, y and z components in degrees, but as Minecraft uses quaternions for rotation, it automatically converts the angles given into quaternions. This can be done manually by setting the
mcanim:api/maths/xyz_to_quaternion targetto{x, y, z}or[x, y, z], where you give each property the desired value. Then runfunction mcanim:api/maths/xyz_to_quaternion. The result will be inmcanim:api/maths/xyz_to_quaternion output
The same feature exists the other way around, converting a quaternion to its x, y and z components.
NOTE: This feature is currently not working properly. The output values will be inaccurate, so it is suggested not to use this.
Similar to the above, set mcanim:api/maths/quaternion_to_xyz target to [x, y, z, w] or {x, y, z, w} (w is ignored, so optional). Then run function mcanim:api/maths/quaternion_to_xyz. As expected, the resulting array: [x, y, z] is found in mcanim:api/maths/quaternion_to_xyz output
Those are all of the features currently implemented, if you would like to suggest more or report a bug, please create an issue on the github page.
常见问题
MCAnim 支持哪些 Minecraft 版本?
MCAnim 支持 Minecraft Java 版 1.20–1.21,共 7 个版本。下载时注意选择和你游戏版本一致的文件。
MCAnim 怎么安装?
新建世界时在「数据包」里把下载的 .zip 拖进去;已有的存档,把文件放进存档目录下的 datapacks 文件夹,进游戏输入 /reload 即可生效。服务器同样放在世界目录的 datapacks 里。
GearsDatapacks 的其他作品
查看全部 →
Lucky blocks
Adds a variety of lucky blocks into Minecraft!
Moxlib
A library of many helpful functions, tags and predicates, to improve the datapack developer's day.
Regex Library Datapack
A datapack library that provides a way to match substrings using regular expressions.
GolemScript
A programming language in a vanilla datapack.
评论
登录后评论和评分