From 7d51bc7834903d5c36e1472a45e7ad4673bcad27 Mon Sep 17 00:00:00 2001 From: TomyLobo Date: Wed, 22 Feb 2012 20:08:55 +0100 Subject: Added missing BlockState functions. Addresses BUKKIT-807 --- src/main/java/org/bukkit/block/BlockState.java | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/src/main/java/org/bukkit/block/BlockState.java b/src/main/java/org/bukkit/block/BlockState.java index 65de77d3..7e181017 100644 --- a/src/main/java/org/bukkit/block/BlockState.java +++ b/src/main/java/org/bukkit/block/BlockState.java @@ -1,6 +1,7 @@ package org.bukkit.block; import org.bukkit.Chunk; +import org.bukkit.Location; import org.bukkit.Material; import org.bukkit.World; import org.bukkit.material.MaterialData; @@ -78,6 +79,13 @@ public interface BlockState { */ int getZ(); + /** + * Gets the location of this block + * + * @return location + */ + Location getLocation(); + /** * Gets the chunk which contains this block * @@ -109,8 +117,8 @@ public interface BlockState { /** * Attempts to update the block represented by this state, setting it to the - * new values as defined by this state.
- *
+ * new values as defined by this state. + *

* This has the same effect as calling update(false). That is to say, * this will not modify the state of a block if it is no longer the same * type as it was when this state was taken. It will return false in this @@ -123,12 +131,12 @@ public interface BlockState { /** * Attempts to update the block represented by this state, setting it to the - * new values as defined by this state.
- *
+ * new values as defined by this state. + *

* Unless force is true, this will not modify the state of a block if it is * no longer the same type as it was when this state was taken. It will return - * false in this eventuality.
- *
+ * false in this eventuality. + *

* If force is true, it will set the type of the block to match the new state, * set the state data and then return true. * @@ -138,4 +146,6 @@ public interface BlockState { boolean update(boolean force); public byte getRawData(); + + public void setRawData(byte data); } -- cgit v1.2.3