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

@ -1190,7 +1190,20 @@ namespace MinecraftClient
/// <param name="type">0: interact, 1: attack, 2: interact at</param>
/// <param name="hand">Hand.MainHand or Hand.OffHand</param>
/// <returns>TRUE in case of success</returns>
[Obsolete("Prefer using InteractType enum instead of int for interaction type")]
protected bool InteractEntity(int EntityID, int type, Hand hand = Hand.MainHand)
{
return Handler.InteractEntity(EntityID, (InteractType)type, hand);
}
/// <summary>
/// Interact with an entity
/// </summary>
/// <param name="EntityID"></param>
/// <param name="type">Interaction type (InteractType.Interact, Attack or AttackAt)</param>
/// <param name="hand">Hand.MainHand or Hand.OffHand</param>
/// <returns>TRUE in case of success</returns>
protected bool InteractEntity(int EntityID, InteractType type, Hand hand = Hand.MainHand)
{
return Handler.InteractEntity(EntityID, type, hand);
}