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, Optional<net.minecraft.advancements.critereon.BlockPredicate> potPredicate, float baseYield, float yieldScale) extends Record
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final com.mojang.serialization.MapCodec<BlockDerivedCrop.Properties>
     
    static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,BlockDerivedCrop.Properties>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    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, Optional<net.minecraft.advancements.critereon.BlockPredicate> potPredicate, float baseYield, float yieldScale)
    Creates an instance of a Properties record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    float
    Returns the value of the baseYield record component.
    net.minecraft.world.level.block.Block
    Returns the value of the block record component.
    Returns the value of the display record component.
    Returns the value of the drops record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    Optional<net.minecraft.resources.ResourceLocation>
    Returns the value of the functionId record component.
    static net.minecraft.world.item.Item
    getSeed(net.minecraft.world.level.block.Block block)
     
    int
    Returns the value of the growTime record component.
    final int
    Returns a hash code value for this object.
    int
    Returns the value of the lightLevel record component.
    Optional<net.minecraft.advancements.critereon.BlockPredicate>
    Returns the value of the potPredicate record component.
    Returns the value of the renderOptions record component.
    Optional<net.minecraft.world.item.crafting.Ingredient>
    Returns the value of the seed record component.
    net.minecraft.world.item.crafting.Ingredient
    Returns the value of the soil record component.
     
    final String
    Returns a string representation of this record class.
    float
    Returns the value of the yieldScale record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • 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, Optional<net.minecraft.advancements.critereon.BlockPredicate> potPredicate, float baseYield, float yieldScale)
      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
      potPredicate - the value for the potPredicate record component
      baseYield - the value for the baseYield record component
      yieldScale - the value for the yieldScale record component
  • Method Details

    • toBasic

      public BasicCrop.Properties toBasic()
    • getSeed

      public static net.minecraft.world.item.Item getSeed(net.minecraft.world.level.block.Block block)
    • 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
    • potPredicate

      public Optional<net.minecraft.advancements.critereon.BlockPredicate> potPredicate()
      Returns the value of the potPredicate record component.
      Returns:
      the value of the potPredicate record component
    • baseYield

      public float baseYield()
      Returns the value of the baseYield record component.
      Returns:
      the value of the baseYield record component
    • yieldScale

      public float yieldScale()
      Returns the value of the yieldScale record component.
      Returns:
      the value of the yieldScale record component