Class Tree

All Implemented Interfaces:
Cloneable

@Deprecated(since="1.13", forRemoval=true) public class Tree extends Wood
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 the different types of Tree block that face a direction.
See Also:
  • Field Summary Link icon

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

    Fields inherited from class org.bukkit.material.Wood Link icon

    DEFAULT_SPECIES
  • Constructor Summary Link icon

    Constructors
    Constructor
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
    Constructs a tree block.
    Tree(Material type)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Constructs a tree block of the given type.
    Tree(Material type, byte data)
    Deprecated.
    Magic value
    Tree(Material type, TreeSpecies species)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Constructs a tree block of the given type and tree species.
    Tree(Material type, TreeSpecies species, BlockFace dir)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Constructs a tree block of the given type and tree species, and facing the given direction.
    Tree(TreeSpecies species)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Constructs a tree block of the given tree species.
    Tree(TreeSpecies species, BlockFace dir)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Constructs a tree block of the given tree species, and facing the given direction.
  • Method Summary Link icon

    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.
    Get direction of the log
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Set direction of the log
    Deprecated, for removal: This API element is subject to removal in a future version.
     

    Methods inherited from class org.bukkit.material.Wood Link icon

    getSpecies, setSpecies

    Methods inherited from class org.bukkit.material.MaterialData Link icon

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

    Methods inherited from class java.lang.Object Link icon

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

    • DEFAULT_TYPE Link icon

      protected static final Material DEFAULT_TYPE
      Deprecated, for removal: This API element is subject to removal in a future version.
    • DEFAULT_DIRECTION Link icon

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

    • Tree Link icon

      public Tree()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Constructs a tree block.
    • Tree Link icon

      public Tree(TreeSpecies species)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Constructs a tree block of the given tree species.
      Parameters:
      species - the species of the tree block
    • Tree Link icon

      public Tree(TreeSpecies species, BlockFace dir)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Constructs a tree block of the given tree species, and facing the given direction.
      Parameters:
      species - the species of the tree block
      dir - the direction the tree block is facing
    • Tree Link icon

      public Tree(Material type)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Constructs a tree block of the given type.
      Parameters:
      type - the type of tree block
    • Tree Link icon

      public Tree(Material type, TreeSpecies species)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Constructs a tree block of the given type and tree species.
      Parameters:
      type - the type of tree block
      species - the species of the tree block
    • Tree Link icon

      public Tree(Material type, TreeSpecies species, BlockFace dir)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Constructs a tree block of the given type and tree species, and facing the given direction.
      Parameters:
      type - the type of tree block
      species - the species of the tree block
      dir - the direction the tree block is facing
    • Tree Link icon

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

    • getDirection Link icon

      public BlockFace getDirection()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Get direction of the log
      Returns:
      one of:
      • BlockFace.TOP for upright (default)
      • BlockFace.NORTH (east-west)
      • BlockFace.WEST (north-south)
      • BlockFace.SELF (directionless)
    • setDirection Link icon

      public void setDirection(BlockFace dir)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Set direction of the log
      Parameters:
      dir - - direction of end of log (BlockFace.SELF for no direction)
    • toString Link icon

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

      public Tree clone()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      clone in class Wood