Record Class CachingDensitySampler
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.densityfunction.CachingDensitySampler
- All Implemented Interfaces:
DensitySampler
public record CachingDensitySampler(int id, DensitySampler input)
extends Record
implements DensitySampler
-
Nested Class Summary
Nested classes/interfaces inherited from interface DensitySampler
DensitySampler.Bound -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intThe field for theidrecord component.private final DensitySamplerThe field for theinputrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionCachingDensitySampler(int id, DensitySampler input) Creates an instance of aCachingDensitySamplerrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal 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.input()Returns the value of theinputrecord component.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
-
id
private final int idThe field for theidrecord component. -
input
The field for theinputrecord component.
-
-
Constructor Details
-
CachingDensitySampler
Creates an instance of aCachingDensitySamplerrecord class.- Parameters:
id- the value for theidrecord componentinput- the value for theinputrecord 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. -
id
public int id()Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
input
Returns the value of theinputrecord component.- Returns:
- the value of the
inputrecord component
-