mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-12 10:08:34 +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:
@ -84,13 +84,6 @@ public class BlockVector extends Vector {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return ((int) x << 19) ^
|
||||
((int) y << 12) ^
|
||||
(int) z;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockVector toBlockVector() {
|
||||
return this;
|
||||
|
Reference in New Issue
Block a user