Make a start on BlockState stuff

By: Dinnerbone <dinnerbone@dinnerbone.com>
This commit is contained in:
Bukkit/Spigot
2011-01-07 16:17:54 +00:00
parent ef59e4c706
commit 9fbfe7e412
3 changed files with 126 additions and 4 deletions

View File

@@ -1,7 +1,12 @@
package org.bukkit;
import org.bukkit.block.BlockState;
/**
* Represents a block
* Represents a block. This is a live object, and only one Block may exist for
* any given location in a world. The state of the block may change concurrently
* to your own handling of it; use block.getState() to get a snapshot state of a
* block which will not be modified.
*/
public interface Block {
/**
@@ -143,4 +148,15 @@ public interface Block {
* @return BlockFace of this block which has the requested block, or null
*/
BlockFace getFace(Block block);
/**
* Captures the current state of this block. You may then cast that state
* into any accepted type, such as Furnace or Sign.
*
* The returned object will never be updated, and you are not guaranteed that
* (for example) a sign is still a sign after you capture its state.
*
* @return BlockState with the current state of this block.
*/
BlockState getState();
}