Record Class PowFunction
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.densityfunction.op.PowFunction
- All Implemented Interfaces:
DensityFunction
public record PowFunction(DensityFunction base, DensityFunction exponent)
extends Record
implements DensityFunction
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final recordprivate static final recordprivate static final recordNested classes/interfaces inherited from interface DensityFunction
DensityFunction.Axes, DensityFunction.CompileContext -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final DensityFunctionThe field for thebaserecord component.static final com.mojang.serialization.MapCodec<PowFunction> private final DensityFunctionThe field for theexponentrecord component.Fields inherited from interface DensityFunction
ALL_AXES, AXIS_X, AXIS_Y, AXIS_Z, NO_AXES, REFERENCE_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionPowFunction(DensityFunction base, DensityFunction exponent) Creates an instance of aPowFunctionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbase()Returns the value of thebaserecord component.com.mojang.serialization.MapCodec<PowFunction> codec()private static DensitySamplercompileConstExponent(DensitySampler base, float exponent) intfinal 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.range()rewriteChildren(DfRewriteRule rule) final StringtoString()Returns a string representation of this record class.
-
Field Details
-
base
The field for thebaserecord component. -
exponent
The field for theexponentrecord component. -
CODEC
-
-
Constructor Details
-
PowFunction
Creates an instance of aPowFunctionrecord class.- Parameters:
base- the value for thebaserecord componentexponent- the value for theexponentrecord component
-
-
Method Details
-
compileSampler
- Specified by:
compileSamplerin interfaceDensityFunction
-
compileConstExponent
-
rewriteChildren
- Specified by:
rewriteChildrenin interfaceDensityFunction
-
range
- Specified by:
rangein interfaceDensityFunction
-
domainAxes
public int domainAxes()- Specified by:
domainAxesin interfaceDensityFunction
-
codec
- Specified by:
codecin interfaceDensityFunction
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
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
-