Advertisement
JackOUT

Untitled

Apr 13th, 2022
1,190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.33 KB | None | 0 0
  1.     private Block getBlockIntersection(final Location startLocation, final Vector direction) {
  2.         final RayTraceResult result = startLocation.getWorld().rayTraceBlocks(startLocation, direction, 10, FluidCollisionMode.NEVER, true);
  3.  
  4.         if (result == null || result.getHitBlock() == null)
  5.             return null;
  6.  
  7.         return result.getHitBlock();
  8. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement