Record Class BinaryFunction
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.densityfunction.op.BinaryFunction
- All Implemented Interfaces:
DensityFunction
public record BinaryFunction(BinaryFunction.Type type, DensityFunction left, DensityFunction right)
extends Record
implements DensityFunction
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic final recordstatic final recordstatic final recordstatic final recordstatic final recordstatic final recordstatic final recordstatic final recordstatic final recordstatic final recordstatic final recordstatic enumNested classes/interfaces inherited from interface DensityFunction
DensityFunction.Axes, DensityFunction.CompileContext -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final DensityFunctionThe field for theleftrecord component.private static final org.slf4j.Loggerprivate final DensityFunctionThe field for therightrecord component.private final BinaryFunction.TypeThe field for thetyperecord component.Fields inherited from interface DensityFunction
ALL_AXES, AXIS_X, AXIS_Y, AXIS_Z, CODEC, NO_AXES, REFERENCE_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionBinaryFunction(BinaryFunction.Type type, DensityFunction left, DensityFunction right) Creates an instance of aBinaryFunctionrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.MapCodec<BinaryFunction> codec()intfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.left()Returns the value of theleftrecord component.range()rewriteChildren(DfRewriteRule rule) right()Returns the value of therightrecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.private void
-
Field Details
-
type
The field for thetyperecord component. -
left
The field for theleftrecord component. -
right
The field for therightrecord component. -
LOGGER
private static final org.slf4j.Logger LOGGER
-
-
Constructor Details
-
BinaryFunction
Creates an instance of aBinaryFunctionrecord class.- Parameters:
type- the value for thetyperecord componentleft- the value for theleftrecord componentright- the value for therightrecord component
-
-
Method Details
-
compileSampler
- Specified by:
compileSamplerin interfaceDensityFunction
-
warnNonIntersecting
private void warnNonIntersecting() -
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). -
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
left
Returns the value of theleftrecord component.- Returns:
- the value of the
leftrecord component
-
right
Returns the value of therightrecord component.- Returns:
- the value of the
rightrecord component
-