Skip to content

Commit

Permalink
Fix some variants of trapdoors being rotated incorrectly. (#1793)
Browse files Browse the repository at this point in the history
Fixes Trapsdoor are broken #1792
  • Loading branch information
leMaik authored Nov 3, 2024
1 parent 37bcdf5 commit fc6a614
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -160,21 +160,23 @@ public OrientableTrapdoorModel(Texture texture, String half, String facing, bool
if (open && half.equals("top")) {
quads = Model.rotateX(Model.rotateY(quads, Math.toRadians(270)), Math.toRadians(180));
} else {
quads = Model.rotateY(quads, Math.toRadians(90));
quads = Model.rotateY(quads, Math.toRadians(-90));
}
} else if (facing.equals("north")) {
if (open && half.equals("top")) {
quads = Model.rotateX(Model.rotateY(quads, Math.toRadians(180)), Math.toRadians(180));
}
} else if (facing.equals("north") && open && half.equals("top")) {
quads = Model.rotateX(Model.rotateY(quads, Math.toRadians(180)), Math.toRadians(180));
} else if (facing.equals("south")) {
if (half.equals("top") && open) {
quads = Model.rotateX(quads, Math.toRadians(180));
} else {
quads = Model.rotateY(quads, Math.toRadians(180));
}
} else {
} else { // west
if (half.equals("top") && open) {
quads = Model.rotateY(Model.rotateX(quads, Math.toRadians(180)), Math.toRadians(90));
quads = Model.rotateY(Model.rotateX(quads, Math.toRadians(180)), Math.toRadians(-90));
} else {
quads = Model.rotateY(quads, Math.toRadians(270));
quads = Model.rotateY(quads, Math.toRadians(-270));
}
}

Expand Down

0 comments on commit fc6a614

Please sign in to comment.