Record Class BlockDerivedCrop.Properties

java.lang.Object
java.lang.Record
net.darkhax.botanypots.common.impl.data.recipe.crop.BlockDerivedCrop.Properties
Enclosing class:
BlockDerivedCrop

public static record BlockDerivedCrop.Properties(net.minecraft.world.level.block.Block block, Optional<net.minecraft.world.item.crafting.Ingredient> seed, net.minecraft.world.item.crafting.Ingredient soil, int growTime, Optional<List<Display>> display, int lightLevel, Optional<List<ItemDropProvider>> drops, Optional<BasicOptions> renderOptions, Optional<net.minecraft.resources.ResourceLocation> functionId) extends Record
  • Field Details

  • Constructor Details

    • Properties

      public Properties(net.minecraft.world.level.block.Block block, Optional<net.minecraft.world.item.crafting.Ingredient> seed, net.minecraft.world.item.crafting.Ingredient soil, int growTime, Optional<List<Display>> display, int lightLevel, Optional<List<ItemDropProvider>> drops, Optional<BasicOptions> renderOptions, Optional<net.minecraft.resources.ResourceLocation> functionId)
      Creates an instance of a Properties record class.
      Parameters:
      block - the value for the block record component
      seed - the value for the seed record component
      soil - the value for the soil record component
      growTime - the value for the growTime record component
      display - the value for the display record component
      lightLevel - the value for the lightLevel record component
      drops - the value for the drops record component
      renderOptions - the value for the renderOptions record component
      functionId - the value for the functionId record component
  • Method Details

    • toBasic

      public BasicCrop.Properties toBasic()
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • block

      public net.minecraft.world.level.block.Block block()
      Returns the value of the block record component.
      Returns:
      the value of the block record component
    • seed

      public Optional<net.minecraft.world.item.crafting.Ingredient> seed()
      Returns the value of the seed record component.
      Returns:
      the value of the seed record component
    • soil

      public net.minecraft.world.item.crafting.Ingredient soil()
      Returns the value of the soil record component.
      Returns:
      the value of the soil record component
    • growTime

      public int growTime()
      Returns the value of the growTime record component.
      Returns:
      the value of the growTime record component
    • display

      public Optional<List<Display>> display()
      Returns the value of the display record component.
      Returns:
      the value of the display record component
    • lightLevel

      public int lightLevel()
      Returns the value of the lightLevel record component.
      Returns:
      the value of the lightLevel record component
    • drops

      public Optional<List<ItemDropProvider>> drops()
      Returns the value of the drops record component.
      Returns:
      the value of the drops record component
    • renderOptions

      public Optional<BasicOptions> renderOptions()
      Returns the value of the renderOptions record component.
      Returns:
      the value of the renderOptions record component
    • functionId

      public Optional<net.minecraft.resources.ResourceLocation> functionId()
      Returns the value of the functionId record component.
      Returns:
      the value of the functionId record component