Interface BlockState

    • Method Detail

      • type

        BlockType type()
        Gets the base type of block.

        The type does not include block data such as the contents of inventories.

        Returns:
        The type of block
      • fluidState

        FluidState fluidState()
        Gets the associated FluidState for this block state. Depending on whether this block state is considered "waterlogged" or not, and with which fluid.
        Returns:
        The fluid state
      • rotate

        BlockState rotate​(Rotation rotation)
        Gets the appropriate BlockState for the desired Rotation. It may return the same state, but some states may have extra logic associated with rotating on its axis, much like mirroring.
        Parameters:
        rotation - The rotation
        Returns:
        The rotated state if not this state
      • rotate

        default BlockState rotate​(Supplier<? extends Rotation> rotation)
        Gets the appropriate BlockState for the desired Rotation. It may return the same state, but some states may have extra logic associated with rotating on its axis, much like mirroring.
        Parameters:
        rotation - The rotation
        Returns:
        The rotated state if not this state
      • mirror

        BlockState mirror​(Mirror mirror)
        Gets the appropriate BlockState for the desired Mirror. It may return the same state, but some states may have extra logic associated with mirroring on its axis, much like rotation.
        Parameters:
        mirror - The mirror
        Returns:
        The mirrored state if not this state
      • mirror

        default BlockState mirror​(Supplier<? extends Mirror> mirror)
        Gets the appropriate BlockState for the desired Mirror. It may return the same state, but some states may have extra logic associated with mirroring on its axis, much like rotation.
        Parameters:
        mirror - The mirror
        Returns:
        The mirrored state if not this state