java.lang.Cloneable, Directional, Redstonepublic class Hopper extends MaterialData implements Directional, Redstone
Material.HOPPER| Modifier and Type | Field | Description | 
|---|---|---|
protected static boolean | 
DEFAULT_ACTIVE | 
|
protected static BlockFace | 
DEFAULT_DIRECTION | 
| Constructor | Description | 
|---|---|
Hopper() | 
 Constructs a hopper facing the default direction (down) and initially
 active. 
 | 
Hopper(BlockFace facingDirection) | 
 Constructs a hopper facing the specified direction and initially active. 
 | 
Hopper(BlockFace facingDirection,
      boolean isActive) | 
 Constructs a hopper facing the specified direction and either active or
 not. 
 | 
Hopper(Material type) | 
|
Hopper(Material type,
      byte data) | 
 Deprecated.
 
Magic value 
 | 
| Modifier and Type | Method | Description | 
|---|---|---|
Hopper | 
clone() | 
|
BlockFace | 
getFacing() | 
 Gets the direction this hopper is facing 
 | 
boolean | 
isActive() | 
 Checks whether the hopper is active or not. 
 | 
boolean | 
isPowered() | 
 Checks if the hopper is powered. 
 | 
void | 
setActive(boolean isActive) | 
 Sets whether the hopper is active or not. 
 | 
void | 
setFacingDirection(BlockFace face) | 
 Sets the direction this hopper is facing 
 | 
java.lang.String | 
toString() | 
equals, getData, getItemType, hashCode, setData, toItemStack, toItemStackprotected static final BlockFace DEFAULT_DIRECTION
protected static final boolean DEFAULT_ACTIVE
public Hopper()
public Hopper(BlockFace facingDirection)
facingDirection - the direction the hopper is facingBlockFacepublic Hopper(BlockFace facingDirection, boolean isActive)
facingDirection - the direction the hopper is facingisActive - True if the hopper is initially active, false if
 deactivatedBlockFacepublic Hopper(Material type)
@Deprecated public Hopper(Material type, byte data)
type - the typedata - the raw data valuepublic void setActive(boolean isActive)
isActive - True if the hopper is active, false if deactivated as if
 powered by redstonepublic boolean isActive()
public void setFacingDirection(BlockFace face)
setFacingDirection in interface Directionalface - The direction to set this hopper toBlockFacepublic BlockFace getFacing()
getFacing in interface DirectionalBlockFacepublic java.lang.String toString()
toString in class MaterialDatapublic Hopper clone()
clone in class MaterialDataCopyright © 2018. All rights reserved.