Record Class BasicCrop.Properties
java.lang.Object
java.lang.Record
net.darkhax.botanypots.common.impl.data.recipe.crop.BasicCrop.Properties
- Enclosing class:
BasicCrop
public static record BasicCrop.Properties(net.minecraft.world.item.crafting.Ingredient input, net.minecraft.world.item.crafting.Ingredient soil, int growTime, List<Display> display, int lightLevel, List<ItemDropProvider> drops, Optional<net.minecraft.resources.ResourceLocation> functionId)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<BasicCrop.Properties> static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, BasicCrop.Properties> -
Constructor Summary
ConstructorsConstructorDescriptionProperties(net.minecraft.world.item.crafting.Ingredient input, net.minecraft.world.item.crafting.Ingredient soil, int growTime, List<Display> display, int lightLevel, List<ItemDropProvider> drops, Optional<net.minecraft.resources.ResourceLocation> functionId) Creates an instance of aPropertiesrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondisplay()Returns the value of thedisplayrecord component.drops()Returns the value of thedropsrecord component.final booleanIndicates whether some other object is "equal to" this one.Optional<net.minecraft.resources.ResourceLocation> Returns the value of thefunctionIdrecord component.intgrowTime()Returns the value of thegrowTimerecord component.final inthashCode()Returns a hash code value for this object.net.minecraft.world.item.crafting.Ingredientinput()Returns the value of theinputrecord component.intReturns the value of thelightLevelrecord component.net.minecraft.world.item.crafting.Ingredientsoil()Returns the value of thesoilrecord 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,BasicCrop.Properties> STREAM
-
-
Constructor Details
-
Properties
public Properties(net.minecraft.world.item.crafting.Ingredient input, net.minecraft.world.item.crafting.Ingredient soil, int growTime, List<Display> display, int lightLevel, List<ItemDropProvider> drops, Optional<net.minecraft.resources.ResourceLocation> functionId) Creates an instance of aPropertiesrecord class.- Parameters:
input- the value for theinputrecord componentsoil- the value for thesoilrecord componentgrowTime- the value for thegrowTimerecord componentdisplay- the value for thedisplayrecord componentlightLevel- the value for thelightLevelrecord componentdrops- the value for thedropsrecord componentfunctionId- the value for thefunctionIdrecord 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 '=='. -
input
public net.minecraft.world.item.crafting.Ingredient input()Returns the value of theinputrecord component.- Returns:
- the value of the
inputrecord component
-
soil
public net.minecraft.world.item.crafting.Ingredient soil()Returns the value of thesoilrecord component.- Returns:
- the value of the
soilrecord component
-
growTime
public int growTime()Returns the value of thegrowTimerecord component.- Returns:
- the value of the
growTimerecord component
-
display
Returns the value of thedisplayrecord component.- Returns:
- the value of the
displayrecord component
-
lightLevel
public int lightLevel()Returns the value of thelightLevelrecord component.- Returns:
- the value of the
lightLevelrecord component
-
drops
Returns the value of thedropsrecord component.- Returns:
- the value of the
dropsrecord component
-
functionId
Returns the value of thefunctionIdrecord component.- Returns:
- the value of the
functionIdrecord component
-