类 Crops

所有已实现的接口:
Cloneable

@Deprecated(since="1.14.1") public class Crops extends MaterialData
已过时。
所有 MaterialData 的用法均已弃用并可能被移除。 请使用 BlockData。
代表处于不同生长阶段的不同类型的作物。
另请参阅:
  • 字段详细资料

    • DEFAULT_TYPE

      protected static final Material DEFAULT_TYPE
      已过时。
    • DEFAULT_STATE

      protected static final CropState DEFAULT_STATE
      已过时。
  • 构造器详细资料

    • Crops

      public Crops()
      已过时。
      构造一个处于播种状态的小麦作物方块。

      原文:Constructs a wheat crop block in the seeded state.

    • Crops

      public Crops(CropState state)
      已过时。
      构造一个处于给定生长状态的小麦作物方块。
      参数:
      state - 作物的生长状态

      原文:Constructs a wheat crop block in the given growth state

    • Crops

      public Crops(Material type, CropState state)
      已过时。
      构造一个给定类型且处于给定生长状态的作物方块。
      参数:
      type - 作物的类型
      state - 作物的生长状态

      原文:Constructs a crop block of the given type and in the given growth state

    • Crops

      public Crops(Material type)
      已过时。
      构造一个给定类型且处于播种状态的作物方块。
      参数:
      type - 作物的类型

      原文:Constructs a crop block of the given type and in the seeded state

    • Crops

      @Deprecated(since="1.6.2") public Crops(Material type, byte data)
      已过时。
      魔法值
      参数:
      type - 类型
      data - 原始数据值
  • 方法详细资料

    • getState

      public CropState getState()
      已过时。
      获取此作物的当前生长状态。 对于只有四个生长阶段的作物(如甜菜根),只会返回 SEEDED、SMALL、TALL 和 RIPE。
      返回:
      此作物的 CropState

      原文:Gets the current growth state of this crop

    • setState

      public void setState(CropState state)
      已过时。
      设置此作物的生长状态。 对于只有四个生长阶段的作物(如甜菜根),8 个 CropState 会被映射为四个状态: SEEDED、SMALL、TALL 和 RIPE GERMINATED 会变为 SEEDED VERY_SMALL 会变为 SMALL MEDIUM 会变为 TALL VERY_TALL 会变为 RIPE
      参数:
      state - 此作物的新生长状态

      原文:Sets the growth state of this crop

    • toString

      public String toString()
      已过时。
      覆盖:
      toString 在类中 MaterialData
    • clone

      public Crops clone()
      已过时。
      覆盖:
      clone 在类中 MaterialData