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
  • Field Details

  • Method Details

    • absolute

      @AsOf("2.3.0") static VerticalAnchor absolute(int y)
      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

      @AsOf("2.3.0") static VerticalAnchor aboveBottom(int offset)
      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

      @AsOf("2.3.0") static VerticalAnchor belowTop(int offset)
      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

      @AsOf("2.3.0") static VerticalAnchor bottom()
      Y measured from the bottom of the world.
      Returns:
      a vertical anchor with the Y value 0
      Since:
      2.3.0
    • top

      @AsOf("2.3.0") static VerticalAnchor top()
      Y measured from the top of the world.
      Returns:
      a vertical anchor with the Y value 0
      Since:
      2.3.0
    • toMinecraft

      @AsOf("2.3.0") default Object toMinecraft()
      Converts this VerticalAnchor to an NMS VerticalAnchor.
      Specified by:
      toMinecraft in interface Wrapper
      Returns:
      the NMS VerticalAnchor
      Since:
      2.3.0