Class Comparator

java.lang.Object
org.bukkit.material.MaterialData
org.bukkit.material.Comparator
All Implemented Interfaces:
Cloneable, Directional, Redstone

@Deprecated public class Comparator extends MaterialData implements Directional, Redstone
Deprecated.
all usage of MaterialData is deprecated and subject to removal. Use BlockData.
Represents a comparator in the on or off state, in normal or subtraction mode and facing in a specific direction.
See Also:
  • Field Details

    • DEFAULT_DIRECTION

      protected static final BlockFace DEFAULT_DIRECTION
      Deprecated.
    • DEFAULT_SUBTRACTION_MODE

      protected static final boolean DEFAULT_SUBTRACTION_MODE
      Deprecated.
      See Also:
    • DEFAULT_STATE

      protected static final boolean DEFAULT_STATE
      Deprecated.
      See Also:
  • Constructor Details

    • Comparator

      public Comparator()
      Deprecated.
      Constructs a comparator switched off, with the default mode (normal) and facing the default direction (north).
    • Comparator

      public Comparator(BlockFace facingDirection)
      Deprecated.
      Constructs a comparator switched off, with the default mode (normal) and facing the specified direction.
      Parameters:
      facingDirection - the direction the comparator is facing
      See Also:
    • Comparator

      public Comparator(BlockFace facingDirection, boolean isSubtraction)
      Deprecated.
      Constructs a comparator switched off, with the specified mode and facing the specified direction.
      Parameters:
      facingDirection - the direction the comparator is facing
      isSubtraction - True if the comparator is in subtraction mode, false for normal comparator operation
      See Also:
    • Comparator

      public Comparator(BlockFace facingDirection, boolean isSubtraction, boolean state)
      Deprecated.
      Constructs a comparator switched on or off, with the specified mode and facing the specified direction.
      Parameters:
      facingDirection - the direction the comparator is facing
      isSubtraction - True if the comparator is in subtraction mode, false for normal comparator operation
      state - True if the comparator is in the on state
      See Also:
    • Comparator

      public Comparator(Material type)
      Deprecated.
    • Comparator

      @Deprecated public Comparator(Material type, byte data)
      Deprecated.
      Magic value
      Parameters:
      type - the type
      data - the raw data value
  • Method Details

    • setSubtractionMode

      public void setSubtractionMode(boolean isSubtraction)
      Deprecated.
      Sets whether the comparator is in subtraction mode.
      Parameters:
      isSubtraction - True if the comparator is in subtraction mode, false for normal comparator operation
    • isSubtractionMode

      public boolean isSubtractionMode()
      Deprecated.
      Checks whether the comparator is in subtraction mode
      Returns:
      True if the comparator is in subtraction mode, false if normal comparator operation
    • setFacingDirection

      public void setFacingDirection(BlockFace face)
      Deprecated.
      Sets the direction this comparator is facing
      Specified by:
      setFacingDirection in interface Directional
      Parameters:
      face - The direction to set this comparator to
      See Also:
    • getFacing

      public BlockFace getFacing()
      Deprecated.
      Gets the direction this comparator is facing
      Specified by:
      getFacing in interface Directional
      Returns:
      The direction this comparator is facing
      See Also:
    • toString

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

      public Comparator clone()
      Deprecated.
      Overrides:
      clone in class MaterialData
    • isPowered

      public boolean isPowered()
      Deprecated.
      Checks if the comparator is powered
      Specified by:
      isPowered in interface Redstone
      Returns:
      true if the comparator is powered
    • isBeingPowered

      public boolean isBeingPowered()
      Deprecated.
      Checks if the comparator is being powered
      Returns:
      true if the comparator is being powered