Upgrade GetLookingBlock

This commit is contained in:
BruceChen 2022-10-02 13:49:36 +08:00 committed by GitHub
parent ba6a954f45
commit 4aa6c1c99f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 213 additions and 74 deletions

View file

@ -1033,6 +1033,17 @@ namespace MinecraftClient
Handler.UpdateLocation(Handler.GetCurrentLocation(), yaw, pitch);
}
/// <summary>
/// Find the block on the line of sight.
/// </summary>
/// <param name="maxDistance">Maximum distance from sight</param>
/// <param name="includeFluids">Whether to detect fluid</param>
/// <returns>Position of the block</returns>
protected Tuple<bool, Location, Block> GetLookingBlock(double maxDistance = 4.5, bool includeFluids = false)
{
return RaycastHelper.RaycastBlock(Handler, maxDistance, includeFluids);
}
/// <summary>
/// Get a Y-M-D h:m:s timestamp representing the current system date and time
/// </summary>