Fix CraftBlock.equals as they are not singletons anymore

By: Erik Broes <erikbroes@grum.nl>
This commit is contained in:
CraftBukkit/Spigot
2011-10-07 11:48:14 +02:00
parent 64723bee72
commit e35d160db6

View File

@@ -267,7 +267,11 @@ public class CraftBlock implements Block {
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
return this == o; if (o == this) return true;
if (!(o instanceof CraftBlock)) return false;
CraftBlock other = (CraftBlock) o;
return this.x == other.x && this.y == other.y && this.z == other.z && this.getWorld().equals(other.getWorld());
} }
public boolean isBlockFacePowered(BlockFace face) { public boolean isBlockFacePowered(BlockFace face) {