Class Hopper

All Implemented Interfaces:
Cloneable, Directional, Redstone

@Deprecated(forRemoval=true, since="1.13") public class Hopper extends MaterialData implements Directional, Redstone
Deprecated, for removal: This API element is subject to removal in a future version.
all usage of MaterialData is deprecated and subject to removal. Use BlockData.
Represents a hopper in an active or deactivated state and facing in a specific direction.
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected static final boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    protected static final BlockFace
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
    Constructs a hopper facing the default direction (down) and initially active.
    Hopper(BlockFace facingDirection)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Constructs a hopper facing the specified direction and initially active.
    Hopper(BlockFace facingDirection, boolean isActive)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Constructs a hopper facing the specified direction and either active or not.
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Hopper(Material type, byte data)
    Deprecated.
    Magic value
  • Method Summary

    Modifier and Type
    Method
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
    Gets the direction this hopper is facing
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
    Checks whether the hopper is active or not.
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
    Checks if the hopper is powered.
    void
    setActive(boolean isActive)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Sets whether the hopper is active or not.
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Sets the direction this hopper is facing
    Deprecated, for removal: This API element is subject to removal in a future version.
     

    Methods inherited from class org.bukkit.material.MaterialData

    equals, getData, getItemType, hashCode, setData, toItemStack, toItemStack

    Methods inherited from class java.lang.Object

    finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • DEFAULT_DIRECTION

      protected static final BlockFace DEFAULT_DIRECTION
      Deprecated, for removal: This API element is subject to removal in a future version.
    • DEFAULT_ACTIVE

      protected static final boolean DEFAULT_ACTIVE
      Deprecated, for removal: This API element is subject to removal in a future version.
      See Also:
  • Constructor Details

    • Hopper

      public Hopper()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Constructs a hopper facing the default direction (down) and initially active.
    • Hopper

      public Hopper(BlockFace facingDirection)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Constructs a hopper facing the specified direction and initially active.
      Parameters:
      facingDirection - the direction the hopper is facing
      See Also:
    • Hopper

      public Hopper(BlockFace facingDirection, boolean isActive)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Constructs a hopper facing the specified direction and either active or not.
      Parameters:
      facingDirection - the direction the hopper is facing
      isActive - True if the hopper is initially active, false if deactivated
      See Also:
    • Hopper

      public Hopper(Material type)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • Hopper

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

    • setActive

      public void setActive(boolean isActive)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets whether the hopper is active or not.
      Parameters:
      isActive - True if the hopper is active, false if deactivated as if powered by redstone
    • isActive

      public boolean isActive()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Checks whether the hopper is active or not.
      Returns:
      True if the hopper is active, false if deactivated
    • setFacingDirection

      public void setFacingDirection(BlockFace face)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets the direction this hopper is facing
      Specified by:
      setFacingDirection in interface Directional
      Parameters:
      face - The direction to set this hopper to
      See Also:
    • getFacing

      public BlockFace getFacing()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets the direction this hopper is facing
      Specified by:
      getFacing in interface Directional
      Returns:
      The direction this hopper is facing
      See Also:
    • toString

      public String toString()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      toString in class MaterialData
    • clone

      public Hopper clone()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      clone in class MaterialData
    • isPowered

      public boolean isPowered()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Checks if the hopper is powered.
      Specified by:
      isPowered in interface Redstone
      Returns:
      true if the hopper is powered