From 555758288bd6916878763ef0bfcae1400779cb1c Mon Sep 17 00:00:00 2001 From: TomyLobo Date: Thu, 5 Jan 2012 15:32:53 +0100 Subject: [PATCH] Added BlockVector[2D].toBlockVector[2D] overrrides. This returns the current object, for an instant speed boost :) --- src/main/java/com/sk89q/worldedit/BlockVector.java | 5 +++++ src/main/java/com/sk89q/worldedit/BlockVector2D.java | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/src/main/java/com/sk89q/worldedit/BlockVector.java b/src/main/java/com/sk89q/worldedit/BlockVector.java index 660ec6744..cca503706 100644 --- a/src/main/java/com/sk89q/worldedit/BlockVector.java +++ b/src/main/java/com/sk89q/worldedit/BlockVector.java @@ -97,4 +97,9 @@ public class BlockVector extends Vector { (Integer.valueOf((int) y).hashCode() << 12) ^ Integer.valueOf((int) z).hashCode(); } + + @Override + public BlockVector toBlockVector() { + return this; + } } diff --git a/src/main/java/com/sk89q/worldedit/BlockVector2D.java b/src/main/java/com/sk89q/worldedit/BlockVector2D.java index 8b57346ea..f14b8ce79 100644 --- a/src/main/java/com/sk89q/worldedit/BlockVector2D.java +++ b/src/main/java/com/sk89q/worldedit/BlockVector2D.java @@ -90,4 +90,9 @@ public class BlockVector2D extends Vector2D { return (Integer.valueOf((int) x).hashCode() >> 13) ^ Integer.valueOf((int) z).hashCode(); } + + @Override + public BlockVector2D toBlockVector2D() { + return this; + } }