Record Class BasicPotInteraction.Properties

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

public static record BasicPotInteraction.Properties(net.minecraft.world.item.crafting.Ingredient heldTest, boolean damageHeld, boolean consumeHeld, Optional<net.minecraft.world.item.crafting.Ingredient> soilTest, Optional<net.minecraft.world.item.crafting.Ingredient> seedTest, Optional<net.minecraft.world.item.ItemStack> newSoil, Optional<net.minecraft.world.item.ItemStack> newSeed, Optional<net.minecraft.resources.ResourceKey<net.minecraft.world.level.storage.loot.LootTable>> extraDrops, Optional<SoundEffect> soundEffect, boolean notifySculk) extends Record
  • Field Summary

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

    Constructors
    Constructor
    Description
    Properties(net.minecraft.world.item.crafting.Ingredient heldTest, boolean damageHeld, boolean consumeHeld, Optional<net.minecraft.world.item.crafting.Ingredient> soilTest, Optional<net.minecraft.world.item.crafting.Ingredient> seedTest, Optional<net.minecraft.world.item.ItemStack> newSoil, Optional<net.minecraft.world.item.ItemStack> newSeed, Optional<net.minecraft.resources.ResourceKey<net.minecraft.world.level.storage.loot.LootTable>> extraDrops, Optional<SoundEffect> soundEffect, boolean notifySculk)
    Creates an instance of a Properties record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Returns the value of the consumeHeld record component.
    boolean
    Returns the value of the damageHeld record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    Optional<net.minecraft.resources.ResourceKey<net.minecraft.world.level.storage.loot.LootTable>>
    Returns the value of the extraDrops record component.
    final int
    Returns a hash code value for this object.
    net.minecraft.world.item.crafting.Ingredient
    Returns the value of the heldTest record component.
    Optional<net.minecraft.world.item.ItemStack>
    Returns the value of the newSeed record component.
    Optional<net.minecraft.world.item.ItemStack>
    Returns the value of the newSoil record component.
    boolean
    Returns the value of the notifySculk record component.
    Optional<net.minecraft.world.item.crafting.Ingredient>
    Returns the value of the seedTest record component.
    Optional<net.minecraft.world.item.crafting.Ingredient>
    Returns the value of the soilTest record component.
    Returns the value of the soundEffect record component.
    final String
    Returns a string representation of this record class.
    boolean
    validateInputs(net.minecraft.world.item.ItemStack held, net.minecraft.world.item.ItemStack soil, net.minecraft.world.item.ItemStack seed)
     

    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 heldTest, boolean damageHeld, boolean consumeHeld, Optional<net.minecraft.world.item.crafting.Ingredient> soilTest, Optional<net.minecraft.world.item.crafting.Ingredient> seedTest, Optional<net.minecraft.world.item.ItemStack> newSoil, Optional<net.minecraft.world.item.ItemStack> newSeed, Optional<net.minecraft.resources.ResourceKey<net.minecraft.world.level.storage.loot.LootTable>> extraDrops, Optional<SoundEffect> soundEffect, boolean notifySculk)
      Creates an instance of a Properties record class.
      Parameters:
      heldTest - the value for the heldTest record component
      damageHeld - the value for the damageHeld record component
      consumeHeld - the value for the consumeHeld record component
      soilTest - the value for the soilTest record component
      seedTest - the value for the seedTest record component
      newSoil - the value for the newSoil record component
      newSeed - the value for the newSeed record component
      extraDrops - the value for the extraDrops record component
      soundEffect - the value for the soundEffect record component
      notifySculk - the value for the notifySculk record component
  • Method Details

    • validateInputs

      public boolean validateInputs(net.minecraft.world.item.ItemStack held, net.minecraft.world.item.ItemStack soil, net.minecraft.world.item.ItemStack seed)
    • 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.
    • heldTest

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

      public boolean damageHeld()
      Returns the value of the damageHeld record component.
      Returns:
      the value of the damageHeld record component
    • consumeHeld

      public boolean consumeHeld()
      Returns the value of the consumeHeld record component.
      Returns:
      the value of the consumeHeld record component
    • soilTest

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

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

      public Optional<net.minecraft.world.item.ItemStack> newSoil()
      Returns the value of the newSoil record component.
      Returns:
      the value of the newSoil record component
    • newSeed

      public Optional<net.minecraft.world.item.ItemStack> newSeed()
      Returns the value of the newSeed record component.
      Returns:
      the value of the newSeed record component
    • extraDrops

      public Optional<net.minecraft.resources.ResourceKey<net.minecraft.world.level.storage.loot.LootTable>> extraDrops()
      Returns the value of the extraDrops record component.
      Returns:
      the value of the extraDrops record component
    • soundEffect

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

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