I'm trying to make lightning sword (cliché, I know) that calls down lightning at the position the player is looking at on right click. I already have it really close to done, and I can call lightning down at a BlockPos (I've tested this by calling lightning on the player themselves).
So all of that works, I just need to find the coordinates the player is looking at from either a Player or ServerPlayer object