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 SummaryFieldsModifier 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 SummaryConstructorsConstructorDescriptionVerticalGradientConditionSource(ResourceLocation randomName, VerticalAnchor trueAtAndBelow, VerticalAnchor falseAtAndAbove) Creates an instance of aVerticalGradientConditionSourcerecord class.
- 
Method SummaryModifier 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- 
randomNameThe field for therandomNamerecord component.
- 
trueAtAndBelowThe field for thetrueAtAndBelowrecord component.
- 
falseAtAndAboveThe field for thefalseAtAndAboverecord component.
- 
CODEC
 
- 
- 
Constructor Details- 
VerticalGradientConditionSourceVerticalGradientConditionSource(ResourceLocation randomName, VerticalAnchor trueAtAndBelow, VerticalAnchor falseAtAndAbove) Creates an instance of aVerticalGradientConditionSourcerecord class.- Parameters:
- randomName- the value for the- randomNamerecord component
- trueAtAndBelow- the value for the- trueAtAndBelowrecord component
- falseAtAndAbove- the value for the- falseAtAndAboverecord component
 
 
- 
- 
Method Details- 
codec- Specified by:
- codecin interface- SurfaceRules.ConditionSource
 
- 
apply- Specified by:
- applyin interface- Function<SurfaceRules.Context,- SurfaceRules.Condition> 
 
- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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).
- 
randomNameReturns the value of therandomNamerecord component.- Returns:
- the value of the randomNamerecord component
 
- 
trueAtAndBelowReturns the value of thetrueAtAndBelowrecord component.- Returns:
- the value of the trueAtAndBelowrecord component
 
- 
falseAtAndAboveReturns the value of thefalseAtAndAboverecord component.- Returns:
- the value of the falseAtAndAboverecord component
 
 
-