Skip to content

Commit c80a88c

Browse files
release(0.1.2): Calculation fix
1 parent a61c960 commit c80a88c

File tree

7 files changed

+39
-5
lines changed

7 files changed

+39
-5
lines changed

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.1.2] - 2024-05-01
9+
Calculation fix
10+
11+
### Fixed
12+
- xyz_to_quaternion now produces accurate values
13+
814
## [0.1.1] - 2023-07-29
915
Update to 1.20
1016

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ MCAnim is a Minecraft datapack library that aims to make it easy to run certain
1010
- **Rotation and quaternions**
1111
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 target` to `{x, y, z}` or `[x, y, z]`, where you give each property the desired value. Then run `function mcanim:api/maths/xyz_to_quaternion`. The result will be in `mcanim:api/maths/xyz_to_quaternion output`
1212

13-
The same feature exists the other way around, converting a quaternion to its x, y and z components.
13+
The same feature exists the other way around, converting a quaternion to its x, y and z components.
14+
**NOTE**: This feature is currently not working properly. The output values will be inaccurate, so it is suggested not to use this.
1415
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`
1516

1617
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](https://github.com/GearsDatapacks/mcanim/issues).
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
data modify storage mcanim:api/maths/xyz_to_quaternion output set value [0f,0f,0f,0f]
22

33
execute store result storage mcanim:api/maths/xyz_to_quaternion output[0] float 0.001 run scoreboard players get $x mcanim.maths.xyz_to_quaternion
4-
execute store result storage mcanim:api/maths/xyz_to_quaternion output[1] float 0.0001 run scoreboard players get $y mcanim.maths.xyz_to_quaternion
5-
execute store result storage mcanim:api/maths/xyz_to_quaternion output[2] float 0.0001 run scoreboard players get $z mcanim.maths.xyz_to_quaternion
4+
execute store result storage mcanim:api/maths/xyz_to_quaternion output[1] float 0.001 run scoreboard players get $y mcanim.maths.xyz_to_quaternion
5+
execute store result storage mcanim:api/maths/xyz_to_quaternion output[2] float 0.001 run scoreboard players get $z mcanim.maths.xyz_to_quaternion
66
execute store result storage mcanim:api/maths/xyz_to_quaternion output[3] float 0.0001 run scoreboard players get $w mcanim.maths.xyz_to_quaternion

data/mcanim/functions/version.mcfunction

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ data modify storage mcanim:version name set value "McAnim"
22

33
data modify storage mcanim:version major set value 0
44
data modify storage mcanim:version minor set value 1
5-
data modify storage mcanim:version patch set value 1
5+
data modify storage mcanim:version patch set value 2
66

77
tellraw @a {"nbt":"name","storage":"mcanim:version","extra":[{"text":" v","extra":[{"nbt":"major","storage":"mcanim:version","extra":[{"text":"."},{"nbt":"minor","storage":"mcanim:version"},{"text":".","extra":[{"nbt":"patch","storage":"mcanim:version"}]}]}]}]}

dpmconfig.json

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"include_files": [],
3+
"exclude_files": []
4+
}

pack.mcmeta

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"pack":{
3-
"pack_format": 16,
3+
"pack_format": 41,
4+
"supported_formats": {"min_inclusive": 15, "max_inclusive": 41},
45
"description": "A library for display entity animation in Minecraft"
56
}
67
}

project.json

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"name": "MCAnim",
3+
"slug": "mcanim",
4+
"version": "0.1.2",
5+
"game_versions": [
6+
"1.20",
7+
"1.20.1",
8+
"1.20.2",
9+
"1.20.3",
10+
"1.20.4",
11+
"1.20.5"
12+
],
13+
"summary": "A library for display entity animation in Minecraft",
14+
"license": "LGPL-3.0-or-later",
15+
"categories": ["library", "utility"],
16+
"additional_categories": [],
17+
"dependencies": {},
18+
"dev_dependencies": {},
19+
"optional_dependencies": {},
20+
"release_type": "release",
21+
"dpm_version": "0.1.2"
22+
}

0 commit comments

Comments
 (0)