-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b2f2802
commit f42b3d8
Showing
2 changed files
with
18 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,27 @@ | ||
#rot_aj:check_bones | ||
execute unless data entity @s transformation{left_rotation:[0.0f,0.0f,0.0f,0.0f]} run function rot_aj:set_bones | ||
data modify storage math:io cmp set from entity @s transformation | ||
execute unless data storage math:io cmp{left_rotation:[0.0f,0.0f,0.0f,0.0f]} run function rot_aj:set_bones | ||
|
||
scoreboard players operation qrot_x int = @s qrot_x | ||
scoreboard players operation qrot_y int = @s qrot_y | ||
scoreboard players operation qrot_z int = @s qrot_z | ||
scoreboard players operation qrot_w int = @s qrot_w | ||
execute as @e[tag=math_marker,limit=1] run function math:qrot/_mult | ||
execute store result entity @s transformation.left_rotation[0] float 0.0001 run scoreboard players get qrot_x int | ||
execute store result entity @s transformation.left_rotation[1] float 0.0001 run scoreboard players get qrot_y int | ||
execute store result entity @s transformation.left_rotation[2] float 0.0001 run scoreboard players get qrot_z int | ||
execute store result entity @s transformation.left_rotation[3] float 0.0001 run scoreboard players get qrot_w int | ||
execute store result storage math:io cmp.left_rotation[0] float 0.0001 run scoreboard players get qrot_x int | ||
execute store result storage math:io cmp.left_rotation[1] float 0.0001 run scoreboard players get qrot_y int | ||
execute store result storage math:io cmp.left_rotation[2] float 0.0001 run scoreboard players get qrot_z int | ||
execute store result storage math:io cmp.left_rotation[3] float 0.0001 run scoreboard players get qrot_w int | ||
scoreboard players operation u int = @s x | ||
scoreboard players operation v int = @s y | ||
scoreboard players operation w int = @s z | ||
function math:uvw/_tofvec | ||
execute store result entity @s transformation.translation[0] float 0.0001 run scoreboard players get 3vec_x int | ||
execute store result entity @s transformation.translation[1] float 0.0001 run scoreboard players get 3vec_y int | ||
execute store result entity @s transformation.translation[2] float 0.0001 run scoreboard players get 3vec_z int | ||
execute store result storage math:io cmp.translation[0] float 0.0001 run scoreboard players get 3vec_x int | ||
execute store result storage math:io cmp.translation[1] float 0.0001 run scoreboard players get 3vec_y int | ||
execute store result storage math:io cmp.translation[2] float 0.0001 run scoreboard players get 3vec_z int | ||
|
||
data modify entity @s interpolation_duration set value 1 | ||
data modify storage math:io cmp set from storage math:io stemp[0] | ||
execute store success score temp int run data modify storage math:io cmp set from entity @s transformation | ||
data modify entity @s transformation set from storage math:io cmp | ||
execute store success score temp int run data modify storage math:io cmp set from storage math:io stemp[0] | ||
execute if score temp int matches 1 run data modify entity @s start_interpolation set value 0 | ||
|
||
data remove storage math:io stemp[0] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
#rot_aj:set_bones | ||
execute store result score @s qrot_x run data get entity @s transformation.left_rotation[0] 10000 | ||
execute store result score @s qrot_y run data get entity @s transformation.left_rotation[1] 10000 | ||
execute store result score @s qrot_z run data get entity @s transformation.left_rotation[2] 10000 | ||
execute store result score @s qrot_w run data get entity @s transformation.left_rotation[3] 10000 | ||
execute store result score @s x run data get entity @s transformation.translation[0] 10000 | ||
execute store result score @s y run data get entity @s transformation.translation[1] 10000 | ||
execute store result score @s z run data get entity @s transformation.translation[2] 10000 | ||
execute store result score @s qrot_x run data get storage math:io cmp.left_rotation[0] 10000 | ||
execute store result score @s qrot_y run data get storage math:io cmp.left_rotation[1] 10000 | ||
execute store result score @s qrot_z run data get storage math:io cmp.left_rotation[2] 10000 | ||
execute store result score @s qrot_w run data get storage math:io cmp.left_rotation[3] 10000 | ||
execute store result score @s x run data get storage math:io cmp.translation[0] 10000 | ||
execute store result score @s y run data get storage math:io cmp.translation[1] 10000 | ||
execute store result score @s z run data get storage math:io cmp.translation[2] 10000 |