Interface FaceAttachable

All Superinterfaces:
BlockData, Directional
All Known Subinterfaces:
Switch

@BlockTrait(values=@Values(property="face",allowed={"floor","wall","ceiling"},exactly=true)) public interface FaceAttachable extends Directional
A block state carrying the face property: whether the block hangs on the floor, on a wall or on the ceiling, like levers, buttons and grindstones. On a wall, Directional.getFacing() points away from it.

Block states are immutable: with... methods return another state and leave this one untouched.

Since:
0.1.0
  • Method Details

    • withFacing

      default FaceAttachable withFacing(BlockFace facing)
      Description copied from interface: Directional
      Returns the same block with another facing value.
      Specified by:
      withFacing in interface Directional
      Parameters:
      facing - the side to face; must be one of the values the block accepts
      Returns:
      the same block with another facing value
    • getAttachedFace

      default FaceAttachable.AttachedFace getAttachedFace()
      Returns the surface the block hangs on.
      Returns:
      the surface the block hangs on
      Since:
      0.1.0
    • withAttachedFace

      default FaceAttachable withAttachedFace(FaceAttachable.AttachedFace face)
      Returns the same block hanging on another surface.
      Parameters:
      face - the surface to hang on
      Returns:
      the same block hanging on another surface
      Since:
      0.1.0
    • getSupportSide

      default BlockFace getSupportSide()
      Returns the side of this block its support is on: BlockFace.DOWN on the floor, BlockFace.UP on the ceiling, behind it on a wall.
      Returns:
      the side of this block its support is on: BlockFace.DOWN on the floor, BlockFace.UP on the ceiling, behind it on a wall
      Since:
      0.1.0