Contents
Class FitsAPortal
java.lang.Object
com.hypixel.hytale.builtin.portals.utils.posqueries.predicates.FitsAPortal
- All Implemented Interfaces:
PositionPredicate
A position predicate that checks if a portal can fit at a given point in the world.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe highest y offset the check reads.static final intThe lowest y offset the check reads.static final intThe horizontal reach of the check, in blocks, on either side of the point. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanDetermines if a portal can fit at the given point, reading only the sections already in memory.static CompletableFuture<Boolean> checkAsync(World world, org.joml.Vector3d point) Determines if a portal can fit at the given point, loading any section the check needs and does not find in memory.booleanDetermines if the condition is met at the specified point in the given world.
-
Field Details
-
RADIUS_XZ
public static final int RADIUS_XZThe horizontal reach of the check, in blocks, on either side of the point.- See Also:
-
MIN_Y_OFFSET
public static final int MIN_Y_OFFSETThe lowest y offset the check reads. Blocks below the point must be solid.- See Also:
-
MAX_Y_OFFSET
public static final int MAX_Y_OFFSETThe highest y offset the check reads. Blocks at and above the point must be empty.- See Also:
-
-
Constructor Details
-
FitsAPortal
public FitsAPortal()
-
-
Method Details
-
test
Description copied from interface:PositionPredicateDetermines if the condition is met at the specified point in the given world.- Specified by:
testin interfacePositionPredicate- Parameters:
world- The world to test the condition in.point- The point to test the condition at.- Returns:
trueif the condition is met,falseotherwise.
-
check
Determines if a portal can fit at the given point, reading only the sections already in memory. A position whose section is absent is rejected rather than loaded.- Parameters:
world- The world to check in.point- The point to check.- Returns:
trueif a portal can fit at the given point,falseotherwise.
-
checkAsync
@Nonnull public static CompletableFuture<Boolean> checkAsync(@Nonnull World world, @Nonnull org.joml.Vector3d point) Determines if a portal can fit at the given point, loading any section the check needs and does not find in memory.- Parameters:
world- The world to check in.point- The point to check.- Returns:
- a future completing with
trueif a portal can fit at the given point.
-