类 Tree

所有已实现的接口:
Cloneable

public class Tree extends Wood
Represents the different types of Tree block that face a direction.
另请参阅:
  • 字段详细资料

    • 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

      @Deprecated public Tree(int type)
      已过时。
      不安全的参数
      参数:
      type - the raw type id
    • 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(int type, byte data)
      已过时。
      不安全的参数
      参数:
      type - the raw type id
      data - the raw data value
    • Tree

      @Deprecated public Tree(Material type, byte data)
      已过时。
      不安全的参数
      参数:
      type - the type
      data - the raw data value
  • 方法详细资料

    • getDirection

      public BlockFace getDirection()
      获取木头的朝向.

      原文:Get direction of the log

      返回:
      其中之一:
      • BlockFace.TOP 直立 (默认)
      • BlockFace.NORTH (东西朝向)
      • BlockFace.WEST (南北朝向)
      • BlockFace.SELF 无朝向 (仅树皮)
    • setDirection

      public void setDirection(BlockFace dir)
      设置木头的朝向.

      原文:Set direction of the log

      参数:
      dir - - 木头一端的朝向,BlockFace.SELF 即为无朝向(仅树皮)
    • toString

      public String toString()
      覆盖:
      toString 在类中 Wood
    • clone

      public Tree clone()
      覆盖:
      clone 在类中 Wood