summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTravis Watkins <amaranth@ubuntu.com>2013-03-31 19:16:53 -0500
committerTravis Watkins <amaranth@ubuntu.com>2013-03-31 19:16:53 -0500
commitedfc50fa2df2bf284bf108ea39bca27c3240bc53 (patch)
treeb761b2120fb082759fc915991649c94ab0072281 /src
parenta7885f5f252c8b34610b7e3e1960f627215ddda4 (diff)
downloadbukkit-edfc50fa2df2bf284bf108ea39bca27c3240bc53.tar
bukkit-edfc50fa2df2bf284bf108ea39bca27c3240bc53.tar.gz
bukkit-edfc50fa2df2bf284bf108ea39bca27c3240bc53.tar.lz
bukkit-edfc50fa2df2bf284bf108ea39bca27c3240bc53.tar.xz
bukkit-edfc50fa2df2bf284bf108ea39bca27c3240bc53.zip
Add method to update state without physics update. Addresses BUKKIT-3939
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/bukkit/block/BlockState.java18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/main/java/org/bukkit/block/BlockState.java b/src/main/java/org/bukkit/block/BlockState.java
index 08b10e6f..bdfae5e2 100644
--- a/src/main/java/org/bukkit/block/BlockState.java
+++ b/src/main/java/org/bukkit/block/BlockState.java
@@ -142,17 +142,33 @@ public interface BlockState extends Metadatable {
* Attempts to update the block represented by this state, setting it to the
* new values as defined by this state.
* <p />
+ * This has the same effect as calling update(force, true). That is to say,
+ * this will trigger a physics update to surrounding blocks.
+ *
+ * @param force true to forcefully set the state
+ * @return true if the update was successful, otherwise false
+ */
+ boolean update(boolean force);
+
+ /**
+ * Attempts to update the block represented by this state, setting it to the
+ * new values as defined by this state.
+ * <p />
* 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.
* <p />
* 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.
+ * <p />
+ * If applyPhysics is true, it will trigger a physics update on surrounding
+ * blocks which could cause them to update or disappear.
*
* @param force true to forcefully set the state
+ * @param applyPhysics false to cancel updating physics on surrounding blocks
* @return true if the update was successful, otherwise false
*/
- boolean update(boolean force);
+ boolean update(boolean force, boolean applyPhysics);
/**
* @return The data as a raw byte.