This commit is contained in:
Jesse Boyd 2017-01-10 16:12:13 +11:00
parent ad7fdd19fb
commit 58094c72c3
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F
2 changed files with 10 additions and 0 deletions

View File

@ -73,6 +73,11 @@ public class BlockVector extends Vector {
super(x, y, z); super(x, y, z);
} }
@Override
public int hashCode() {
return ((int) x ^ ((int) z << 12)) ^ ((int) y << 24);
}
@Override @Override
public boolean equals(Object obj) { public boolean equals(Object obj) {
if (!(obj instanceof Vector)) { if (!(obj instanceof Vector)) {

View File

@ -69,6 +69,11 @@ public class BlockVector2D extends Vector2D {
super(x, z); super(x, z);
} }
@Override
public int hashCode() {
return ((int) x << 16) ^ (int) z;
}
@Override @Override
public boolean equals(Object obj) { public boolean equals(Object obj) {
if (!(obj instanceof Vector2D)) { if (!(obj instanceof Vector2D)) {