From 58094c72c3eb39953b5136afed8d860a51582cf7 Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Tue, 10 Jan 2017 16:12:13 +1100 Subject: [PATCH] * --- .../src/main/java/com/sk89q/worldedit/BlockVector.java | 5 +++++ .../src/main/java/com/sk89q/worldedit/BlockVector2D.java | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/BlockVector.java b/worldedit-core/src/main/java/com/sk89q/worldedit/BlockVector.java index 2c3a05dd2..c444d80d1 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/BlockVector.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/BlockVector.java @@ -73,6 +73,11 @@ public class BlockVector extends Vector { super(x, y, z); } + @Override + public int hashCode() { + return ((int) x ^ ((int) z << 12)) ^ ((int) y << 24); + } + @Override public boolean equals(Object obj) { if (!(obj instanceof Vector)) { diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/BlockVector2D.java b/worldedit-core/src/main/java/com/sk89q/worldedit/BlockVector2D.java index a9a2ddb74..07d54430b 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/BlockVector2D.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/BlockVector2D.java @@ -69,6 +69,11 @@ public class BlockVector2D extends Vector2D { super(x, z); } + @Override + public int hashCode() { + return ((int) x << 16) ^ (int) z; + } + @Override public boolean equals(Object obj) { if (!(obj instanceof Vector2D)) {