Class RayTraceResult
java.lang.Object
wtf.choco.veinminer.platform.world.RayTraceResult
The result of a ray trace.
- See Also:
-
Constructor Summary
ConstructorDescriptionConstruct an emptyRayTraceResult
.RayTraceResult
(@Nullable BlockPosition hitBlock, @Nullable BlockFace hitBlockFace) Construct a newRayTraceResult
. -
Method Summary
Modifier and TypeMethodDescription@Nullable BlockPosition
Get theBlockPosition
that was hit in this result, or null if this result does not represent ahit
.@Nullable BlockFace
boolean
isHit()
Check whether or not there was a successful hit.
-
Constructor Details
-
RayTraceResult
public RayTraceResult(@Nullable @Nullable BlockPosition hitBlock, @Nullable @Nullable BlockFace hitBlockFace) Construct a newRayTraceResult
.- Parameters:
hitBlock
- the block position that was hithitBlockFace
- the face on which the ray trace landed
-
RayTraceResult
public RayTraceResult()Construct an emptyRayTraceResult
.
-
-
Method Details
-
isHit
public boolean isHit()Check whether or not there was a successful hit.- Returns:
- true if hit, false if all values in this result are null
-
getHitBlock
Get theBlockPosition
that was hit in this result, or null if this result does not represent ahit
.- Returns:
- the hit block, or null
-
getHitBlockFace
- Returns:
- the hit block face, or null
-