Contents
Class RayBlockHitTest
java.lang.Object
com.hypixel.hytale.server.npc.util.RayBlockHitTest
- All Implemented Interfaces:
BlockIterator.BlockIteratorProcedure
-
Field Summary
Fields -
Constructor Summary
Constructors -
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.voidclear()org.joml.Vector3dshortbooleaninit(Ref<EntityStore> ref, int blockSet, float pitch, ComponentAccessor<EntityStore> componentAccessor) booleanrun(double range)
-
Field Details
-
THREAD_LOCAL
-
-
Constructor Details
-
RayBlockHitTest
public RayBlockHitTest()
-
-
Method Details
-
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
-
getHitPosition
@Nonnull public org.joml.Vector3d getHitPosition() -
getLastBlockRevision
public short getLastBlockRevision() -
init
public boolean init(@Nonnull Ref<EntityStore> ref, int blockSet, float pitch, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
run
public boolean run(double range) -
clear
public void clear()
-