Refactoring to asynchronous. (partially completed)

This commit is contained in:
BruceChen 2022-12-20 22:41:14 +08:00
parent 7ee08092d4
commit 096ea0c70c
72 changed files with 6033 additions and 5080 deletions

View file

@ -42,7 +42,7 @@ namespace MinecraftClient.Commands
McClient handler = CmdResult.currentHandler!;
if (sneaking)
{
var result = handler.SendEntityAction(Protocol.EntityActionType.StopSneaking);
var result = handler.SendEntityAction(Protocol.EntityActionType.StopSneaking).Result;
if (result)
sneaking = false;
if (result)
@ -52,7 +52,7 @@ namespace MinecraftClient.Commands
}
else
{
var result = handler.SendEntityAction(Protocol.EntityActionType.StartSneaking);
var result = handler.SendEntityAction(Protocol.EntityActionType.StartSneaking).Result;
if (result)
sneaking = true;
if (result)