public class Crops extends MaterialData
限定符和类型 | 字段和说明 |
---|---|
protected static CropState |
DEFAULT_STATE |
protected static Material |
DEFAULT_TYPE |
构造器和说明 |
---|
Crops()
构造一个处于播种阶段的小麦作物方块.
|
Crops(CropState state)
构造一个处于给定生长阶段的小麦作物方块.
|
Crops(int type)
已过时。
不安全的参数
|
Crops(int type,
byte data)
已过时。
不安全的参数
|
Crops(Material type)
构造一个处于播种阶段的给定类型的农作物.
|
Crops(Material type,
byte data)
已过时。
不安全的参数
|
Crops(Material type,
CropState state)
构造一个处于给定生长阶段的给定类型的农作物方块.
|
限定符和类型 | 方法和说明 |
---|---|
Crops |
clone() |
CropState |
getState()
获取这个农作物的生长阶段.
|
void |
setState(CropState state)
设置这个农作物的生长阶段.
|
java.lang.String |
toString() |
equals, getData, getItemType, getItemTypeId, hashCode, setData, toItemStack, toItemStack
protected static final Material DEFAULT_TYPE
protected static final CropState DEFAULT_STATE
public Crops()
原文:Constructs a wheat crop block in the seeded state.
public Crops(CropState state)
原文:Constructs a wheat crop block in the given growth state
state
- 农作物的生长阶段public Crops(Material type, CropState state)
原文:Constructs a crop block of the given type and in the given growth state
type
- 农作物类型state
- 农作物的生长阶段@Deprecated public Crops(int type)
type
- the raw type idpublic Crops(Material type)
原文:Constructs a crop block of the given type and in the seeded state
type
- 农作物类型@Deprecated public Crops(int type, byte data)
type
- the raw type iddata
- the raw data value@Deprecated public Crops(Material type, byte data)
type
- the typedata
- the raw data valuepublic CropState getState()
对于像是甜菜根这样只有四个生长阶段的农作物,只会返回这四个值:SEEDED、SMALL、TALL、RIPE.
原文:Gets the current growth state of this crop For crops with only four growth states such as beetroot, only the values SEEDED, SMALL, TALL and RIPE will be returned.
public void setState(CropState state)
对于像是甜菜根这样只有四个生长阶段的农作物,这8个生长阶段分别映射为这四个阶段: SEEDED, SMALL, TALL 和 RIPE GERMINATED 会改为 SEEDED VERY_SMALL 会改为 SMALL MEDIUM 会改为 TALL VERY_TALL 会改为 RIPE
原文:Sets the growth state of this crop For crops with only four growth states such as beetroot, the 8 CropStates are mapped into four states: SEEDED, SMALL, TALL and RIPE GERMINATED will change to SEEDED VERY_SMALL will change to SMALL MEDIUM will change to TALL VERY_TALL will change to RIPE
state
- 农作物的生长阶段public java.lang.String toString()
toString
在类中 MaterialData
public Crops clone()
clone
在类中 MaterialData