diff --git a/src/api/java/baritone/api/utils/RotationUtils.java b/src/api/java/baritone/api/utils/RotationUtils.java index 0649ff10..9352b7fe 100644 --- a/src/api/java/baritone/api/utils/RotationUtils.java +++ b/src/api/java/baritone/api/utils/RotationUtils.java @@ -127,6 +127,16 @@ public final class RotationUtils { return new Vec3d((double) (f1 * f2), (double) f3, (double) (f * f2)); } + /** + * @param ctx Context for the viewing entity + * @param pos The target block position + * @return The optional rotation + * @see #reachable(EntityPlayerSP, BlockPos, double) + */ + public static Optional reachable(IPlayerContext ctx, BlockPos pos) { + return reachable(ctx.player(), pos, ctx.playerController().getBlockReachDistance()); + } + /** * Determines if the specified entity is able to reach the center of any of the sides * of the specified block. It first checks if the block center is reachable, and if so,