Checks if another object is equivalent. @param obj The other object @return whether the other object is equivalent
(Object obj)
| 79 | * @return whether the other object is equivalent |
| 80 | */ |
| 81 | @Override |
| 82 | public boolean equals(Object obj) { |
| 83 | if (!(obj instanceof BlockVector)) { |
| 84 | return false; |
| 85 | } |
| 86 | BlockVector other = (BlockVector) obj; |
| 87 | |
| 88 | return (int) other.getX() == (int) this.x && (int) other.getY() == (int) this.y && (int) other.getZ() == (int) this.z; |
| 89 | |
| 90 | } |
| 91 | |
| 92 | /** |
| 93 | * Returns a hash code for this vector. |