Record Class MultiplicativeRandomVertexFunction
java.lang.Object
java.lang.Record
dev.latvian.mods.klib.vertex.function.MultiplicativeRandomVertexFunction
- All Implemented Interfaces:
VertexFunction,Consumer<org.joml.Vector3f>
public record MultiplicativeRandomVertexFunction(net.minecraft.util.RandomSource random, float mod)
extends Record
implements VertexFunction
-
Constructor Summary
ConstructorsConstructorDescriptionMultiplicativeRandomVertexFunction(long seed, float mod) MultiplicativeRandomVertexFunction(long seedLo, long seedHi, float mod) MultiplicativeRandomVertexFunction(net.minecraft.util.RandomSource random, float mod) Creates an instance of aMultiplicativeRandomVertexFunctionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(org.joml.Vector3f v) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.floatmod()Returns the value of themodrecord component.net.minecraft.util.RandomSourcerandom()Returns the value of therandomrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
MultiplicativeRandomVertexFunction
public MultiplicativeRandomVertexFunction(long seed, float mod) -
MultiplicativeRandomVertexFunction
public MultiplicativeRandomVertexFunction(long seedLo, long seedHi, float mod) -
MultiplicativeRandomVertexFunction
public MultiplicativeRandomVertexFunction(net.minecraft.util.RandomSource random, float mod) Creates an instance of aMultiplicativeRandomVertexFunctionrecord class.- Parameters:
random- the value for therandomrecord componentmod- the value for themodrecord component
-
-
Method Details
-
accept
public void accept(org.joml.Vector3f v) -
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 '=='. -
random
public net.minecraft.util.RandomSource random()Returns the value of therandomrecord component.- Returns:
- the value of the
randomrecord component
-
mod
public float mod()Returns the value of themodrecord component.- Returns:
- the value of the
modrecord component
-