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
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumThe surfaces a block can hang on. -
Method Summary
Modifier and TypeMethodDescriptiondefault FaceAttachable.AttachedFaceReturns the surface the block hangs on.default BlockFaceReturns the side of this block its support is on:BlockFace.DOWNon the floor,BlockFace.UPon the ceiling, behind it on a wall.default FaceAttachableReturns the same block hanging on another surface.default FaceAttachablewithFacing(BlockFace facing) Returns the same block with anotherfacingvalue.Methods inherited from interface BlockData
asString, get, isAir, isFluid, key, networkId, propertyMap, type, withMethods inherited from interface Directional
getFacing
-
Method Details
-
withFacing
Description copied from interface:DirectionalReturns the same block with anotherfacingvalue.- Specified by:
withFacingin interfaceDirectional- Parameters:
facing- the side to face; must be one of the values the block accepts- Returns:
- the same block with another
facingvalue
-
getAttachedFace
Returns the surface the block hangs on.- Returns:
- the surface the block hangs on
- Since:
- 0.1.0
-
withAttachedFace
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
Returns the side of this block its support is on:BlockFace.DOWNon the floor,BlockFace.UPon the ceiling, behind it on a wall.- Returns:
- the side of this block its support is on:
BlockFace.DOWNon the floor,BlockFace.UPon the ceiling, behind it on a wall - Since:
- 0.1.0
-