Class Crops

All Implemented Interfaces:
Cloneable

@Deprecated(forRemoval=true, since="1.13") public class Crops extends MaterialData
Deprecated, for removal: This API element is subject to removal in a future version.
all usage of MaterialData is deprecated and subject to removal. Use BlockData.
Represents the different types of crops in different states of growth.
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected static final CropState
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    protected static final Material
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
    Constructs a wheat crop block in the seeded state.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Constructs a wheat crop block in the given growth state
    Deprecated, for removal: This API element is subject to removal in a future version.
    Constructs a crop block of the given type and in the seeded state
    Crops(Material type, byte data)
    Deprecated.
    Magic value
    Crops(Material type, CropState state)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Constructs a crop block of the given type and in the given growth state
  • Method Summary

    Modifier and Type
    Method
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
    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.
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
    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
    Deprecated, for removal: This API element is subject to removal in a future version.
     

    Methods inherited from class org.bukkit.material.MaterialData

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

    Methods inherited from class java.lang.Object

    finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • DEFAULT_TYPE

      protected static final Material DEFAULT_TYPE
      Deprecated, for removal: This API element is subject to removal in a future version.
    • DEFAULT_STATE

      protected static final CropState DEFAULT_STATE
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Constructor Details

    • Crops

      public Crops()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Constructs a wheat crop block in the seeded state.
    • Crops

      public Crops(CropState state)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Constructs a wheat crop block in the given growth state
      Parameters:
      state - The growth state of the crops
    • Crops

      public Crops(Material type, CropState state)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Constructs a crop block of the given type and in the given growth state
      Parameters:
      type - The type of crops
      state - The growth state of the crops
    • Crops

      public Crops(Material type)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Constructs a crop block of the given type and in the seeded state
      Parameters:
      type - The type of crops
    • Crops

      @Deprecated public Crops(Material type, byte data)
      Deprecated.
      Magic value
      Parameters:
      type - the type
      data - the raw data value
  • Method Details

    • getState

      public CropState getState()
      Deprecated, for removal: This API element is subject to removal in a future version.
      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.
      Returns:
      CropState of this crop
    • setState

      public void setState(CropState state)
      Deprecated, for removal: This API element is subject to removal in a future version.
      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
      Parameters:
      state - New growth state of this crop
    • toString

      public String toString()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      toString in class MaterialData
    • clone

      public Crops clone()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      clone in class MaterialData