Interface SideChainPartBlock
- All Known Implementing Classes:
ShelfBlock
public interface SideChainPartBlock
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordstatic interfacestatic final recordstatic final record -
Method Summary
Modifier and TypeMethodDescriptionprivate voidaddBlocksConnectingTowards(IntFunction<SideChainPartBlock.Neighbor> getNeighbor, SideChainPart endPart, Consumer<BlockPos> accumulator) private booleancanConnect(int newBlocksToConnectTo, int currentChainLength) getAllBlocksConnectedTo(LevelAccessor level, BlockPos pos) getFacing(BlockState state) intprivate SideChainPartBlock.NeighborsgetNeighbors(LevelAccessor level, BlockPos center, Direction facing) getSideChainPart(BlockState state) private booleanisBeingUpdatedByNeighbor(BlockState state, BlockState oldState) booleanisConnectable(BlockState state) private voidsetPart(LevelAccessor level, BlockPos pos, SideChainPart newPart) setSideChainPart(BlockState state, SideChainPart newPart) default voidupdateNeighborsAfterPoweringDown(LevelAccessor level, BlockPos pos, BlockState state) default voidupdateSelfAndNeighborsOnPoweringUp(LevelAccessor level, BlockPos pos, BlockState state, BlockState oldState)
-
Method Details
-
getSideChainPart
-
setSideChainPart
-
getFacing
-
isConnectable
-
getMaxChainLength
int getMaxChainLength() -
getAllBlocksConnectedTo
-
addBlocksConnectingTowards
private void addBlocksConnectingTowards(IntFunction<SideChainPartBlock.Neighbor> getNeighbor, SideChainPart endPart, Consumer<BlockPos> accumulator) -
updateNeighborsAfterPoweringDown
-
updateSelfAndNeighborsOnPoweringUp
default void updateSelfAndNeighborsOnPoweringUp(LevelAccessor level, BlockPos pos, BlockState state, BlockState oldState) -
canConnect
private boolean canConnect(int newBlocksToConnectTo, int currentChainLength) -
isBeingUpdatedByNeighbor
-
getNeighbors
private SideChainPartBlock.Neighbors getNeighbors(LevelAccessor level, BlockPos center, Direction facing) -
setPart
-