Contents
Class HorizontalLinePositionSearch
java.lang.Object
com.hypixel.hytale.server.npc.util.HorizontalLinePositionSearch
- All Implemented Interfaces:
BlockIterator.BlockIteratorProcedure
public final class HorizontalLinePositionSearch
extends Object
implements BlockIterator.BlockIteratorProcedure
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionbooleanaccept(int x, int y, int z, double px, double py, double pz, double qx, double qy, double qz) Called by the iteration process to deliver the next block on the ray.booleansearchPositions(double originX, double originY, double originZ, double directionX, double directionZ, double maxDistance)
-
Constructor Details
-
HorizontalLinePositionSearch
public HorizontalLinePositionSearch(@Nonnull HorizontalLinePositionSearch.PositionTest positionTest)
-
-
Method Details
-
searchPositions
public boolean searchPositions(double originX, double originY, double originZ, double directionX, double directionZ, double maxDistance) -
accept
public boolean accept(int x, int y, int z, double px, double py, double pz, double qx, double qy, double qz) Description copied from interface:BlockIterator.BlockIteratorProcedureCalled by the iteration process to deliver the next block on the ray. Returns FALSE if you with to end iteration before the iteration reaches maximum distance.- Specified by:
acceptin interfaceBlockIterator.BlockIteratorProcedure- Parameters:
x- X-coordinate of the blocky- Y-coordinate of the blockz- Z-coordinate of the blockpx- Relative X-coordinate of entry-point (0 - 1)py- Relative Y-coordinate of entry-point (0 - 1)pz- Relative Z-coordinate of entry-point (0 - 1)qx- Relative X-coordinate of exit-point (0 - 1)qy- Relative Y-coordinate of exit-point (0 - 1)qz- Relative Z-coordinate of exit-point (0 - 1)- Returns:
- TRUE if iteration should continue
-