mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Upgrade GetLookingBlock
This commit is contained in:
parent
ba6a954f45
commit
4aa6c1c99f
11 changed files with 213 additions and 74 deletions
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue