Interface VerticalAnchor
- All Known Implementing Classes:
VerticalAnchor.AboveBottom,VerticalAnchor.Absolute,VerticalAnchor.BelowTop
public interface VerticalAnchor
Represents a resolvable height value, or y coordinate, based on the world minimum and maximum height.
Can take one of the following three forms:
- An absolute y value (
VerticalAnchor.Absolute). - A height above the lowest valid y value in the level (
VerticalAnchor.AboveBottom). - A height below the highest valid y value in the level (
VerticalAnchor.BelowTop).
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordstatic final recordstatic final record -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final VerticalAnchorstatic final com.mojang.serialization.Codec<VerticalAnchor> static final VerticalAnchor -
Method Summary
Modifier and TypeMethodDescriptionstatic VerticalAnchoraboveBottom(int pValue) static VerticalAnchorabsolute(int pValue) static VerticalAnchorbelowTop(int pValue) static VerticalAnchorbottom()private static VerticalAnchormerge(com.mojang.datafixers.util.Either<VerticalAnchor.Absolute, com.mojang.datafixers.util.Either<VerticalAnchor.AboveBottom, VerticalAnchor.BelowTop>> pAnchor) intresolveY(WorldGenerationContext pContext) private static com.mojang.datafixers.util.Either<VerticalAnchor.Absolute, com.mojang.datafixers.util.Either<VerticalAnchor.AboveBottom, VerticalAnchor.BelowTop>> split(VerticalAnchor pAnchor) static VerticalAnchortop()
-
Field Details
-
CODEC
-
BOTTOM
-
TOP
-
-
Method Details
-
absolute
-
aboveBottom
-
belowTop
-
bottom
-
top
-
merge
private static VerticalAnchor merge(com.mojang.datafixers.util.Either<VerticalAnchor.Absolute, com.mojang.datafixers.util.Either<VerticalAnchor.AboveBottom, VerticalAnchor.BelowTop>> pAnchor) -
split
private static com.mojang.datafixers.util.Either<VerticalAnchor.Absolute,com.mojang.datafixers.util.Either<VerticalAnchor.AboveBottom, splitVerticalAnchor.BelowTop>> (VerticalAnchor pAnchor) -
resolveY
-