Interface VerticalAnchor
- All Superinterfaces:
Wrapper
- All Known Subinterfaces:
AboveBottom, Absolute, 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
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic AboveBottomabove(int offset) Alias foraboveBottom(int)static AboveBottomaboveBottom(int offset) A relative height starting at the bottom of the world.static Absoluteabsolute(int y) An absolute height as seen on the F3 screen.static BelowTopbelow(int offset) Alias forbelowTop(int)static BelowTopbelowTop(int offset) A relative height starting at the top of the world.default BiasedToBottomHeightbiased(VerticalAnchor maxInclusive, int inner) Alias forbiasedToBottom(VerticalAnchor, int)default BiasedToBottomHeightbiasedToBottom(VerticalAnchor maxInclusive, int inner) Wraps the given value in aBiasedToBottomHeightstatic AboveBottombottom()Y measured from the bottom of the world.default ConstantHeightconstant()Wraps the given value in aConstantHeightstatic VerticalAnchorReads a Minecraft vertical anchor into a wrapper.static BelowToptop()Y measured from the top of the world.default TrapezoidHeighttrapezoid(VerticalAnchor maxInclusive, int plateau) Wraps the given value in aTrapezoidHeightdefault UniformHeightuniform(VerticalAnchor maxInclusive) Wraps the given value in aUniformHeightdefault VeryBiasedToBottomHeightveryBiased(VerticalAnchor maxInclusive, int inner) Alias forveryBiasedToBottom(VerticalAnchor, int)default VeryBiasedToBottomHeightveryBiasedToBottom(VerticalAnchor maxInclusive, int inner) Wraps the given value in aVeryBiasedToBottomHeightstatic Absolutey(int y) Alias forabsolute(int)Methods inherited from interface Wrapper
asHandle, toMinecraft, unwrap
-
Method Details
-
constant
Wraps the given value in aConstantHeight- Returns:
- a constant height provider wrapping the given value
- Since:
- 3.0.0
-
uniform
Wraps the given value in aUniformHeight- 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
Wraps the given value in aTrapezoidHeight- Parameters:
maxInclusive- the maximum vertical anchor to use as the upper boundplateau- 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
Wraps the given value in aBiasedToBottomHeight- Parameters:
maxInclusive- the maximum vertical anchor to use as the upper boundinner- 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
Alias forbiasedToBottom(VerticalAnchor, int)- Parameters:
maxInclusive- the maximum vertical anchor to use as the upper boundinner- 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 aVeryBiasedToBottomHeight- Parameters:
maxInclusive- the maximum vertical anchor to use as the upper boundinner- 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
Alias forveryBiasedToBottom(VerticalAnchor, int)- Parameters:
maxInclusive- the maximum vertical anchor to use as the upper boundinner- 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
-
y
Alias forabsolute(int)- Parameters:
y- an absolute y level- Returns:
- a vertical anchor with the given absolute Y value
- Since:
- 3.0.0
-
aboveBottom
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
Alias foraboveBottom(int)- 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
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
Alias forbelowTop(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
Y measured from the bottom of the world.- Returns:
- a vertical anchor with the Y value 0
- Since:
- 2.3.0
-
top
-
decode
Reads a Minecraft vertical anchor into a wrapper.- Parameters:
minecraftVerticalAnchor- the vertical anchor to read- Returns:
- the wrapper for it
- Since:
- 3.3.0
-