Record Class BlockDerivedSoil.BlockProperties
java.lang.Object
java.lang.Record
net.darkhax.botanypots.common.impl.data.recipe.soil.BlockDerivedSoil.BlockProperties
- Enclosing class:
BlockDerivedSoil
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<BlockDerivedSoil.BlockProperties> static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, BlockDerivedSoil.BlockProperties> -
Constructor Summary
ConstructorsConstructorDescriptionBlockProperties(net.minecraft.world.level.block.Block block, Optional<net.minecraft.world.item.crafting.Ingredient> input, Optional<Display> display, float growthModifier, int lightLevel, Optional<BasicOptions> renderOptions, float dropModifier) Creates an instance of aBlockPropertiesrecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.level.block.Blockblock()Returns the value of theblockrecord component.display()Returns the value of thedisplayrecord component.floatReturns the value of thedropModifierrecord component.final booleanIndicates whether some other object is "equal to" this one.fromBasic(net.minecraft.world.level.block.Block block, BasicSoil.Properties properties) floatReturns the value of thegrowthModifierrecord component.final inthashCode()Returns a hash code value for this object.Optional<net.minecraft.world.item.crafting.Ingredient> input()Returns the value of theinputrecord component.intReturns the value of thelightLevelrecord component.Returns the value of therenderOptionsrecord 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,BlockDerivedSoil.BlockProperties> STREAM
-
-
Constructor Details
-
BlockProperties
public BlockProperties(net.minecraft.world.level.block.Block block, Optional<net.minecraft.world.item.crafting.Ingredient> input, Optional<Display> display, float growthModifier, int lightLevel, Optional<BasicOptions> renderOptions, float dropModifier) Creates an instance of aBlockPropertiesrecord class.- Parameters:
block- the value for theblockrecord componentinput- the value for theinputrecord componentdisplay- the value for thedisplayrecord componentgrowthModifier- the value for thegrowthModifierrecord componentlightLevel- the value for thelightLevelrecord componentrenderOptions- the value for therenderOptionsrecord componentdropModifier- the value for thedropModifierrecord component
-
-
Method Details
-
toBasic
-
fromBasic
public static BlockDerivedSoil.BlockProperties fromBasic(net.minecraft.world.level.block.Block block, BasicSoil.Properties properties) -
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
-
input
Returns the value of theinputrecord component.- Returns:
- the value of the
inputrecord component
-
display
Returns the value of thedisplayrecord component.- Returns:
- the value of the
displayrecord component
-
growthModifier
public float growthModifier()Returns the value of thegrowthModifierrecord component.- Returns:
- the value of the
growthModifierrecord component
-
lightLevel
public int lightLevel()Returns the value of thelightLevelrecord component.- Returns:
- the value of the
lightLevelrecord component
-
renderOptions
Returns the value of therenderOptionsrecord component.- Returns:
- the value of the
renderOptionsrecord component
-
dropModifier
public float dropModifier()Returns the value of thedropModifierrecord component.- Returns:
- the value of the
dropModifierrecord component
-