From 050eef8dc74fbb21c45eb5871a53d3c78cb9f875 Mon Sep 17 00:00:00 2001 From: zml2008 Date: Sun, 9 Oct 2011 21:57:29 -0700 Subject: [PATCH] Fixed checkLoadedChunk --- src/main/java/com/sk89q/worldedit/EditSession.java | 4 ++-- src/main/java/com/sk89q/worldedit/LocalWorld.java | 2 +- src/main/java/com/sk89q/worldedit/bukkit/BukkitWorld.java | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/sk89q/worldedit/EditSession.java b/src/main/java/com/sk89q/worldedit/EditSession.java index 36c068eb0..955c5d176 100644 --- a/src/main/java/com/sk89q/worldedit/EditSession.java +++ b/src/main/java/com/sk89q/worldedit/EditSession.java @@ -160,7 +160,7 @@ public class EditSession { return false; } - world.checkLoadedChuck(pt); + world.checkLoadedChunk(pt); // No invalid blocks if (!world.isValidBlockType(type)) { @@ -394,7 +394,7 @@ public class EditSession { * @return BaseBlock */ public BaseBlock rawGetBlock(Vector pt) { - world.checkLoadedChuck(pt); + world.checkLoadedChunk(pt); int type = world.getBlockType(pt); int data = world.getBlockData(pt); diff --git a/src/main/java/com/sk89q/worldedit/LocalWorld.java b/src/main/java/com/sk89q/worldedit/LocalWorld.java index d2d3f646b..477b60121 100644 --- a/src/main/java/com/sk89q/worldedit/LocalWorld.java +++ b/src/main/java/com/sk89q/worldedit/LocalWorld.java @@ -298,7 +298,7 @@ public abstract class LocalWorld { * * @param pt Position to check */ - public abstract void checkLoadedChuck(Vector pt); + public void checkLoadedChunk(Vector pt) {} /** * Compare if the other world is equal. diff --git a/src/main/java/com/sk89q/worldedit/bukkit/BukkitWorld.java b/src/main/java/com/sk89q/worldedit/bukkit/BukkitWorld.java index 8592a477c..b85555793 100644 --- a/src/main/java/com/sk89q/worldedit/bukkit/BukkitWorld.java +++ b/src/main/java/com/sk89q/worldedit/bukkit/BukkitWorld.java @@ -680,7 +680,7 @@ public class BukkitWorld extends LocalWorld { } @Override - public void checkLoadedChuck(Vector pt) { + public void checkLoadedChunk(Vector pt) { if (!world.isChunkLoaded(pt.getBlockX() >> 4, pt.getBlockZ() >> 4)) { world.loadChunk(pt.getBlockX() >> 4, pt.getBlockZ() >> 4); }