From d7d8930cd41457a28ad31542a684ca399056cad6 Mon Sep 17 00:00:00 2001 From: TomyLobo Date: Mon, 5 Aug 2013 19:58:53 +0200 Subject: [PATCH] Made BlockWorldVector.equals accept all kinds of Vectors, not just WorldVectors. This should make all those compareTo==0 things unnecessary. --- src/main/java/com/sk89q/worldedit/BlockWorldVector.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/sk89q/worldedit/BlockWorldVector.java b/src/main/java/com/sk89q/worldedit/BlockWorldVector.java index e6d3d43f7..3cab4c0f7 100644 --- a/src/main/java/com/sk89q/worldedit/BlockWorldVector.java +++ b/src/main/java/com/sk89q/worldedit/BlockWorldVector.java @@ -110,10 +110,10 @@ public class BlockWorldVector extends WorldVector { */ @Override public boolean equals(Object obj) { - if (!(obj instanceof WorldVector)) { + if (!(obj instanceof Vector)) { return false; } - WorldVector other = (WorldVector) obj; + Vector other = (Vector) obj; return (int) other.getX() == (int) this.x && (int) other.getY() == (int) this.y && (int) other.getZ() == (int) this.z;