From 2f1513cae0bc662b4b5db595574f62e82fb640e1 Mon Sep 17 00:00:00 2001 From: Erik Broes Date: Thu, 20 Oct 2011 23:20:26 +0200 Subject: [PATCH] Add missing CraftBlock hashCode() --- src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java index 54e244c8f0..0054802205 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)); }