Record Class VerticalGradientCondition
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.material.condition.VerticalGradientCondition
- All Implemented Interfaces:
MaterialCondition
public record VerticalGradientCondition(Identifier randomName, VerticalAnchor trueAtAndBelow, VerticalAnchor falseAtAndAbove)
extends Record
implements MaterialCondition
-
Nested Class Summary
Nested classes/interfaces inherited from interface MaterialCondition
MaterialCondition.HolderHolder -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<VerticalGradientCondition> private final VerticalAnchorThe field for thefalseAtAndAboverecord component.private final IdentifierThe field for therandomNamerecord component.private final VerticalAnchorThe field for thetrueAtAndBelowrecord component.Fields inherited from interface MaterialCondition
DIRECT_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionVerticalGradientCondition(Identifier randomName, VerticalAnchor trueAtAndBelow, VerticalAnchor falseAtAndAbove) Creates an instance of aVerticalGradientConditionrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.MapCodec<VerticalGradientCondition> codec()compile(MaterialRuleContext ruleContext) 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
-
VerticalGradientCondition
public VerticalGradientCondition(Identifier randomName, VerticalAnchor trueAtAndBelow, VerticalAnchor falseAtAndAbove) Creates an instance of aVerticalGradientConditionrecord class.- Parameters:
randomName- the value for therandomNamerecord componenttrueAtAndBelow- the value for thetrueAtAndBelowrecord componentfalseAtAndAbove- the value for thefalseAtAndAboverecord component
-
-
Method Details
-
codec
- Specified by:
codecin interfaceMaterialCondition
-
compile
- Specified by:
compilein interfaceMaterialCondition
-
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). -
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
-