Package net.fabricmc.fabric.api.block.v1
Interface FabricBlockState
public interface FabricBlockState
General-purpose Fabric-provided extensions for
BlockState, matching the functionality provided in FabricBlock.
Note: This interface is automatically implemented on all block states via Mixin and interface injection.
-
Method Summary
Modifier and TypeMethodDescriptiondefault BlockStategetAppearance(BlockRenderView renderView, BlockPos pos, Direction side, @Nullable BlockState sourceState, @Nullable BlockPos sourcePos) Return the current appearance of the block, i.e.
-
Method Details
-
getAppearance
default BlockState getAppearance(BlockRenderView renderView, BlockPos pos, Direction side, @Nullable @Nullable BlockState sourceState, @Nullable @Nullable BlockPos sourcePos) Return the current appearance of the block, i.e. which block state this block reports to look like on a given side.- Parameters:
renderView- the world this block is inpos- position of this block, whose appearance is being queriedside- the side for which the appearance is being queriedsourceState- (optional) state of the block that is querying the appearance, or null if unknownsourcePos- (optional) position of the block that is querying the appearance, or null if unknown- Returns:
- the appearance of the block on the given side; the original
statecan be returned if there is no better option - See Also:
-