Record Class AdditiveRandomVertexFunction
java.lang.Object
java.lang.Record
dev.latvian.mods.klib.vertex.function.AdditiveRandomVertexFunction
- All Implemented Interfaces:
VertexFunction,Consumer<org.joml.Vector3f>
public record AdditiveRandomVertexFunction(net.minecraft.util.RandomSource random, float range)
extends Record
implements VertexFunction
-
Constructor Summary
ConstructorsConstructorDescriptionAdditiveRandomVertexFunction(long seed, float range) AdditiveRandomVertexFunction(long seedLo, long seedHi, float range) AdditiveRandomVertexFunction(net.minecraft.util.RandomSource random, float range) Creates an instance of aAdditiveRandomVertexFunctionrecord 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.net.minecraft.util.RandomSourcerandom()Returns the value of therandomrecord component.floatrange()Returns the value of therangerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
AdditiveRandomVertexFunction
public AdditiveRandomVertexFunction(long seed, float range) -
AdditiveRandomVertexFunction
public AdditiveRandomVertexFunction(long seedLo, long seedHi, float range) -
AdditiveRandomVertexFunction
public AdditiveRandomVertexFunction(net.minecraft.util.RandomSource random, float range) Creates an instance of aAdditiveRandomVertexFunctionrecord class.- Parameters:
random- the value for therandomrecord componentrange- the value for therangerecord 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
-
range
public float range()Returns the value of therangerecord component.- Returns:
- the value of the
rangerecord component
-