Record Class FallingLeafUtil.LeafParticleData
java.lang.Object
java.lang.Record
net.frozenblock.wilderwild.block.impl.FallingLeafUtil.LeafParticleData
- Enclosing class:
FallingLeafUtil
-
Constructor Summary
ConstructorsConstructorDescriptionLeafParticleData(net.minecraft.world.level.block.Block leavesBlock, float particleChance, Supplier<Double> frequencyModifier, float quadSize, float particleGravityScale) Creates an instance of aLeafParticleDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of thefrequencyModifierrecord component.final inthashCode()Returns a hash code value for this object.net.minecraft.world.level.block.BlockReturns the value of theleavesBlockrecord component.floatReturns the value of theparticleChancerecord component.floatReturns the value of theparticleGravityScalerecord component.floatquadSize()Returns the value of thequadSizerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
LeafParticleData
public LeafParticleData(net.minecraft.world.level.block.Block leavesBlock, float particleChance, Supplier<Double> frequencyModifier, float quadSize, float particleGravityScale) Creates an instance of aLeafParticleDatarecord class.- Parameters:
leavesBlock- the value for theleavesBlockrecord componentparticleChance- the value for theparticleChancerecord componentfrequencyModifier- the value for thefrequencyModifierrecord componentquadSize- the value for thequadSizerecord componentparticleGravityScale- the value for theparticleGravityScalerecord 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 '=='. -
leavesBlock
public net.minecraft.world.level.block.Block leavesBlock()Returns the value of theleavesBlockrecord component.- Returns:
- the value of the
leavesBlockrecord component
-
particleChance
public float particleChance()Returns the value of theparticleChancerecord component.- Returns:
- the value of the
particleChancerecord component
-
frequencyModifier
Returns the value of thefrequencyModifierrecord component.- Returns:
- the value of the
frequencyModifierrecord component
-
quadSize
public float quadSize()Returns the value of thequadSizerecord component.- Returns:
- the value of the
quadSizerecord component
-
particleGravityScale
public float particleGravityScale()Returns the value of theparticleGravityScalerecord component.- Returns:
- the value of the
particleGravityScalerecord component
-