Record Class VerticalAnchor.AboveBottom
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.VerticalAnchor.AboveBottom
- All Implemented Interfaces:
VerticalAnchor
- Enclosing interface:
VerticalAnchor
public static record VerticalAnchor.AboveBottom(int offset)
extends Record
implements VerticalAnchor
-
Nested Class Summary
Nested classes/interfaces inherited from interface VerticalAnchor
VerticalAnchor.AboveBottom, VerticalAnchor.Absolute, VerticalAnchor.BelowTop -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<VerticalAnchor.AboveBottom> private final intThe field for theoffsetrecord component.Fields inherited from interface VerticalAnchor
BOTTOM, TOP -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intoffset()Returns the value of theoffsetrecord component.intresolveY(WorldGenerationContext heightAccessor) toString()Returns a string representation of this record class.
-
Field Details
-
offset
private final int offsetThe field for theoffsetrecord component. -
CODEC
-
-
Constructor Details
-
AboveBottom
public AboveBottom(int offset) Creates an instance of aAboveBottomrecord class.- Parameters:
offset- the value for theoffsetrecord component
-
-
Method Details
-
resolveY
- Specified by:
resolveYin interfaceVerticalAnchor
-
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 with thecomparemethod from their corresponding wrapper classes. -
offset
public int offset()Returns the value of theoffsetrecord component.- Returns:
- the value of the
offsetrecord component
-