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 record
static final record
static final record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final VerticalAnchor
static final com.mojang.serialization.Codec
<VerticalAnchor> static final VerticalAnchor
-
Method Summary
Modifier and TypeMethodDescriptionstatic VerticalAnchor
aboveBottom
(int pValue) static VerticalAnchor
absolute
(int pValue) static VerticalAnchor
belowTop
(int pValue) static VerticalAnchor
bottom()
private static VerticalAnchor
merge
(com.mojang.datafixers.util.Either<VerticalAnchor.Absolute, com.mojang.datafixers.util.Either<VerticalAnchor.AboveBottom, VerticalAnchor.BelowTop>> p_158925_) int
resolveY
(WorldGenerationContext pContext) private static com.mojang.datafixers.util.Either
<VerticalAnchor.Absolute, com.mojang.datafixers.util.Either<VerticalAnchor.AboveBottom, VerticalAnchor.BelowTop>> split
(VerticalAnchor p_158927_) static VerticalAnchor
top()
-
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>> p_158925_) -
split
private static com.mojang.datafixers.util.Either<VerticalAnchor.Absolute,com.mojang.datafixers.util.Either<VerticalAnchor.AboveBottom, splitVerticalAnchor.BelowTop>> (VerticalAnchor p_158927_) -
resolveY
-