Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-12-26 11:00:04 +01:00
Fixed equals() without hashCode().
Dieser Commit ist enthalten in:
Ursprung
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();
|
||||
}
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren