程序包 org.bukkit.material

# 类 Tree

java.lang.Object
org.bukkit.material.MaterialData
org.bukkit.material.Wood
org.bukkit.material.Tree

所有已实现的接口:
  `Cloneable`

@Deprecated public class Tree extends Wood
已过时。
all usage of MaterialData is deprecated and subject to removal. Use `BlockData`.
Represents the different types of Tree block that face a direction.

另请参阅:
  - `Material.LEGACY_LOG`
  - `Material.LEGACY_LOG_2`

- ## 字段概要

  字段
  修饰符和类型
  字段
  说明
  `protected static final BlockFace`
  `DEFAULT_DIRECTION`
  已过时。
  `protected static final Material`
  `DEFAULT_TYPE`
  已过时。

  ### 从类继承的字段 org.bukkit.material.Wood

  `DEFAULT_SPECIES`

- ## 构造器概要

  构造器
  构造器
  说明
  `Tree()`
  已过时。
  Constructs a tree block.
  `Tree(Material type)`
  已过时。
  Constructs a tree block of the given type.
  `Tree(Material type, byte data)`
  已过时。
  Magic value
  `Tree(Material type, TreeSpecies species)`
  已过时。
  Constructs a tree block of the given type and tree species.
  `Tree(Material type, TreeSpecies species, BlockFace dir)`
  已过时。
  Constructs a tree block of the given type and tree species, and facing the given direction.
  `Tree(TreeSpecies species)`
  已过时。
  Constructs a tree block of the given tree species.
  `Tree(TreeSpecies species, BlockFace dir)`
  已过时。
  Constructs a tree block of the given tree species, and facing the given direction.

- ## 方法概要

  修饰符和类型
  方法
  说明
  `Tree`
  `clone()`
  已过时。
  `BlockFace`
  `getDirection()`
  已过时。
  Get direction of the log
  `void`
  `setDirection(BlockFace dir)`
  已过时。
  Set direction of the log
  `String`
  `toString()`
  已过时。

  ### 从类继承的方法 org.bukkit.material.Wood

  `getSpecies, setSpecies`

  ### 从类继承的方法 org.bukkit.material.MaterialData

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

  ### 从类继承的方法 java.lang.Object

  `finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## 字段详细资料

  - ### DEFAULT_TYPE

    protected static final Material DEFAULT_TYPE
    已过时。

  - ### DEFAULT_DIRECTION

    protected static final BlockFace DEFAULT_DIRECTION
    已过时。

- ## 构造器详细资料

  - ### Tree

    public Tree()
    已过时。
    Constructs a tree block.

  - ### Tree

    public Tree(TreeSpecies species)
    已过时。
    Constructs a tree block of the given tree species.
    参数:
      `species` - the species of the tree block

  - ### Tree

    public Tree(TreeSpecies species, BlockFace dir)
    已过时。
    Constructs a tree block of the given tree species, and facing the given direction.
    参数:
      `species` - the species of the tree block
      `dir` - the direction the tree block is facing

  - ### Tree

    public Tree(Material type)
    已过时。
    Constructs a tree block of the given type.
    参数:
      `type` - the type of tree block

  - ### Tree

    public Tree(Material type, TreeSpecies species)
    已过时。
    Constructs a tree block of the given type and tree species.
    参数:
      `type` - the type of tree block
      `species` - the species of the tree block

  - ### Tree

    public Tree(Material type, TreeSpecies species, BlockFace dir)
    已过时。
    Constructs a tree block of the given type and tree species, and facing the given direction.
    参数:
      `type` - the type of tree block
      `species` - the species of the tree block
      `dir` - the direction the tree block is facing

  - ### Tree

    @Deprecated public Tree(Material type, byte data)
    已过时。
    Magic value
    参数:
      `type` - the type
      `data` - the raw data value

- ## 方法详细资料

  - ### getDirection

    public BlockFace getDirection()
    已过时。
    Get direction of the log
    返回:
      one of:
      - BlockFace.TOP for upright (default)
      - BlockFace.NORTH (east-west)
      - BlockFace.WEST (north-south)
      - BlockFace.SELF (directionless)

  - ### setDirection

    public void setDirection(BlockFace dir)
    已过时。
    Set direction of the log
    参数:
      `dir` - - direction of end of log (BlockFace.SELF for no direction)

  - ### toString

    public String toString()
    已过时。
    覆盖:
      `toString` 在类中 `Wood`

  - ### clone

    public Tree clone()
    已过时。
    覆盖:
      `clone` 在类中 `Wood`