
MCAnim
A library for display entity animation in Minecraft
- Загрузки
- 525
- Подписчики
- 5
- Обновлён
- 15 июля 2024 г.
- Лицензия
- LGPL-3.0-or-later
Опубликован 11 февраля 2023 г.
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 themcanim: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 outputThe 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, setmcanim:api/maths/quaternion_to_xyz targetto[x, y, z, w]or{x, y, z, w}(w is ignored, so optional). Then runfunction mcanim:api/maths/quaternion_to_xyz. As expected, the resulting array:[x, y, z]is found inmcanim: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.
Ченджлог
0.1.3Релиз1.21 · 15 июля 2024 г.
[0.1.3] - 2024-07-15
Update to 1.21
Changed
- The datapack now requires 1.21
0.1.2Релиз1.20.3, 1.20.4, 1.20.5 · 2 мая 2024 г.
[0.1.2] - 2024-05-01
Calculation fix
Fixed
- xyz_to_quaternion now produces accurate values
0.1.1Релиз1.20.1 · 29 июля 2023 г.
[0.1.1] - 2023-07-29
Update to 1.20
Added
- Quaternion to xyz conversion
Changed
- Now allows for {x,y,z} or [x,y,z] in conversion functions
Fixed
- Updated fields that were changed in 1.20
0.1.0Релиз23w06a · 11 февраля 2023 г.
[0.1.0] - 2023-02-11
Initial release!
Added
- Generic, translate, scale and rotate animation functions
- x,y,z to quaternion conversion
Комментарии
Загружаем…