geforkt von Mirrors/Paper
Add method to update state without physics update. Addresses BUKKIT-3939
By: Travis Watkins <amaranth@ubuntu.com>
Dieser Commit ist enthalten in:
Ursprung
fe1fbd0a6b
Commit
423cccdc8d
@ -138,6 +138,18 @@ public interface BlockState extends Metadatable {
|
|||||||
*/
|
*/
|
||||||
boolean update();
|
boolean update();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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
|
* 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.
|
||||||
@ -148,11 +160,15 @@ public interface BlockState extends Metadatable {
|
|||||||
* <p />
|
* <p />
|
||||||
* If force is true, it will set the type of the block to match the new state,
|
* 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.
|
* 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 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
|
* @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.
|
* @return The data as a raw byte.
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren