Skip to content

Commit

Permalink
added getDirectionVector() and getServerDirectionVector()
Browse files Browse the repository at this point in the history
  • Loading branch information
fr1kin committed Oct 14, 2018
1 parent 8da686b commit d34d461
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@ public static Vec3d getEyePos() {
return EntityUtils.getEyePos(getLocalPlayer());
}

public static Vec3d getDirectionVector() {
return getViewAngles().getDirectionVector().normalize();
}

public static Vec3d getServerDirectionVector() {
return getServerViewAngles().getDirectionVector().normalize();
}

public static RayTraceResult getMouseOverBlockTrace() {
return Optional.ofNullable(MC.objectMouseOver)
.filter(tr -> tr.getBlockPos() != null) // no its not intelliJ
Expand Down

0 comments on commit d34d461

Please sign in to comment.