AuotoAttack: add support for multiple interact modes (#2044)

* Adds support for multiple interact modes
* Entity interaction: Implement enum

Co-authored-by: ORelio <ORelio@users.noreply.github.com>
This commit is contained in:
Booquefius 2022-08-15 17:31:17 -04:00 committed by GitHub
parent fd7f79402f
commit 613f52d3ae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 116 additions and 80 deletions

View file

@ -6,6 +6,7 @@ using System.IO;
using System.Text.RegularExpressions;
using MinecraftClient.Protocol.Session;
using MinecraftClient.Protocol;
using MinecraftClient.Mapping;
namespace MinecraftClient
{
@ -192,6 +193,7 @@ namespace MinecraftClient
public static string AutoAttack_Priority = "distance";
public static bool AutoAttack_OverrideAttackSpeed = false;
public static double AutoAttack_CooldownSeconds = 1;
public static InteractType AutoAttack_Interaction = InteractType.Attack;
//Auto Fishing
public static bool AutoFishing_Enabled = false;
@ -693,6 +695,8 @@ namespace MinecraftClient
AutoAttack_CooldownSeconds = str2float(argValue);
}
return true;
case "interaction":
return Enum.TryParse(argValue, true, out AutoAttack_Interaction);
}
break;