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
Modifier and TypeFieldDescription(package private) static final com.mojang.serialization.Codec<SurfaceRules.VerticalGradientConditionSource>
private final VerticalAnchor
The field for thefalseAtAndAbove
record component.private final ResourceLocation
The field for therandomName
record component.private final VerticalAnchor
The field for thetrueAtAndBelow
record component. -
Constructor Summary
ConstructorDescriptionVerticalGradientConditionSource
(ResourceLocation randomName, VerticalAnchor trueAtAndBelow, VerticalAnchor falseAtAndAbove) Creates an instance of aVerticalGradientConditionSource
record class. -
Method Summary
Modifier and TypeMethodDescriptionapply
(SurfaceRules.Context p_189841_) com.mojang.serialization.Codec<? extends SurfaceRules.ConditionSource>
codec()
final boolean
Indicates whether some other object is "equal to" this one.Returns the value of thefalseAtAndAbove
record component.final int
hashCode()
Returns a hash code value for this object.Returns the value of therandomName
record component.final String
toString()
Returns a string representation of this record class.Returns the value of thetrueAtAndBelow
record component.
-
Field Details
-
randomName
The field for therandomName
record component. -
trueAtAndBelow
The field for thetrueAtAndBelow
record component. -
falseAtAndAbove
The field for thefalseAtAndAbove
record component. -
CODEC
-
-
Constructor Details
-
VerticalGradientConditionSource
VerticalGradientConditionSource(ResourceLocation randomName, VerticalAnchor trueAtAndBelow, VerticalAnchor falseAtAndAbove) Creates an instance of aVerticalGradientConditionSource
record class.- Parameters:
randomName
- the value for therandomName
record componenttrueAtAndBelow
- the value for thetrueAtAndBelow
record componentfalseAtAndAbove
- the value for thefalseAtAndAbove
record component
-
-
Method Details
-
codec
- Specified by:
codec
in interfaceSurfaceRules.ConditionSource
-
apply
- Specified by:
apply
in 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 therandomName
record component.- Returns:
- the value of the
randomName
record component
-
trueAtAndBelow
Returns the value of thetrueAtAndBelow
record component.- Returns:
- the value of the
trueAtAndBelow
record component
-
falseAtAndAbove
Returns the value of thefalseAtAndAbove
record component.- Returns:
- the value of the
falseAtAndAbove
record component
-