mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Allow bots to perform small teleports (#1067)
Small teleport jumps within a 4-block ranges. May cause invalid moves and/or trigger anti-cheat plugins.
This commit is contained in:
parent
ab05d697ef
commit
ee8bc7f308
2 changed files with 23 additions and 10 deletions
|
|
@ -730,7 +730,7 @@ namespace MinecraftClient
|
|||
/// </summary>
|
||||
protected void SetSlot(int slotNum)
|
||||
{
|
||||
Handler.ChangeSlot((short) slotNum);
|
||||
Handler.ChangeSlot((short)slotNum);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -757,11 +757,12 @@ namespace MinecraftClient
|
|||
/// Move to the specified location
|
||||
/// </summary>
|
||||
/// <param name="location">Location to reach</param>
|
||||
/// <param name="allowUnsafe">Allow possible but unsafe locations</param>
|
||||
/// <param name="allowUnsafe">Allow possible but unsafe locations thay may hurt the player: lava, cactus...</param>
|
||||
/// <param name="allowSmallTeleport">Allow non-vanilla small teleport instead of computing path, but may cause invalid moves and/or trigger anti-cheat plugins</param>
|
||||
/// <returns>True if a path has been found</returns>
|
||||
protected bool MoveToLocation(Mapping.Location location, bool allowUnsafe = false)
|
||||
protected bool MoveToLocation(Mapping.Location location, bool allowUnsafe = false, bool allowSmallTeleport = false)
|
||||
{
|
||||
return Handler.MoveTo(location, allowUnsafe);
|
||||
return Handler.MoveTo(location, allowUnsafe, allowSmallTeleport);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue