summaryrefslogtreecommitdiffstats
path: root/src/main/java/org
diff options
context:
space:
mode:
authorErik Broes <erikbroes@ripe.net>2011-03-02 21:23:37 +0100
committerErik Broes <erikbroes@ripe.net>2011-03-02 21:23:37 +0100
commit4b1688f4da42f4ac80d0c99772b6cd844a390d1c (patch)
treee860894fa65d324c215d6d7631b355dd8952505a /src/main/java/org
parentcb66f868b4fa42860cdb0d0f7941e97b76966b9b (diff)
downloadbukkit-4b1688f4da42f4ac80d0c99772b6cd844a390d1c.tar
bukkit-4b1688f4da42f4ac80d0c99772b6cd844a390d1c.tar.gz
bukkit-4b1688f4da42f4ac80d0c99772b6cd844a390d1c.tar.lz
bukkit-4b1688f4da42f4ac80d0c99772b6cd844a390d1c.tar.xz
bukkit-4b1688f4da42f4ac80d0c99772b6cd844a390d1c.zip
Small change for CraftBukkit BlockFlowing fix
Diffstat (limited to 'src/main/java/org')
-rw-r--r--src/main/java/org/bukkit/event/block/BlockFromToEvent.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/org/bukkit/event/block/BlockFromToEvent.java b/src/main/java/org/bukkit/event/block/BlockFromToEvent.java
index 09bde18c..b77925ff 100644
--- a/src/main/java/org/bukkit/event/block/BlockFromToEvent.java
+++ b/src/main/java/org/bukkit/event/block/BlockFromToEvent.java
@@ -16,7 +16,6 @@ public class BlockFromToEvent extends BlockEvent implements Cancellable {
public BlockFromToEvent(final Event.Type type, final Block block, final BlockFace face) {
super(type, block);
this.face = face;
- this.to = block.getRelative(face.getModX(), face.getModY(), face.getModZ());
this.cancel = false;
}
@@ -35,7 +34,10 @@ public class BlockFromToEvent extends BlockEvent implements Cancellable {
* @return Block the faced block
*/
public Block getToBlock() {
- return to;
+ if (to == null) {
+ to = block.getRelative(face.getModX(), face.getModY(), face.getModZ());
+ }
+ return to;
}
public boolean isCancelled() {