Interface VerticalAnchor
- All Superinterfaces:
Wrapper
- All Known Implementing Classes:
VerticalAnchor.AboveBottom, VerticalAnchor.Absolute, VerticalAnchor.BelowTop
@NullMarked
@AsOf("2.3.0")
public sealed interface VerticalAnchor
extends Wrapper
permits VerticalAnchor.Absolute, VerticalAnchor.AboveBottom, VerticalAnchor.BelowTop
Wraps the VerticalAnchor value-provider family. Sampling occurs
Minecraft code side, so this wrapper only carries the bounds/shape parameters.
- Since:
- 2.3.0
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordstatic final recordstatic final recordstatic interfaceNested classes/interfaces inherited from interface Wrapper
Wrapper.Context<C> -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic VerticalAnchoraboveBottom(int offset) Y measured upward from the bottom of the generation range.static VerticalAnchorabsolute(int y) Y measured from the bottom of the world.static VerticalAnchorbelowTop(int offset) Y measured downward from the top of the generation range.static VerticalAnchorbottom()Y measured from the bottom of the world.default ObjectConverts this VerticalAnchor to an NMS VerticalAnchor.static VerticalAnchortop()Y measured from the top of the world.
-
Field Details
-
WIRE
-
-
Method Details
-
absolute
Y measured from the bottom of the world.- Parameters:
y- Y measured from the bottom of the world- Returns:
- a vertical anchor with the given absolute Y value
- Since:
- 2.3.0
-
aboveBottom
Y measured upward from the bottom of the generation range.- Parameters:
offset- the offset from the bottom of the generation range- Returns:
- a vertical anchor with the given offset from the bottom of the generation range
- Since:
- 2.3.0
-
belowTop
Y measured downward from the top of the generation range.- Parameters:
offset- the offset from the top of the generation range- Returns:
- a vertical anchor with the given offset from the top of the generation range
- Since:
- 2.3.0
-
bottom
Y measured from the bottom of the world.- Returns:
- a vertical anchor with the Y value 0
- Since:
- 2.3.0
-
top
Y measured from the top of the world.- Returns:
- a vertical anchor with the Y value 0
- Since:
- 2.3.0
-
toMinecraft
Converts this VerticalAnchor to an NMS VerticalAnchor.- Specified by:
toMinecraftin interfaceWrapper- Returns:
- the NMS VerticalAnchor
- Since:
- 2.3.0
-