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, int minGrowth, int maxGrowth, int cooldown, boolean spawnsParticles, boolean notifySculk, Optional<SoundEffect> soundEffect)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<BasicFertilizer.Properties> static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, BasicFertilizer.Properties> -
Constructor Summary
ConstructorsConstructorDescriptionProperties(net.minecraft.world.item.crafting.Ingredient heldItem, Optional<net.minecraft.world.item.crafting.Ingredient> soilIngredient, Optional<net.minecraft.world.item.crafting.Ingredient> seedIngredient, int minGrowth, int maxGrowth, int cooldown, boolean spawnsParticles, boolean notifySculk, Optional<SoundEffect> soundEffect) Creates an instance of aPropertiesrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintcooldown()Returns the value of thecooldownrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.net.minecraft.world.item.crafting.IngredientheldItem()Returns the value of theheldItemrecord component.intReturns the value of themaxGrowthrecord component.intReturns the value of theminGrowthrecord component.booleanReturns the value of thenotifySculkrecord component.Optional<net.minecraft.world.item.crafting.Ingredient> Returns the value of theseedIngredientrecord component.Optional<net.minecraft.world.item.crafting.Ingredient> Returns the value of thesoilIngredientrecord component.Returns the value of thesoundEffectrecord component.booleanReturns the value of thespawnsParticlesrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
CODEC
-
STREAM
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,BasicFertilizer.Properties> STREAM
-
-
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, int minGrowth, int maxGrowth, int cooldown, boolean spawnsParticles, boolean notifySculk, Optional<SoundEffect> soundEffect) Creates an instance of aPropertiesrecord class.- Parameters:
heldItem- the value for theheldItemrecord componentsoilIngredient- the value for thesoilIngredientrecord componentseedIngredient- the value for theseedIngredientrecord componentminGrowth- the value for theminGrowthrecord componentmaxGrowth- the value for themaxGrowthrecord componentcooldown- the value for thecooldownrecord componentspawnsParticles- the value for thespawnsParticlesrecord componentnotifySculk- the value for thenotifySculkrecord componentsoundEffect- the value for thesoundEffectrecord component
-
-
Method Details
-
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 '=='. -
heldItem
public net.minecraft.world.item.crafting.Ingredient heldItem()Returns the value of theheldItemrecord component.- Returns:
- the value of the
heldItemrecord component
-
soilIngredient
Returns the value of thesoilIngredientrecord component.- Returns:
- the value of the
soilIngredientrecord component
-
seedIngredient
Returns the value of theseedIngredientrecord component.- Returns:
- the value of the
seedIngredientrecord component
-
minGrowth
public int minGrowth()Returns the value of theminGrowthrecord component.- Returns:
- the value of the
minGrowthrecord component
-
maxGrowth
public int maxGrowth()Returns the value of themaxGrowthrecord component.- Returns:
- the value of the
maxGrowthrecord component
-
cooldown
public int cooldown()Returns the value of thecooldownrecord component.- Returns:
- the value of the
cooldownrecord component
-
spawnsParticles
public boolean spawnsParticles()Returns the value of thespawnsParticlesrecord component.- Returns:
- the value of the
spawnsParticlesrecord component
-
notifySculk
public boolean notifySculk()Returns the value of thenotifySculkrecord component.- Returns:
- the value of the
notifySculkrecord component
-
soundEffect
Returns the value of thesoundEffectrecord component.- Returns:
- the value of the
soundEffectrecord component
-