public class Tree extends Wood
Material.LOG
,
Material.LOG_2
限定符和类型 | 字段和说明 |
---|---|
protected static BlockFace |
DEFAULT_DIRECTION |
protected static Material |
DEFAULT_TYPE |
DEFAULT_SPECIES
构造器和说明 |
---|
Tree()
构造一个树木方块.
|
Tree(int type)
已过时。
不安全的参数
|
Tree(int type,
byte data)
已过时。
不安全的参数
|
Tree(Material type)
Constructs a tree block of the given type.
|
Tree(Material type,
byte data)
已过时。
不安全的参数
|
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()
获取木头的朝向.
|
void |
setDirection(BlockFace dir)
设置木头的朝向.
|
java.lang.String |
toString() |
getSpecies, setSpecies
equals, getData, getItemType, getItemTypeId, hashCode, setData, toItemStack, toItemStack
protected static final Material DEFAULT_TYPE
protected static final BlockFace DEFAULT_DIRECTION
public Tree()
原文:Constructs a tree block.
public Tree(TreeSpecies species)
species
- the species of the tree blockpublic Tree(TreeSpecies species, BlockFace dir)
species
- the species of the tree blockdir
- the direction the tree block is facing@Deprecated public Tree(int type)
type
- the raw type idpublic Tree(Material type)
type
- the type of tree blockpublic Tree(Material type, TreeSpecies species)
type
- the type of tree blockspecies
- the species of the tree blockpublic Tree(Material type, TreeSpecies species, BlockFace dir)
type
- the type of tree blockspecies
- the species of the tree blockdir
- the direction the tree block is facing@Deprecated public Tree(int type, byte data)
type
- the raw type iddata
- the raw data value@Deprecated public Tree(Material type, byte data)
type
- the typedata
- the raw data valuepublic BlockFace getDirection()
原文:Get direction of the log
public void setDirection(BlockFace dir)
原文:Set direction of the log
dir
- - 木头一端的朝向,BlockFace.SELF 即为无朝向(仅树皮)