Record Class BasicFertilizer.Properties

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

public static record BasicFertilizer.Properties(net.minecraft.world.item.crafting.Ingredient heldItem, Optional<net.minecraft.world.item.crafting.Ingredient> soilIngredient, Optional<net.minecraft.world.item.crafting.Ingredient> seedIngredient, GrowthAmount growthAmount, int cooldown, boolean spawnsParticles, boolean notifySculk, Optional<SoundEffect> soundEffect) extends Record
  • Field Summary

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

    Constructors
    Constructor
    Description
    Properties(net.minecraft.world.item.crafting.Ingredient heldItem, Optional<net.minecraft.world.item.crafting.Ingredient> soilIngredient, Optional<net.minecraft.world.item.crafting.Ingredient> seedIngredient, GrowthAmount growthAmount, int cooldown, boolean spawnsParticles, boolean notifySculk, Optional<SoundEffect> soundEffect)
    Creates an instance of a Properties record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the value of the cooldown record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    Returns the value of the growthAmount record component.
    final int
    Returns a hash code value for this object.
    net.minecraft.world.item.crafting.Ingredient
    Returns the value of the heldItem record component.
    boolean
    Returns the value of the notifySculk record component.
    Optional<net.minecraft.world.item.crafting.Ingredient>
    Returns the value of the seedIngredient record component.
    Optional<net.minecraft.world.item.crafting.Ingredient>
    Returns the value of the soilIngredient record component.
    Returns the value of the soundEffect record component.
    boolean
    Returns the value of the spawnsParticles record component.
    final String
    Returns a string representation of this record class.

    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.item.crafting.Ingredient heldItem, Optional<net.minecraft.world.item.crafting.Ingredient> soilIngredient, Optional<net.minecraft.world.item.crafting.Ingredient> seedIngredient, GrowthAmount growthAmount, int cooldown, boolean spawnsParticles, boolean notifySculk, Optional<SoundEffect> soundEffect)
      Creates an instance of a Properties record class.
      Parameters:
      heldItem - the value for the heldItem record component
      soilIngredient - the value for the soilIngredient record component
      seedIngredient - the value for the seedIngredient record component
      growthAmount - the value for the growthAmount record component
      cooldown - the value for the cooldown record component
      spawnsParticles - the value for the spawnsParticles record component
      notifySculk - the value for the notifySculk record component
      soundEffect - the value for the soundEffect record component
  • Method Details

    • 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.
    • heldItem

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

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

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

      public GrowthAmount growthAmount()
      Returns the value of the growthAmount record component.
      Returns:
      the value of the growthAmount record component
    • cooldown

      public int cooldown()
      Returns the value of the cooldown record component.
      Returns:
      the value of the cooldown record component
    • spawnsParticles

      public boolean spawnsParticles()
      Returns the value of the spawnsParticles record component.
      Returns:
      the value of the spawnsParticles record component
    • notifySculk

      public boolean notifySculk()
      Returns the value of the notifySculk record component.
      Returns:
      the value of the notifySculk record component
    • soundEffect

      public Optional<SoundEffect> soundEffect()
      Returns the value of the soundEffect record component.
      Returns:
      the value of the soundEffect record component