From 4500f93a1bbde48dcb657fb0420e6eb70e89892b Mon Sep 17 00:00:00 2001 From: TomyLobo Date: Tue, 3 Jan 2012 00:58:00 +0100 Subject: [PATCH] Fixed Vector.containedWithinBlock(min, max) and Vector2D.equals(Vector2D) --- src/main/java/com/sk89q/worldedit/Vector.java | 2 +- src/main/java/com/sk89q/worldedit/Vector2D.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/sk89q/worldedit/Vector.java b/src/main/java/com/sk89q/worldedit/Vector.java index 4b31da0e2..ffd4454bb 100644 --- a/src/main/java/com/sk89q/worldedit/Vector.java +++ b/src/main/java/com/sk89q/worldedit/Vector.java @@ -508,7 +508,7 @@ public class Vector { public boolean containedWithinBlock(Vector min, Vector max) { return getBlockX() >= min.getBlockX() && getBlockX() <= max.getBlockX() && getBlockY() >= min.getBlockY() && getBlockY() <= max.getBlockY() - && getBlockZ() >= min.getBlockZ() && getBlockZ() <= max.getBlockY(); + && getBlockZ() >= min.getBlockZ() && getBlockZ() <= max.getBlockZ(); } /** diff --git a/src/main/java/com/sk89q/worldedit/Vector2D.java b/src/main/java/com/sk89q/worldedit/Vector2D.java index c2c69bcb2..099c24da7 100644 --- a/src/main/java/com/sk89q/worldedit/Vector2D.java +++ b/src/main/java/com/sk89q/worldedit/Vector2D.java @@ -165,7 +165,7 @@ public class Vector2D { if (!(obj instanceof Vector2D)) { return false; } - Vector other = (Vector) obj; + Vector2D other = (Vector2D) obj; return other.x == this.x && other.z == this.z; }