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
|
|
@ -57,7 +57,7 @@ namespace MinecraftClient.Commands
|
|||
private static int DoLeaveBed(CmdResult r)
|
||||
{
|
||||
McClient handler = CmdResult.currentHandler!;
|
||||
return r.SetAndReturn(Translations.cmd_bed_leaving, handler.SendEntityAction(Protocol.EntityActionType.LeaveBed));
|
||||
return r.SetAndReturn(Translations.cmd_bed_leaving, handler.SendEntityAction(Protocol.EntityActionType.LeaveBed).Result);
|
||||
}
|
||||
|
||||
private static int DoSleepBedWithRadius(CmdResult r, double radius)
|
||||
|
|
@ -137,7 +137,7 @@ namespace MinecraftClient.Commands
|
|||
|
||||
handler.Log.Info(string.Format(Translations.cmd_bed_moving, bedLocation.X, bedLocation.Y, bedLocation.Z));
|
||||
|
||||
bool res = handler.PlaceBlock(bedLocation, Direction.Down);
|
||||
bool res = handler.PlaceBlock(bedLocation, Direction.Down).Result;
|
||||
|
||||
handler.Log.Info(string.Format(
|
||||
Translations.cmd_bed_trying_to_use,
|
||||
|
|
@ -174,7 +174,7 @@ namespace MinecraftClient.Commands
|
|||
blockCenter.X,
|
||||
blockCenter.Y,
|
||||
blockCenter.Z,
|
||||
handler.PlaceBlock(block, Direction.Down) ? Translations.cmd_bed_in : Translations.cmd_bed_not_in
|
||||
handler.PlaceBlock(block, Direction.Down).Result ? Translations.cmd_bed_in : Translations.cmd_bed_not_in
|
||||
));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue