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
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<BasicPotInteraction.Properties> static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, BasicPotInteraction.Properties> -
Constructor Summary
ConstructorsConstructorDescriptionProperties(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 aPropertiesrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of theconsumeHeldrecord component.booleanReturns the value of thedamageHeldrecord component.final booleanIndicates 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 theextraDropsrecord component.final inthashCode()Returns a hash code value for this object.net.minecraft.world.item.crafting.IngredientheldTest()Returns the value of theheldTestrecord component.Optional<net.minecraft.world.item.ItemStack> newSeed()Returns the value of thenewSeedrecord component.Optional<net.minecraft.world.item.ItemStack> newSoil()Returns the value of thenewSoilrecord component.booleanReturns the value of thenotifySculkrecord component.Optional<net.minecraft.world.item.crafting.Ingredient> seedTest()Returns the value of theseedTestrecord component.Optional<net.minecraft.world.item.crafting.Ingredient> soilTest()Returns the value of thesoilTestrecord component.Returns the value of thesoundEffectrecord component.final StringtoString()Returns a string representation of this record class.booleanvalidateInputs(net.minecraft.world.item.ItemStack held, net.minecraft.world.item.ItemStack soil, net.minecraft.world.item.ItemStack seed)
-
Field Details
-
CODEC
-
STREAM
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,BasicPotInteraction.Properties> STREAM
-
-
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 aPropertiesrecord class.- Parameters:
heldTest- the value for theheldTestrecord componentdamageHeld- the value for thedamageHeldrecord componentconsumeHeld- the value for theconsumeHeldrecord componentsoilTest- the value for thesoilTestrecord componentseedTest- the value for theseedTestrecord componentnewSoil- the value for thenewSoilrecord componentnewSeed- the value for thenewSeedrecord componentextraDrops- the value for theextraDropsrecord componentsoundEffect- the value for thesoundEffectrecord componentnotifySculk- the value for thenotifySculkrecord 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
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
heldTest
public net.minecraft.world.item.crafting.Ingredient heldTest()Returns the value of theheldTestrecord component.- Returns:
- the value of the
heldTestrecord component
-
damageHeld
public boolean damageHeld()Returns the value of thedamageHeldrecord component.- Returns:
- the value of the
damageHeldrecord component
-
consumeHeld
public boolean consumeHeld()Returns the value of theconsumeHeldrecord component.- Returns:
- the value of the
consumeHeldrecord component
-
soilTest
Returns the value of thesoilTestrecord component.- Returns:
- the value of the
soilTestrecord component
-
seedTest
Returns the value of theseedTestrecord component.- Returns:
- the value of the
seedTestrecord component
-
newSoil
Returns the value of thenewSoilrecord component.- Returns:
- the value of the
newSoilrecord component
-
newSeed
Returns the value of thenewSeedrecord component.- Returns:
- the value of the
newSeedrecord component
-
extraDrops
public Optional<net.minecraft.resources.ResourceKey<net.minecraft.world.level.storage.loot.LootTable>> extraDrops()Returns the value of theextraDropsrecord component.- Returns:
- the value of the
extraDropsrecord component
-
soundEffect
Returns the value of thesoundEffectrecord component.- Returns:
- the value of the
soundEffectrecord component
-
notifySculk
public boolean notifySculk()Returns the value of thenotifySculkrecord component.- Returns:
- the value of the
notifySculkrecord component
-