mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-16 03:24:03 +00:00
Vector and BlockVector should use the same hashCode
For example, the getChunks method returns a Set<Vector2D> which is actually comprised of BlockVector2D, so using set.contains(some vector) will always return false. There's unlikely to be multiple entities on the same block, or above y=256, so using the int coords is better.
This commit is contained in:
@@ -80,12 +80,6 @@ public class BlockVector2D extends Vector2D {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return (Integer.valueOf((int) x).hashCode() >> 13) ^
|
||||
Integer.valueOf((int) z).hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockVector2D toBlockVector2D() {
|
||||
return this;
|
||||
|
Reference in New Issue
Block a user