Change Vector hash codes (#456)

And add additional unit vectors where needed.
This commit is contained in:
Jesse Boyd
2019-04-04 23:36:19 +11:00
committed by wizjany
parent 35bb4deee9
commit 4de5487c51
9 changed files with 37 additions and 38 deletions

View File

@ -58,8 +58,10 @@ public enum Direction {
private final Vector3 direction;
private final int flags;
private final BlockVector3 blockPoint;
Direction(Vector3 vector, int flags) {
this.blockPoint = vector.toBlockPoint();
this.direction = vector.normalize();
this.flags = flags;
}
@ -121,7 +123,7 @@ public enum Direction {
* @return the vector
*/
public BlockVector3 toBlockVector() {
return direction.toBlockPoint();
return blockPoint;
}
/**