summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorstevenh <steven.hartland@multiplay.co.uk>2011-03-11 20:12:53 +0000
committerstevenh <steven.hartland@multiplay.co.uk>2011-03-11 20:12:53 +0000
commita0530f51128c0a113fdc619bf4a65b227847fe67 (patch)
tree7ec4b0f10bf42fc938f79628ae4d0733a6cc4cbf /src
parentc08b5f35585764b6cdc6d117e2f47b89435c1224 (diff)
parent941f25f4c9f973ac5fc5e3b923ca078f764849a2 (diff)
downloadbukkit-a0530f51128c0a113fdc619bf4a65b227847fe67.tar
bukkit-a0530f51128c0a113fdc619bf4a65b227847fe67.tar.gz
bukkit-a0530f51128c0a113fdc619bf4a65b227847fe67.tar.lz
bukkit-a0530f51128c0a113fdc619bf4a65b227847fe67.tar.xz
bukkit-a0530f51128c0a113fdc619bf4a65b227847fe67.zip
Merge branch 'master' of github.com:Bukkit/Bukkit
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/bukkit/Chunk.java6
-rw-r--r--src/main/java/org/bukkit/block/Block.java36
-rw-r--r--src/main/java/org/bukkit/entity/LivingEntity.java9
3 files changed, 50 insertions, 1 deletions
diff --git a/src/main/java/org/bukkit/Chunk.java b/src/main/java/org/bukkit/Chunk.java
index 82e611fe..cf97c5a5 100644
--- a/src/main/java/org/bukkit/Chunk.java
+++ b/src/main/java/org/bukkit/Chunk.java
@@ -2,6 +2,8 @@
package org.bukkit;
import org.bukkit.block.Block;
+import org.bukkit.block.BlockState;
+import org.bukkit.entity.Entity;
/**
* Represents a chunk of blocks
@@ -38,4 +40,8 @@ public interface Chunk {
* @return the Block
*/
Block getBlock(int x, int y, int z);
+
+ Entity[] getEntities();
+
+ BlockState[] getTileEntities();
}
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();
}
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index 97cd6281..f9b221ee 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -3,6 +3,8 @@ package org.bukkit.entity;
import java.util.HashSet;
import java.util.List;
+
+import org.bukkit.Location;
import org.bukkit.block.Block;
/**
@@ -39,6 +41,13 @@ public interface LivingEntity extends Entity {
public double getEyeHeight(boolean ignoreSneaking);
/**
+ * Get a Location detailing the current eye position of the LivingEntity.
+ *
+ * @return a Location at the eyes of the LivingEntity.
+ */
+ public Location getEyeLocation();
+
+ /**
* Gets all blocks along the player's line of sight
* List iterates from player's position to target inclusive
*