Record Class SurfaceRules.VerticalGradientConditionSource
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.SurfaceRules.VerticalGradientConditionSource
- All Implemented Interfaces:
Function<SurfaceRules.Context,,SurfaceRules.Condition> SurfaceRules.ConditionSource
- Enclosing class:
SurfaceRules
static record SurfaceRules.VerticalGradientConditionSource(ResourceLocation randomName, VerticalAnchor trueAtAndBelow, VerticalAnchor falseAtAndAbove)
extends Record
implements SurfaceRules.ConditionSource
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final KeyDispatchDataCodec<SurfaceRules.VerticalGradientConditionSource> private final VerticalAnchorThe field for thefalseAtAndAboverecord component.private final ResourceLocationThe field for therandomNamerecord component.private final VerticalAnchorThe field for thetrueAtAndBelowrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionVerticalGradientConditionSource(ResourceLocation randomName, VerticalAnchor trueAtAndBelow, VerticalAnchor falseAtAndAbove) Creates an instance of aVerticalGradientConditionSourcerecord class. -
Method Summary
Modifier and TypeMethodDescriptionapply(SurfaceRules.Context p_189841_) KeyDispatchDataCodec<? extends SurfaceRules.ConditionSource> codec()final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefalseAtAndAboverecord component.final inthashCode()Returns a hash code value for this object.Returns the value of therandomNamerecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thetrueAtAndBelowrecord component.
-
Field Details
-
randomName
The field for therandomNamerecord component. -
trueAtAndBelow
The field for thetrueAtAndBelowrecord component. -
falseAtAndAbove
The field for thefalseAtAndAboverecord component. -
CODEC
-
-
Constructor Details
-
VerticalGradientConditionSource
VerticalGradientConditionSource(ResourceLocation randomName, VerticalAnchor trueAtAndBelow, VerticalAnchor falseAtAndAbove) Creates an instance of aVerticalGradientConditionSourcerecord class.- Parameters:
randomName- the value for therandomNamerecord componenttrueAtAndBelow- the value for thetrueAtAndBelowrecord componentfalseAtAndAbove- the value for thefalseAtAndAboverecord component
-
-
Method Details
-
codec
- Specified by:
codecin interfaceSurfaceRules.ConditionSource
-
apply
- Specified by:
applyin interfaceFunction<SurfaceRules.Context,SurfaceRules.Condition>
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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). -
randomName
Returns the value of therandomNamerecord component.- Returns:
- the value of the
randomNamerecord component
-
trueAtAndBelow
Returns the value of thetrueAtAndBelowrecord component.- Returns:
- the value of the
trueAtAndBelowrecord component
-
falseAtAndAbove
Returns the value of thefalseAtAndAboverecord component.- Returns:
- the value of the
falseAtAndAboverecord component
-