Interface VerticalAnchor

All Superinterfaces:
Wrapper
All Known Subinterfaces:
AboveBottom, Absolute, BelowTop

@NullMarked @AsOf("2.3.0") public interface VerticalAnchor extends Wrapper
Wraps the VerticalAnchor value-provider family. Sampling occurs Minecraft code side, so this wrapper only carries the bounds/shape parameters.
Since:
2.3.0
See Also:
  • Method Details

    • constant

      @AsOf("3.0.0") default ConstantHeight constant()
      Wraps the given value in a ConstantHeight
      Returns:
      a constant height provider wrapping the given value
      Since:
      3.0.0
    • uniform

      @AsOf("3.0.0") default UniformHeight uniform(VerticalAnchor maxInclusive)
      Wraps the given value in a UniformHeight
      Parameters:
      maxInclusive - the maximum vertical anchor to use as the upper bound
      Returns:
      a uniform height provider wrapping the given value
      Since:
      3.0.0
    • trapezoid

      @AsOf("3.0.0") default TrapezoidHeight trapezoid(VerticalAnchor maxInclusive, int plateau)
      Wraps the given value in a TrapezoidHeight
      Parameters:
      maxInclusive - the maximum vertical anchor to use as the upper bound
      plateau - the length of the range in the middle that has a uniform distribution
      Returns:
      a trapezoid height provider wrapping the given value
      Since:
      3.0.0
    • biasedToBottom

      @AsOf("3.0.0") default BiasedToBottomHeight biasedToBottom(VerticalAnchor maxInclusive, int inner)
      Wraps the given value in a BiasedToBottomHeight
      Parameters:
      maxInclusive - the maximum vertical anchor to use as the upper bound
      inner - the inner vertical anchor to use as the lower bound of the biased range
      Returns:
      a biased-to-bottom height provider wrapping the given value
      Since:
      3.0.0
    • biased

      @AsOf("3.0.0") default BiasedToBottomHeight biased(VerticalAnchor maxInclusive, int inner)
      Parameters:
      maxInclusive - the maximum vertical anchor to use as the upper bound
      inner - the inner vertical anchor to use as the lower bound of the biased range
      Returns:
      a biased-to-bottom height provider wrapping the given value
      Since:
      3.0.0
    • veryBiasedToBottom

      @AsOf("3.0.0") default VeryBiasedToBottomHeight veryBiasedToBottom(VerticalAnchor maxInclusive, int inner)
      Wraps the given value in a VeryBiasedToBottomHeight
      Parameters:
      maxInclusive - the maximum vertical anchor to use as the upper bound
      inner - the inner vertical anchor to use as the lower bound of the biased range
      Returns:
      a very biased-to-bottom height provider wrapping the given value
      Since:
      3.0.0
    • veryBiased

      @AsOf("3.0.0") default VeryBiasedToBottomHeight veryBiased(VerticalAnchor maxInclusive, int inner)
      Parameters:
      maxInclusive - the maximum vertical anchor to use as the upper bound
      inner - the inner vertical anchor to use as the lower bound of the biased range
      Returns:
      a very biased-to-bottom height provider wrapping the given value
      Since:
      3.0.0
    • absolute

      @AsOf("2.3.0") static Absolute absolute(int y)
      An absolute height as seen on the F3 screen.
      Parameters:
      y - an absolute y level
      Returns:
      a vertical anchor with the given absolute Y value
      Since:
      2.3.0
    • y

      @AsOf("3.0.0") static Absolute y(int y)
      Alias for absolute(int)
      Parameters:
      y - an absolute y level
      Returns:
      a vertical anchor with the given absolute Y value
      Since:
      3.0.0
    • aboveBottom

      @AsOf("2.3.0") static AboveBottom aboveBottom(int offset)
      A relative height starting at the bottom of the world.
      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
    • above

      @AsOf("3.0.0") static AboveBottom above(int offset)
      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:
      3.0.0
    • belowTop

      @AsOf("2.3.0") static BelowTop belowTop(int offset)
      A relative height starting at the top of the world. Higher values move the height down.
      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
    • below

      @AsOf("3.0.0") static BelowTop below(int offset)
      Alias for belowTop(int)
      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:
      3.0.0
    • bottom

      @AsOf("2.3.0") static AboveBottom 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 BelowTop top()
      Y measured from the top of the world.
      Returns:
      a vertical anchor with the Y value 0
      Since:
      2.3.0
    • decode

      @AsOf("3.3.0") static VerticalAnchor decode(Object minecraftVerticalAnchor)
      Reads a Minecraft vertical anchor into a wrapper.
      Parameters:
      minecraftVerticalAnchor - the vertical anchor to read
      Returns:
      the wrapper for it
      Since:
      3.3.0