diff options
author | durron597 <martin.jared@gmail.com> | 2010-12-31 09:07:12 -0500 |
---|---|---|
committer | durron597 <martin.jared@gmail.com> | 2010-12-31 09:07:12 -0500 |
commit | 0520b39adf54332a50765e6b52cc761f4327a573 (patch) | |
tree | c114e82f91fff2c9675fa27414d5938e23196a5c | |
parent | 94921bc3e573b51497cf02dc58f9317fb0927502 (diff) | |
download | bukkit-0520b39adf54332a50765e6b52cc761f4327a573.tar bukkit-0520b39adf54332a50765e6b52cc761f4327a573.tar.gz bukkit-0520b39adf54332a50765e6b52cc761f4327a573.tar.lz bukkit-0520b39adf54332a50765e6b52cc761f4327a573.tar.xz bukkit-0520b39adf54332a50765e6b52cc761f4327a573.zip |
Changed it so we store both the block and the face for speed
-rw-r--r-- | src/org/bukkit/event/block/BlockFromToEvent.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/org/bukkit/event/block/BlockFromToEvent.java b/src/org/bukkit/event/block/BlockFromToEvent.java index fc029c36..2fcbcf0c 100644 --- a/src/org/bukkit/event/block/BlockFromToEvent.java +++ b/src/org/bukkit/event/block/BlockFromToEvent.java @@ -8,11 +8,13 @@ import org.bukkit.event.Event; * Holds information for events with a source block and a destination block */ public class BlockFromToEvent extends BlockEvent { - protected BlockFace face; + protected Block from; + protected BlockFace face; public BlockFromToEvent(final Event.Type type, final Block block, final BlockFace face) { super(type, block); this.face = face; + this.from = block.getRelative(face.getModX(), face.getModY(), face.getModZ()); } /** @@ -29,7 +31,7 @@ public class BlockFromToEvent extends BlockEvent { * * @return Block the faced block */ - public Block getFacedBlock() { - return block.getRelative(face.getModX(), face.getModY(), face.getModZ()); + public Block getFromBlock() { + return from; } } |