Merge Unseak and sneak into one function

This commit is contained in:
CarbonNeuron 2020-05-03 10:51:50 -05:00
parent c5a19f4b8b
commit add1dd2dcd

View file

@ -672,16 +672,9 @@ namespace MinecraftClient
/// <summary>
/// start Sneaking
/// </summary>
protected bool Sneak()
protected bool Sneak(bool on)
{
return SendAction(Protocol.ActionType.StartSneaking);
}
/// <summary>
/// Sends UnSneak
/// </summary>
protected bool UnSneak()
{
return SendAction(Protocol.ActionType.StopSneaking);
return SendAction(on ? Protocol.ActionType.StartSneaking : Protocol.ActionType.StopSneaking);
}
/// <summary>
/// Send Entity Action