Skip to content

Commit

Permalink
Fix a few rendering defects with entities
Browse files Browse the repository at this point in the history
This corrects the broken UVs on -X/+X faces and rotations
being applied in the wrong order.
  • Loading branch information
jellysquid3 committed Dec 3, 2023
1 parent e228d59 commit 43e53c4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,8 @@ private static void prepareVertices(MatrixStack.Entry matrices, ModelCuboid cubo
buildVertexTexCoord(VERTEX_TEXTURES[FACE_POS_Y], cuboid.u2, cuboid.v1, cuboid.u3, cuboid.v0);
buildVertexTexCoord(VERTEX_TEXTURES[FACE_NEG_Z], cuboid.u1, cuboid.v1, cuboid.u2, cuboid.v2);
buildVertexTexCoord(VERTEX_TEXTURES[FACE_POS_Z], cuboid.u4, cuboid.v1, cuboid.u5, cuboid.v2);
buildVertexTexCoord(VERTEX_TEXTURES[FACE_POS_X], cuboid.u2, cuboid.v1, cuboid.u4, cuboid.v2);
buildVertexTexCoord(VERTEX_TEXTURES[FACE_NEG_X], cuboid.u0, cuboid.v1, cuboid.u1, cuboid.v2);
buildVertexTexCoord(VERTEX_TEXTURES[FACE_NEG_X], cuboid.u2, cuboid.v1, cuboid.u4, cuboid.v2);
buildVertexTexCoord(VERTEX_TEXTURES[FACE_POS_X], cuboid.u0, cuboid.v1, cuboid.u1, cuboid.v2);
}

private static void prepareNormals(MatrixStack.Entry matrices) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public void rotate(MatrixStack matrixStack) {
}

if (this.pitch != 0.0F || this.yaw != 0.0F || this.roll != 0.0F) {
MatrixHelper.rotateZYX(matrixStack.peek(), this.pitch, this.yaw, this.roll);
MatrixHelper.rotateZYX(matrixStack.peek(), this.roll, this.yaw, this.pitch);
}

if (this.xScale != 1.0F || this.yScale != 1.0F || this.zScale != 1.0F) {
Expand Down

0 comments on commit 43e53c4

Please sign in to comment.