Record Class BlockDerivedCrop.Properties
java.lang.Object
java.lang.Record
net.darkhax.botanypots.common.impl.data.recipe.crop.BlockDerivedCrop.Properties
- Enclosing class:
BlockDerivedCrop
public static record BlockDerivedCrop.Properties(net.minecraft.world.level.block.Block block, Optional<net.minecraft.world.item.crafting.Ingredient> seed, net.minecraft.world.item.crafting.Ingredient soil, int growTime, Optional<List<Display>> display, int lightLevel, Optional<List<ItemDropProvider>> drops, Optional<BasicOptions> renderOptions, Optional<net.minecraft.resources.ResourceLocation> functionId)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<BlockDerivedCrop.Properties> static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, BlockDerivedCrop.Properties> -
Constructor Summary
ConstructorsConstructorDescriptionProperties(net.minecraft.world.level.block.Block block, Optional<net.minecraft.world.item.crafting.Ingredient> seed, net.minecraft.world.item.crafting.Ingredient soil, int growTime, Optional<List<Display>> display, int lightLevel, Optional<List<ItemDropProvider>> drops, Optional<BasicOptions> renderOptions, Optional<net.minecraft.resources.ResourceLocation> functionId) Creates an instance of aPropertiesrecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.level.block.Blockblock()Returns the value of theblockrecord component.display()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.intReturns the value of thelightLevelrecord component.Returns the value of therenderOptionsrecord component.Optional<net.minecraft.world.item.crafting.Ingredient> seed()Returns the value of theseedrecord component.net.minecraft.world.item.crafting.Ingredientsoil()Returns the value of thesoilrecord component.toBasic()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,BlockDerivedCrop.Properties> STREAM
-
-
Constructor Details
-
Properties
public Properties(net.minecraft.world.level.block.Block block, Optional<net.minecraft.world.item.crafting.Ingredient> seed, net.minecraft.world.item.crafting.Ingredient soil, int growTime, Optional<List<Display>> display, int lightLevel, Optional<List<ItemDropProvider>> drops, Optional<BasicOptions> renderOptions, Optional<net.minecraft.resources.ResourceLocation> functionId) Creates an instance of aPropertiesrecord class.- Parameters:
block- the value for theblockrecord componentseed- the value for theseedrecord 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 componentrenderOptions- the value for therenderOptionsrecord componentfunctionId- the value for thefunctionIdrecord component
-
-
Method Details
-
toBasic
-
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 '=='. -
block
public net.minecraft.world.level.block.Block block()Returns the value of theblockrecord component.- Returns:
- the value of the
blockrecord component
-
seed
Returns the value of theseedrecord component.- Returns:
- the value of the
seedrecord 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
-
renderOptions
Returns the value of therenderOptionsrecord component.- Returns:
- the value of the
renderOptionsrecord component
-
functionId
Returns the value of thefunctionIdrecord component.- Returns:
- the value of the
functionIdrecord component
-