Record Class UnaryFunction.LeakyReLUSampler
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.densityfunction.op.UnaryFunction.LeakyReLUSampler
- All Implemented Interfaces:
DensitySampler
- Enclosing class:
UnaryFunction
public static record UnaryFunction.LeakyReLUSampler(DensitySampler input, float negativeFactor)
extends Record
implements DensitySampler
-
Nested Class Summary
Nested classes/interfaces inherited from interface DensitySampler
DensitySampler.Bound -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final DensitySamplerThe field for theinputrecord component.private final floatThe field for thenegativeFactorrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionLeakyReLUSampler(DensitySampler input, float negativeFactor) Creates an instance of aLeakyReLUSamplerrecord class. -
Method Summary
Modifier and TypeMethodDescriptionprivate static floatapply(float negativeFactor, float input) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.input()Returns the value of theinputrecord component.floatReturns the value of thenegativeFactorrecord 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
-
input
The field for theinputrecord component. -
negativeFactor
private final float negativeFactorThe field for thenegativeFactorrecord component.
-
-
Constructor Details
-
LeakyReLUSampler
Creates an instance of aLeakyReLUSamplerrecord class.- Parameters:
input- the value for theinputrecord componentnegativeFactor- the value for thenegativeFactorrecord component
-
-
Method Details
-
apply
private static float apply(float negativeFactor, float input) -
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. -
input
Returns the value of theinputrecord component.- Returns:
- the value of the
inputrecord component
-
negativeFactor
public float negativeFactor()Returns the value of thenegativeFactorrecord component.- Returns:
- the value of the
negativeFactorrecord component
-