Record Class DensityFunctionCompiler.PreparedCache
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.densityfunction.DensityFunctionCompiler.PreparedCache
- All Implemented Interfaces:
DensityFunction
- Enclosing class:
DensityFunctionCompiler
private static record DensityFunctionCompiler.PreparedCache(int id, Interval range, int domainAxes, DensitySampler cachingSampler)
extends Record
implements DensityFunction
-
Nested Class Summary
Nested classes/interfaces inherited from interface DensityFunction
DensityFunction.Axes, DensityFunction.CompileContext -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final DensitySamplerThe field for thecachingSamplerrecord component.private final intThe field for thedomainAxesrecord component.private final intThe field for theidrecord component.private final IntervalThe field for therangerecord component.Fields inherited from interface DensityFunction
ALL_AXES, AXIS_X, AXIS_Y, AXIS_Z, CODEC, NO_AXES, REFERENCE_CODEC -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivatePreparedCache(int id, Interval range, int domainAxes, DensitySampler cachingSampler) Creates an instance of aPreparedCacherecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecachingSamplerrecord component.com.mojang.serialization.MapCodec<DensityFunctionCompiler.PreparedCache> codec()intReturns the value of thedomainAxesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intid()Returns the value of theidrecord component.range()Returns the value of therangerecord component.rewriteChildren(DfRewriteRule rule) final StringtoString()Returns a string representation of this record class.
-
Field Details
-
id
private final int idThe field for theidrecord component. -
range
The field for therangerecord component. -
domainAxes
private final int domainAxesThe field for thedomainAxesrecord component. -
cachingSampler
The field for thecachingSamplerrecord component.
-
-
Constructor Details
-
PreparedCache
Creates an instance of aPreparedCacherecord class.- Parameters:
id- the value for theidrecord componentrange- the value for therangerecord componentdomainAxes- the value for thedomainAxesrecord componentcachingSampler- the value for thecachingSamplerrecord component
-
-
Method Details
-
compileSampler
- Specified by:
compileSamplerin interfaceDensityFunction
-
rewriteChildren
- Specified by:
rewriteChildrenin 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
id
public int id()Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
range
Returns the value of therangerecord component.- Specified by:
rangein interfaceDensityFunction- Returns:
- the value of the
rangerecord component
-
domainAxes
public int domainAxes()Returns the value of thedomainAxesrecord component.- Specified by:
domainAxesin interfaceDensityFunction- Returns:
- the value of the
domainAxesrecord component
-
cachingSampler
Returns the value of thecachingSamplerrecord component.- Returns:
- the value of the
cachingSamplerrecord component
-