Package org.spongepowered.api.world
Interface BlockChangeFlag
- 
 public interface BlockChangeFlagA flag of sorts that determines whether a block change will perform various interactions, such as notifying neighboring blocks, performing block physics on placement, etc.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Interface Description static interfaceBlockChangeFlag.Factory
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description BlockChangeFlagandFlag(BlockChangeFlag flag)Gets the equivalentBlockChangeFlagof this flag with thetrues set for this flag and the providedflag, such that only if both flags have the sametrueflags set will persist.BlockChangeFlagandNotFlag(BlockChangeFlag flag)Gets the equivalentBlockChangeFlagof this flag with thetrues set for this flag and the providedflag, such that only if both flags have the sametrueflags set will persist.booleanforceClientRerender()Gets whether this block change is going to request the client to re-render the block on chnge for the next client tick.booleanignoreRender()Gets whether the block change is requested to have no render update on the client.BlockChangeFlaginverse()Gets the invertedBlockChangeFlagof this flag.booleanmovingBlocks()Gets whether this flag is considering that blocks are being moved in the world, much like how pistons will move blocks.booleanneighborDropsAllowed()Gets whether this flag will allow blocks being destroyed as a result ofupdateNeighboringShapes()if the affected blocks could be considered "destroyed" and drop items.booleannotifyClients()Gets whether this flag defines that a block change should update clients to perform a rendering updatebooleannotifyPathfinding()Gets whether this flag will notify pathfinders and navigators for AI on entities and potentially other entities of a block change.booleanperformBlockPhysics()Gets whether this flag defines that a block change should perform block physics checks or not.booleanupdateLighting()Gets whether this flag will queue lighting updates, different blocks may affect lighting in locations, which can potentially cause other blocks to perform side effects due to the light changes (like mushrooms).booleanupdateNeighboringShapes()Gets whether this flag will update observer blocks, different from notifying neighbors in that neighbor notifications can cause further block notification loops (like redstone), whereas this focuses onBlockTypes.OBSERVERblocks being told of updates.booleanupdateNeighbors()Gets whether this flag defines that a block change should notify neighboring blocks.BlockChangeFlagwithBlocksMoving(boolean moving)BlockChangeFlagwithForcedReRender(boolean forcedReRender)BlockChangeFlagwithIgnoreRender(boolean ignoreRender)BlockChangeFlagwithLightingUpdates(boolean lighting)BlockChangeFlagwithNeighborDropsAllowed(boolean dropsAllowed)BlockChangeFlagwithNotifyClients(boolean updateClients)Gets the equivalentBlockChangeFlagof this flag with all other flags while having the desiredupdateClientsas defined by the parameter.BlockChangeFlagwithNotifyObservers(boolean notifyObservers)Gets the equivalentBlockChangeFlagof this flag with all other flags while having the desiredupdateNeighboringShapesas defined by the parameter.BlockChangeFlagwithPathfindingUpdates(boolean pathfindingUpdates)BlockChangeFlagwithPhysics(boolean performBlockPhysics)Gets the equivalentBlockChangeFlagof this flag with all other flags while having the desiredperformBlockPhysicsas defined by the parameter.BlockChangeFlagwithUpdateNeighbors(boolean updateNeighbors)Gets the equivalentBlockChangeFlagof this flag with all other flags while having the desiredupdateNeighborsas defined by the parameter.
 
- 
- 
- 
Method Detail- 
updateNeighborsboolean updateNeighbors() Gets whether this flag defines that a block change should notify neighboring blocks.- Returns:
- True if this is set to notify neighboring blocks
 
 - 
notifyClientsboolean notifyClients() Gets whether this flag defines that a block change should update clients to perform a rendering update- Returns:
- True if this is set to update clients
 
 - 
performBlockPhysicsboolean performBlockPhysics() Gets whether this flag defines that a block change should perform block physics checks or not. If not, no checks are performed.- Returns:
- True if this is set to perform block physics on placement
 
 - 
updateNeighboringShapesboolean updateNeighboringShapes() Gets whether this flag will update observer blocks, different from notifying neighbors in that neighbor notifications can cause further block notification loops (like redstone), whereas this focuses onBlockTypes.OBSERVERblocks being told of updates.- Returns:
- True if this is set to update observers.
 
 - 
updateLightingboolean updateLighting() Gets whether this flag will queue lighting updates, different blocks may affect lighting in locations, which can potentially cause other blocks to perform side effects due to the light changes (like mushrooms). It is not recommended to rely on this particular flag for any changes that can cause client-side lighting inconsistencies.- Returns:
- True if this flag will update lighting
 
 - 
notifyPathfindingboolean notifyPathfinding() Gets whether this flag will notify pathfinders and navigators for AI on entities and potentially other entities of a block change. It may be helpful for mass block placement to bypass a notification of pathfinders within an area.- Returns:
- True if this flag will update pathing
 
 - 
