Class Bed

All Implemented Interfaces:
Cloneable, Directional

@Deprecated(since="1.14.1") public class Bed extends MaterialData implements Directional
Deprecated.
all usage of MaterialData is deprecated and subject to removal. Use BlockData.
Represents a bed.
  • Constructor Details Link icon

    • Bed Link icon

      public Bed()
      Deprecated.
      Default constructor for a bed.
    • Bed Link icon

      public Bed(BlockFace direction)
      Deprecated.
      Instantiate a bed facing in a particular direction.
      Parameters:
      direction - the direction the bed's head is facing
    • Bed Link icon

      public Bed(Material type)
      Deprecated.
    • Bed Link icon

      @Deprecated(since="1.6.2") public Bed(Material type, byte data)
      Deprecated.
      Magic value
      Parameters:
      type - the type
      data - the raw data value
  • Method Details Link icon

    • isHeadOfBed Link icon

      public boolean isHeadOfBed()
      Deprecated.
      Determine if this block represents the head of the bed
      Returns:
      true if this is the head of the bed, false if it is the foot
    • setHeadOfBed Link icon

      public void setHeadOfBed(boolean isHeadOfBed)
      Deprecated.
      Configure this to be either the head or the foot of the bed
      Parameters:
      isHeadOfBed - True to make it the head.
    • setFacingDirection Link icon

      public void setFacingDirection(BlockFace face)
      Deprecated.
      Set which direction the head of the bed is facing. Note that this will only affect one of the two blocks the bed is made of.
      Specified by:
      setFacingDirection in interface Directional
      Parameters:
      face - The facing direction
    • getFacing Link icon

      public BlockFace getFacing()
      Deprecated.
      Get the direction that this bed's head is facing toward
      Specified by:
      getFacing in interface Directional
      Returns:
      the direction the head of the bed is facing
    • toString Link icon

      public String toString()
      Deprecated.
      Overrides:
      toString in class MaterialData
    • clone Link icon

      public Bed clone()
      Deprecated.
      Overrides:
      clone in class MaterialData