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

@ -4,19 +4,19 @@ This project is currently being rewritten. This document should be changed to in
## TODO ## TODO
The following things still have to be done. Possibly in this order. The following things still have to be done. Possibly in this order.
- [ ] Equipment - [X] Equipment
- [ ] Equipment locking - [ ] Equipment locking
- [ ] Can we scrape the MC wiki for a searchable dropdown list? https://minecraft.fandom.com/api.php ? - [ ] Can we scrape the MC wiki for a searchable dropdown list? https://minecraft.fandom.com/api.php ?
* Only items that are available in a given minecraft version should show up * Only items that are available in a given minecraft version should show up
- [ ] Colors for leather pieces - [ ] Colors for leather pieces
- [ ] Helmet: player name - [X] Helmet: player name
- [ ] Helmet: Image URL - [ ] Helmet: Image URL
- [ ] Helmet: https://minecraft-heads.com -> but use Minecraft-URL or Player name and skip the give code thing, that was confusing anyways. Have a help popup that explains this functionality with a few screenshots. - [ ] Helmet: https://minecraft-heads.com -> but use Minecraft-URL or Player name and skip the give code thing, that was confusing anyways. Have a help popup that explains this functionality with a few screenshots.
- [ ] Custom name with styling options - [X] Custom name with styling options
- [ ] Code generation - [X] Code generation
- [ ] Hide controls that are not relevant for the chosen minecraft version - [ ] Hide controls that are not relevant for the chosen minecraft version
- [ ] **Proper rotation conversion between Minecraft and ThreeJS** - [X] **Proper rotation conversion between Minecraft and ThreeJS**
- [ ] /summon or /give - [ ] /summon or /give
- [ ] Hint for command block - [ ] Hint for command block
- [ ] Design - [ ] Design
- [ ] Save and load - [ ] Save and load

View file

@ -292,7 +292,6 @@ class Armorstand {
// } // }
// Now the pose // Now the pose
// TODO Somewhere a conversion between Minecraft and ThreeJS rotations must take place.
let pose = [] let pose = []
if (!isXYZZero(this.body)) { if (!isXYZZero(this.body)) {
pose.push("Body:"+xyzToTextArray(this.body)) pose.push("Body:"+xyzToTextArray(this.body))
@ -307,13 +306,11 @@ class Armorstand {
pose.push("RightLeg:"+xyzToTextArray(this.legRight)) pose.push("RightLeg:"+xyzToTextArray(this.legRight))
} }
if (this.showArms){ if (this.showArms){
if (!isXYZZero(this.armLeft)) { // 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("LeftArm:"+xyzToTextArray(this.armLeft))
}
if (!isXYZZero(this.armRight)) {
pose.push("RightArm:"+xyzToTextArray(this.armRight)) pose.push("RightArm:"+xyzToTextArray(this.armRight))
} }
}
if (pose.length > 0) { if (pose.length > 0) {