mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
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:
parent
fd7f79402f
commit
613f52d3ae
8 changed files with 116 additions and 80 deletions
|
|
@ -33,10 +33,10 @@ namespace MinecraftClient.Commands
|
|||
switch (action)
|
||||
{
|
||||
case "attack":
|
||||
handler.InteractEntity(entityID, 1);
|
||||
handler.InteractEntity(entityID, InteractType.Attack);
|
||||
return Translations.Get("cmd.entityCmd.attacked");
|
||||
case "use":
|
||||
handler.InteractEntity(entityID, 0);
|
||||
handler.InteractEntity(entityID, InteractType.Interact);
|
||||
return Translations.Get("cmd.entityCmd.used");
|
||||
default:
|
||||
Entity entity = handler.GetEntities()[entityID];
|
||||
|
|
@ -113,13 +113,13 @@ namespace MinecraftClient.Commands
|
|||
: "list";
|
||||
if (action == "attack")
|
||||
{
|
||||
handler.InteractEntity(entity2.Key, 1);
|
||||
handler.InteractEntity(entity2.Key, InteractType.Attack);
|
||||
actionst = "cmd.entityCmd.attacked";
|
||||
actioncount++;
|
||||
}
|
||||
else if (action == "use")
|
||||
{
|
||||
handler.InteractEntity(entity2.Key, 0);
|
||||
handler.InteractEntity(entity2.Key, InteractType.Interact);
|
||||
actionst = "cmd.entityCmd.used";
|
||||
actioncount++;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue