summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorErik Broes <erikbroes@grum.nl>2011-10-20 23:20:26 +0200
committerErik Broes <erikbroes@grum.nl>2011-10-20 23:20:26 +0200
commit2f1513cae0bc662b4b5db595574f62e82fb640e1 (patch)
treeed4ec8d4fde0f8b52ec7c6d2e061bf5d686970c9 /src
parent695f25a32b5e5ace3533b8fd6b6c2a4b8415fdb0 (diff)
downloadcraftbukkit-2f1513cae0bc662b4b5db595574f62e82fb640e1.tar
craftbukkit-2f1513cae0bc662b4b5db595574f62e82fb640e1.tar.gz
craftbukkit-2f1513cae0bc662b4b5db595574f62e82fb640e1.tar.lz
craftbukkit-2f1513cae0bc662b4b5db595574f62e82fb640e1.tar.xz
craftbukkit-2f1513cae0bc662b4b5db595574f62e82fb640e1.zip
Add missing CraftBlock hashCode()
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
index 54e244c8..00548022 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
@@ -274,6 +274,11 @@ public class CraftBlock implements Block {
return this.x == other.x && this.y == other.y && this.z == other.z && this.getWorld().equals(other.getWorld());
}
+ @Override
+ public int hashCode() {
+ return this.y << 24 ^ this.x ^ this.z ^ this.getWorld().hashCode();
+ }
+
public boolean isBlockFacePowered(BlockFace face) {
return chunk.getHandle().world.isBlockFacePowered(x, y, z, blockFaceToNotch(face));
}