summaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorDinnerbone <dinnerbone@dinnerbone.com>2011-02-18 16:35:05 +0000
committerDinnerbone <dinnerbone@dinnerbone.com>2011-02-18 16:35:05 +0000
commit7fe0aa7460e73bfcf04efacaf1a1e63601774e8d (patch)
treefeaaa387af4fcd8f10c6c463bd5c0a5fec0aba20 /src/main
parenta5ca3e1c1217c0c8bc749c406f09ed0c58ac84f8 (diff)
downloadcraftbukkit-7fe0aa7460e73bfcf04efacaf1a1e63601774e8d.tar
craftbukkit-7fe0aa7460e73bfcf04efacaf1a1e63601774e8d.tar.gz
craftbukkit-7fe0aa7460e73bfcf04efacaf1a1e63601774e8d.tar.lz
craftbukkit-7fe0aa7460e73bfcf04efacaf1a1e63601774e8d.tar.xz
craftbukkit-7fe0aa7460e73bfcf04efacaf1a1e63601774e8d.zip
Implemented a whole buncha Location overrides in CraftWorld
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/bukkit/craftbukkit/CraftWorld.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index c6c646d3..7be7c458 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -353,6 +353,22 @@ public class CraftWorld implements World {
return environment;
}
+ public Block getBlockAt(Location location) {
+ return getBlockAt(location.getBlockX(), location.getBlockY(), location.getBlockZ());
+ }
+
+ public int getBlockTypeIdAt(Location location) {
+ return getBlockTypeIdAt(location.getBlockX(), location.getBlockY(), location.getBlockZ());
+ }
+
+ public int getHighestBlockYAt(Location location) {
+ return getHighestBlockYAt(location.getBlockX(), location.getBlockZ());
+ }
+
+ public Chunk getChunkAt(Location location) {
+ return getChunkAt(location.getBlockX() >> 4, location.getBlockZ() >> 4);
+ }
+
private final class ChunkCoordinate {
public final int x;
public final int z;