Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement 1.7.10 BW rendering #302

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix broken Direction.NORTH/SOUTH.rotation
ExE-Boss committed Apr 21, 2017

Verified

This commit was signed with the committer’s verified signature.
AdmiralCurtiss Admiral H. Curtiss
commit 18bdb5081407affc720cc850224492aa711fda93
5 changes: 4 additions & 1 deletion src/main/java/nova/core/util/Direction.java
Original file line number Diff line number Diff line change
@@ -65,8 +65,11 @@ public enum Direction {

if (vector.equals(Vector3D.ZERO)) {
this.rotation = Rotation.IDENTITY;
} else {
} else if (z == 0) {
this.rotation = new Rotation(Vector3DUtil.FORWARD, vector);
} else {
// For some odd reason, the rotation must be reversed when dealing with NORTH/SOUTH
this.rotation = new Rotation(Vector3DUtil.FORWARD, vector.scalarMultiply(-1));
}
}