mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Fix EntityAction packet ID and tiny improve of sneak command
This commit is contained in:
parent
cdb217840d
commit
d6a3ea0726
2 changed files with 6 additions and 7 deletions
|
|
@ -13,18 +13,17 @@ namespace MinecraftClient.Commands
|
|||
|
||||
public override string Run(McTcpClient handler, string command, Dictionary<string, object> localVars)
|
||||
{
|
||||
Console.WriteLine(command);
|
||||
if (sneaking)
|
||||
{
|
||||
var result = handler.sendEntityAction(Protocol.EntityActionType.StopSneaking);
|
||||
sneaking = false;
|
||||
return result ? "Success" : "Fail";
|
||||
return result ? "You aren't sneaking anymore" : "Fail";
|
||||
}
|
||||
else
|
||||
{
|
||||
var result = handler.sendEntityAction(Protocol.EntityActionType.StartSneaking);
|
||||
sneaking = true;
|
||||
return result ? "Success" : "Fail";
|
||||
return result ? "You are sneaking now" : "Fail";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue