Skip to content

BlockUpdateFlags

Namespace Mc.Scripting.Worlds · Kind enum

public enum BlockUpdateFlags : int

How a block change is propagated, the update flags of the game’s Level.setBlock (combine with |).

Name Value Description
None 0 Nothing: the block is written silently (no neighbour update, clients are not told). Rarely what you want.
Neighbors 1 Notify the neighbouring blocks (neighborChanged): redstone, doors, plants that lose their support …
Clients 2 Send the change to the players tracking the chunk.
All 3 Neighbours and clients: the default of World.SetBlock.
NoRender 4 Do not re-render the block on the clients (they still get the data).
Immediate 8 Run the update on the client immediately instead of at the next frame.
KnownShape 16 The neighbour shape updates (a fence connecting to its neighbours) are skipped: the new state is taken as it is.
SuppressDrops 32 The old block does not drop its items when it is replaced (for example a flower on a block that is removed).
MovedByPiston 64 The change is a piston moving the block.
SkipShapeUpdateOnWire 128 Redstone wire: the shape updates of the wire’s neighbours are skipped (the game uses it while it recalculates a wire network).
SkipBlockEntitySideEffects 256 The old block entity is replaced without its removal side effects (no contents drop).
SkipOnPlace 512 The new block’s placement logic (onPlace) does not run.