mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-11-07 17:36:07 +00:00
Refactoring to asynchronous. (partially completed)
This commit is contained in:
parent
7ee08092d4
commit
096ea0c70c
72 changed files with 6033 additions and 5080 deletions
|
|
@ -166,12 +166,12 @@ namespace MinecraftClient.Commands
|
|||
{
|
||||
if (action == ActionType.Attack)
|
||||
{
|
||||
handler.InteractEntity(entity2.Key, InteractType.Attack);
|
||||
handler.InteractEntity(entity2.Key, InteractType.Attack).Wait();
|
||||
actionst = Translations.cmd_entityCmd_attacked;
|
||||
}
|
||||
else if (action == ActionType.Use)
|
||||
{
|
||||
handler.InteractEntity(entity2.Key, InteractType.Interact);
|
||||
handler.InteractEntity(entity2.Key, InteractType.Interact).Wait();
|
||||
actionst = Translations.cmd_entityCmd_used;
|
||||
}
|
||||
actioncount++;
|
||||
|
|
@ -311,10 +311,10 @@ namespace MinecraftClient.Commands
|
|||
switch (action)
|
||||
{
|
||||
case ActionType.Attack:
|
||||
handler.InteractEntity(entity.ID, InteractType.Attack);
|
||||
handler.InteractEntity(entity.ID, InteractType.Attack).Wait();
|
||||
return Translations.cmd_entityCmd_attacked;
|
||||
case ActionType.Use:
|
||||
handler.InteractEntity(entity.ID, InteractType.Interact);
|
||||
handler.InteractEntity(entity.ID, InteractType.Interact).Wait();
|
||||
return Translations.cmd_entityCmd_used;
|
||||
case ActionType.List:
|
||||
return GetEntityInfoDetailed(handler, entity);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue