diff options
author | Dinnerbone <dinnerbone@dinnerbone.com> | 2011-02-18 16:35:05 +0000 |
---|---|---|
committer | Dinnerbone <dinnerbone@dinnerbone.com> | 2011-02-18 16:35:05 +0000 |
commit | 7fe0aa7460e73bfcf04efacaf1a1e63601774e8d (patch) | |
tree | feaaa387af4fcd8f10c6c463bd5c0a5fec0aba20 /src/main | |
parent | a5ca3e1c1217c0c8bc749c406f09ed0c58ac84f8 (diff) | |
download | craftbukkit-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.java | 16 |
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; |