Class PistonBaseMaterial

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

public class PistonBaseMaterial
extends MaterialData
implements Directional, Redstone
Material data for the piston base block
  • Constructor Details

    • PistonBaseMaterial

      @Deprecated public PistonBaseMaterial​(int type)
      Deprecated.
      Magic value
      Constructs a PistonBaseMaterial
      Parameters:
      type - the raw type id
    • PistonBaseMaterial

      public PistonBaseMaterial​(Material type)
    • PistonBaseMaterial

      @Deprecated public PistonBaseMaterial​(int type, byte data)
      Deprecated.
      Magic value
      Constructs a PistonBaseMaterial.
      Parameters:
      type - the raw type id
      data - the raw data value
    • PistonBaseMaterial

      @Deprecated public PistonBaseMaterial​(Material type, byte data)
      Deprecated.
      Magic value
      Constructs a PistonBaseMaterial.
      Parameters:
      type - the material type to use
      data - the raw data value
  • Method Details

    • setFacingDirection

      public void setFacingDirection​(BlockFace face)
      Description copied from interface: Directional
      Sets the direction that this block is facing in
      Specified by:
      setFacingDirection in interface Directional
      Parameters:
      face - The facing direction
    • getFacing

      public BlockFace getFacing()
      Description copied from interface: Directional
      Gets the direction this block is facing
      Specified by:
      getFacing in interface Directional
      Returns:
      the direction this block is facing
    • isPowered

      public boolean isPowered()
      Description copied from interface: Redstone
      Gets the current state of this Material, indicating if it's powered or unpowered
      Specified by:
      isPowered in interface Redstone
      Returns:
      true if powered, otherwise false
    • setPowered

      public void setPowered​(boolean powered)
      Sets the current state of this piston
      Parameters:
      powered - true if the piston is extended & powered, or false
    • isSticky

      public boolean isSticky()
      Checks if this piston base is sticky, and returns true if so
      Returns:
      true if this piston is "sticky", or false
    • clone

      public PistonBaseMaterial clone()
      Overrides:
      clone in class MaterialData