Package net.minecraftforge.common.util
Class Constants.BlockFlags
- java.lang.Object
-
- net.minecraftforge.common.util.Constants.BlockFlags
-
- Enclosing class:
- Constants
public static class Constants.BlockFlags extends java.lang.Object
The flags used when callingnet.minecraft.world.IWorldWriter#setBlockState(BlockPos, BlockState, int)
Can be found fromWorld#setBlockState(BlockPos, BlockState, int)
,World.markAndNotifyBlock(net.minecraft.util.math.BlockPos, net.minecraft.world.chunk.Chunk, net.minecraft.block.BlockState, net.minecraft.block.BlockState, int, int)
, andWorldRenderer#notifyBlockUpdate
Flags can be combined with bitwise OR
-
-
Field Summary
Fields Modifier and Type Field Description static int
BLOCK_UPDATE
CallsWorld#notifyBlockUpdate(BlockPos, BlockState, BlockState, int)
.
Server-side, this updates all the path-finding navigators.static int
DEFAULT
static int
DEFAULT_AND_RERENDER
static int
IS_MOVING
Tell the block being changed that it was moved, rather than removed/replaced, the boolean value is eventually passed toBlock#onReplaced(BlockState, World, BlockPos, BlockState, boolean)
as the last parameter.static int
NO_NEIGHBOR_DROPS
Prevents neighbor changes from spawning item drops, used byBlock#replaceBlock(BlockState, BlockState, IWorld, BlockPos, int)
.static int
NO_RERENDER
Stops the blocks from being marked for a render updatestatic int
NOTIFY_NEIGHBORS
CallsneighborChanged
on surrounding blocks (with isMoving as false).static int
RERENDER_MAIN_THREAD
Makes the block be re-rendered immediately, on the main thread.static int
UPDATE_NEIGHBORS
Causes neighbor updates to be sent to all surrounding blocks (including diagonals).
-
Constructor Summary
Constructors Constructor Description BlockFlags()
-
-
-
Field Detail
-
NOTIFY_NEIGHBORS
public static final int NOTIFY_NEIGHBORS
CallsneighborChanged
on surrounding blocks (with isMoving as false). Also updates comparator output state.- See Also:
- Constant Field Values
-
BLOCK_UPDATE
public static final int BLOCK_UPDATE
CallsWorld#notifyBlockUpdate(BlockPos, BlockState, BlockState, int)
.
Server-side, this updates all the path-finding navigators.- See Also:
- Constant Field Values
-
NO_RERENDER
public static final int NO_RERENDER
Stops the blocks from being marked for a render update- See Also:
- Constant Field Values
-
RERENDER_MAIN_THREAD
public static final int RERENDER_MAIN_THREAD
Makes the block be re-rendered immediately, on the main thread. If NO_RERENDER is set, then this will be ignored- See Also:
- Constant Field Values
-
UPDATE_NEIGHBORS
public static final int UPDATE_NEIGHBORS
Causes neighbor updates to be sent to all surrounding blocks (including diagonals). This in turn will callupdateDiagonalNeighbors
on both old and new states, andupdateNeighbors
on the new state.- See Also:
- Constant Field Values
-
NO_NEIGHBOR_DROPS
public static final int NO_NEIGHBOR_DROPS
Prevents neighbor changes from spawning item drops, used byBlock#replaceBlock(BlockState, BlockState, IWorld, BlockPos, int)
.- See Also:
- Constant Field Values
-
IS_MOVING
public static final int IS_MOVING
Tell the block being changed that it was moved, rather than removed/replaced, the boolean value is eventually passed toBlock#onReplaced(BlockState, World, BlockPos, BlockState, boolean)
as the last parameter.- See Also:
- Constant Field Values
-
DEFAULT
public static final int DEFAULT
- See Also:
- Constant Field Values
-
DEFAULT_AND_RERENDER
public static final int DEFAULT_AND_RERENDER
- See Also:
- Constant Field Values
-
-