summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTahg <tahgtahv@gmail.com>2011-03-10 13:23:54 -0500
committerTahg <tahgtahv@gmail.com>2011-03-10 13:23:54 -0500
commit941f25f4c9f973ac5fc5e3b923ca078f764849a2 (patch)
tree49a0e6f8290d66594b8b2b712ff305d86a41a8dd /src
parent9779cb35ddf4f99e64a65e5aee7ce61094e0127e (diff)
downloadbukkit-941f25f4c9f973ac5fc5e3b923ca078f764849a2.tar
bukkit-941f25f4c9f973ac5fc5e3b923ca078f764849a2.tar.gz
bukkit-941f25f4c9f973ac5fc5e3b923ca078f764849a2.tar.lz
bukkit-941f25f4c9f973ac5fc5e3b923ca078f764849a2.tar.xz
bukkit-941f25f4c9f973ac5fc5e3b923ca078f764849a2.zip
added methods for getting redstone power
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/bukkit/block/Block.java36
1 files changed, 35 insertions, 1 deletions
diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java
index fb02f362..0ec7e0ed 100644
--- a/src/main/java/org/bukkit/block/Block.java
+++ b/src/main/java/org/bukkit/block/Block.java
@@ -4,7 +4,6 @@ import org.bukkit.Chunk;
import org.bukkit.Material;
import org.bukkit.World;
import org.bukkit.Location;
-import org.bukkit.block.BlockState;
/**
* Represents a block. This is a live object, and only one Block may exist for
@@ -136,6 +135,8 @@ public interface Block {
* @param data New block specific metadata
*/
void setData(byte data);
+
+ void setData(byte data, boolean applyPhyiscs);
/**
* Sets the type of this block
@@ -151,6 +152,10 @@ public interface Block {
* @return whether the block was changed
*/
boolean setTypeId(int type);
+
+ boolean setTypeId(int type, boolean applyPhysics);
+
+ boolean setTypeIdAndData(int type, byte data, boolean applyPhyiscs);
/**
* Gets the face relation of this block compared to the given block<br />
@@ -201,4 +206,33 @@ public interface Block {
* @return
*/
boolean isBlockIndirectlyPowered();
+
+ /**
+ * Returns true if the block face is being powered by Redstone.
+ *
+ * @return
+ */
+ boolean isBlockFacePowered(BlockFace face);
+
+ /**
+ * Returns true if the block face is being indirectly powered by Redstone.
+ *
+ * @return
+ */
+ boolean isBlockFaceIndirectlyPowered(BlockFace face);
+
+ /**
+ * Returns the redstone power being provided to this block face
+ *
+ * @param face the face of the block to query or BlockFace.SELF for the block itself
+ * @return
+ */
+ int getBlockPower(BlockFace face);
+
+ /**
+ * Returns the redstone power being provided to this block
+ *
+ * @return
+ */
+ int getBlockPower();
}