neighborDropsAllowedboolean neighborDropsAllowed() Gets whether this flag will allow blocks being destroyed as a result ofupdateNeighboringShapes()if the affected blocks could be considered "destroyed" and drop items.- Returns:
- True if this flag will allow neighboring blocks to perform drops
 
 - 
movingBlocksboolean movingBlocks() Gets whether this flag is considering that blocks are being moved in the world, much like how pistons will move blocks. This has some effect onBlockEntitycreation reaction or drop delays. The behaviors are dependent on the block in particular.- Returns:
- True if the flag is considering blocks are moving
 
 - 
forceClientRerenderboolean forceClientRerender() Gets whether this block change is going to request the client to re-render the block on chnge for the next client tick. This has particular usage when performing complicated block changes with extra steps, such as pistons performing a move.- Returns:
- True if the blockchagne is requesting the client to re-render the change on the next tick
 
 - 
ignoreRenderboolean ignoreRender() Gets whether the block change is requested to have no render update on the client. This is generally used only whennotifyClients()istrueas well asforceClientRerender()isfalse.- Returns:
- True if the client is not to render te block change, usually accompanied later by a manual update after some ticks
 
 - 
withUpdateNeighborsBlockChangeFlag withUpdateNeighbors(boolean updateNeighbors) Gets the equivalentBlockChangeFlagof this flag with all other flags while having the desiredupdateNeighborsas defined by the parameter.- Parameters:
- updateNeighbors- Whether to update neighboring blocks
- Returns:
- The relative flag with the desired update neighbors
 
 - 
withNotifyClientsBlockChangeFlag withNotifyClients(boolean updateClients) Gets the equivalentBlockChangeFlagof this flag with all other flags while having the desiredupdateClientsas defined by the parameter.- Parameters:
- updateClients- Whether to update clients
- Returns:
- The relative flag with the desired update clients
 
 - 
withPhysicsBlockChangeFlag withPhysics(boolean performBlockPhysics) Gets the equivalentBlockChangeFlagof this flag with all other flags while having the desiredperformBlockPhysicsas defined by the parameter.- Parameters:
- performBlockPhysics- Whether to perform block physics
- Returns:
- The relative flag with the desired block physics
 
 - 
withNotifyObserversBlockChangeFlag withNotifyObservers(boolean notifyObservers) Gets the equivalentBlockChangeFlagof this flag with all other flags while having the desiredupdateNeighboringShapesas defined by the parameter.- Parameters:
- notifyObservers- Whether to update observer blocks
- Returns:
- The relative flag with the desired notify observers
 
 - 
withLightingUpdatesBlockChangeFlag withLightingUpdates(boolean lighting) 
 - 
withPathfindingUpdatesBlockChangeFlag withPathfindingUpdates(boolean pathfindingUpdates) 
 - 
withNeighborDropsAllowedBlockChangeFlag withNeighborDropsAllowed(boolean dropsAllowed) 
 - 
withBlocksMovingBlockChangeFlag withBlocksMoving(boolean moving) 
 - 
withIgnoreRenderBlockChangeFlag withIgnoreRender(boolean ignoreRender) 
 - 
withForcedReRenderBlockChangeFlag withForcedReRender(boolean forcedReRender) 
 - 
inverseBlockChangeFlag inverse() Gets the invertedBlockChangeFlagof this flag. Normally, this may cancel out certain interactions, such as physics, neighbor notifications, or even observer notifications. In certain circumstances, some flags may even require clients to rejoin the world or restart their connections to the server.- Returns:
- The inverted flag
 
 - 
andFlagBlockChangeFlag andFlag(BlockChangeFlag flag) Gets the equivalentBlockChangeFlagof this flag with thetrues set for this flag and the providedflag, such that only if both flags have the sametrueflags set will persist.For example, if this flag has updateNeighboringShapes()and the incoming flag hasupdateNeighboringShapes()returningtrue, the resulting flag will haveupdateNeighboringShapes()returntrueas well. The inverse is also true. If either has differing flags for any of the above methods, the resulting flag will have afalsevalue.- Parameters:
- flag- The incoming flag to and with this flag
- Returns:
- The resulting flag with matched values
 
 - 
andNotFlagBlockChangeFlag andNotFlag(BlockChangeFlag flag) Gets the equivalentBlockChangeFlagof this flag with thetrues set for this flag and the providedflag, such that only if both flags have the sametrueflags set will persist.For example, if this flag has updateNeighboringShapes()and the incoming flag hasupdateNeighboringShapes()returningtrue, the resulting flag will haveupdateNeighboringShapes()returntrueas well. The inverse is also true. If either has differing flags for any of the above methods, the resulting flag will have afalsevalue.- Parameters:
- flag- The incoming flag to and with this flag
- Returns:
- The resulting flag with matched values
 
 
- 
 
-