Record Class PowFunction.ConstBaseSampler
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.densityfunction.op.PowFunction.ConstBaseSampler
- All Implemented Interfaces:
DensitySampler
- Enclosing class:
PowFunction
private static record PowFunction.ConstBaseSampler(double base, DensitySampler exponent)
extends Record
implements DensitySampler
-
Nested Class Summary
Nested classes/interfaces inherited from interface DensitySampler
DensitySampler.Bound -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final doubleThe field for thebaserecord component.private final DensitySamplerThe field for theexponentrecord component. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateConstBaseSampler(double base, DensitySampler exponent) Creates an instance of aConstBaseSamplerrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoublebase()Returns the value of thebaserecord component.final booleanIndicates whether some other object is "equal to" this one.exponent()Returns the value of theexponentrecord component.final inthashCode()Returns a hash code value for this object.floatsampleValue(SamplerContext context, int blockX, int blockY, int blockZ) voidsampleVolume(SamplerContext context, DensityBuffer outputBuffer, DensityVolume volume) final StringtoString()Returns a string representation of this record class.Methods inherited from interface DensitySampler
bind
-
Field Details
-
base
private final double baseThe field for thebaserecord component. -
exponent
The field for theexponentrecord component.
-
-
Constructor Details
-
ConstBaseSampler
Creates an instance of aConstBaseSamplerrecord class.- Parameters:
base- the value for thebaserecord componentexponent- the value for theexponentrecord component
-
-
Method Details
-
sampleVolume
- Specified by:
sampleVolumein interfaceDensitySampler
-
sampleValue
- Specified by:
sampleValuein interfaceDensitySampler
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
base
public double base()Returns the value of thebaserecord component.- Returns:
- the value of the
baserecord component
-
exponent
Returns the value of theexponentrecord component.- Returns:
- the value of the
exponentrecord component
-