Record Class BlockDerivedSoil.BlockProperties

java.lang.Object
java.lang.Record
net.darkhax.botanypots.common.impl.data.recipe.soil.BlockDerivedSoil.BlockProperties
Enclosing class:
BlockDerivedSoil

public static record BlockDerivedSoil.BlockProperties(net.minecraft.world.level.block.Block block, Optional<net.minecraft.world.item.crafting.Ingredient> input, Optional<Display> display, float growthModifier, int lightLevel, Optional<BasicOptions> renderOptions) extends Record
  • Field Details

  • Constructor Details

    • BlockProperties

      public BlockProperties(net.minecraft.world.level.block.Block block, Optional<net.minecraft.world.item.crafting.Ingredient> input, Optional<Display> display, float growthModifier, int lightLevel, Optional<BasicOptions> renderOptions)
      Creates an instance of a BlockProperties record class.
      Parameters:
      block - the value for the block record component
      input - the value for the input record component
      display - the value for the display record component
      growthModifier - the value for the growthModifier record component
      lightLevel - the value for the lightLevel record component
      renderOptions - the value for the renderOptions record component
  • Method Details

    • toBasic

      public BasicSoil.Properties toBasic()
    • fromBasic

      public static BlockDerivedSoil.BlockProperties fromBasic(net.minecraft.world.level.block.Block block, BasicSoil.Properties properties)
    • 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
    • input

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

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

      public float growthModifier()
      Returns the value of the growthModifier record component.
      Returns:
      the value of the growthModifier record component
    • lightLevel

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

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