1
0
Fork 0
mirror of https://github.com/haselkern/Minecraft-ArmorStand.git synced 2025-05-18 05:55:35 +00:00

Correct arm rotation

This commit is contained in:
Lars Martens 2021-08-20 22:15:36 +02:00
parent b5e6e7f18a
commit e196645bfb
2 changed files with 11 additions and 14 deletions

View file

@ -292,7 +292,6 @@ class Armorstand {
// }
// Now the pose
// TODO Somewhere a conversion between Minecraft and ThreeJS rotations must take place.
let pose = []
if (!isXYZZero(this.body)) {
pose.push("Body:"+xyzToTextArray(this.body))
@ -307,12 +306,10 @@ class Armorstand {
pose.push("RightLeg:"+xyzToTextArray(this.legRight))
}
if (this.showArms){
if (!isXYZZero(this.armLeft)) {
pose.push("LeftArm:"+xyzToTextArray(this.armLeft))
}
if (!isXYZZero(this.armRight)) {
pose.push("RightArm:"+xyzToTextArray(this.armRight))
}
// Arms will also be added if they are 0, because if we omit them, Minecraft
// will give the arms a default rotation that does not match our version.
pose.push("LeftArm:"+xyzToTextArray(this.armLeft))
pose.push("RightArm:"+xyzToTextArray(this.armRight))
}