mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-01-08 17:07:38 +00:00
Fixed equals() without hashCode().
This commit is contained in:
parent
478ce3f627
commit
b9c1dc6231
@ -58,4 +58,17 @@ public class BlockWorldVector2D extends WorldVector2D {
|
||||
&& (int) other.getZ() == (int) this.z;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int result = super.hashCode();
|
||||
long temp;
|
||||
result = 31 * result + world.hashCode();
|
||||
temp = Double.doubleToLongBits(x);
|
||||
result = 31 * result + (int) (temp ^ (temp >>> 32));
|
||||
temp = Double.doubleToLongBits(z);
|
||||
result = 31 * result + (int) (temp ^ (temp >>> 32));
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -212,4 +212,9 @@ public class Snapshot implements Comparable<Snapshot> {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return file.hashCode();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user