summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/bukkit
diff options
context:
space:
mode:
authorsk89q <the.sk89q@gmail.com>2011-01-15 19:33:45 -0800
committersk89q <the.sk89q@gmail.com>2011-01-15 19:33:45 -0800
commitc62e387879131b450ec6e59901ec92793b3a6add (patch)
treef5e9d5318dce9550da8b635ec4d2f4eaa0ed20ea /src/main/java/org/bukkit
parent5d93ab3e54bddf4babf03b99d1745bd57dc5deaf (diff)
downloadcraftbukkit-c62e387879131b450ec6e59901ec92793b3a6add.tar
craftbukkit-c62e387879131b450ec6e59901ec92793b3a6add.tar.gz
craftbukkit-c62e387879131b450ec6e59901ec92793b3a6add.tar.lz
craftbukkit-c62e387879131b450ec6e59901ec92793b3a6add.tar.xz
craftbukkit-c62e387879131b450ec6e59901ec92793b3a6add.zip
Added Block.getRelative(BlockFace).
Diffstat (limited to 'src/main/java/org/bukkit')
-rw-r--r--src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
index facc1624..2be9f62e 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
@@ -199,6 +199,16 @@ public class CraftBlock implements Block {
}
/**
+ * Gets the block at the given offsets
+ *
+ * @param face face
+ * @return Block at the given offsets
+ */
+ public Block getRelative(BlockFace face) {
+ return getRelative(face.getModX(), face.getModY(), face.getModZ());
+ }
+
+ /**
* Gets the face relation of this block compared to the given block<br />
* <br />
* For example: