Skip to content

Commit 30f0ed6

Browse files
SnaveSutitgitbutler-client
authored andcommitted
🐛 Fix item display translation issue
1 parent 3989c2f commit 30f0ed6

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/systems/minecraft/itemModelManager.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,18 +96,18 @@ export function applyModelDisplayTransform(
9696
const rot = display.rotation.map((n: number) => (n * Math.PI) / 180)
9797
matrix.makeRotationFromEuler(Reusable.euler1.set(-rot[0], -rot[1], rot[2]))
9898
}
99+
if (display.scale) {
100+
matrix.scale(Reusable.vec2.set(...display.scale))
101+
}
99102
if (display.translation) {
100103
matrix.setPosition(
101104
Reusable.vec1.set(
102105
display.translation[0],
103106
display.translation[1],
104-
display.translation[2]
107+
-display.translation[2]
105108
)
106109
)
107110
}
108-
if (display.scale) {
109-
matrix.scale(Reusable.vec2.set(...display.scale))
110-
}
111111

112112
itemModel.boundingBox.applyMatrix4(matrix)
113113
itemModel.outline.geometry.applyMatrix4(matrix)

0 commit comments

Comments
 (0)