From add1dd2dcd705c25b61a55f348614dc67fbba5bc Mon Sep 17 00:00:00 2001 From: CarbonNeuron Date: Sun, 3 May 2020 10:51:50 -0500 Subject: [PATCH] Merge Unseak and sneak into one function --- MinecraftClient/ChatBot.cs | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/MinecraftClient/ChatBot.cs b/MinecraftClient/ChatBot.cs index 3fe03ff3..358c4aed 100644 --- a/MinecraftClient/ChatBot.cs +++ b/MinecraftClient/ChatBot.cs @@ -672,16 +672,9 @@ namespace MinecraftClient /// /// start Sneaking /// - protected bool Sneak() + protected bool Sneak(bool on) { - return SendAction(Protocol.ActionType.StartSneaking); - } - /// - /// Sends UnSneak - /// - protected bool UnSneak() - { - return SendAction(Protocol.ActionType.StopSneaking); + return SendAction(on ? Protocol.ActionType.StartSneaking : Protocol.ActionType.StopSneaking); } /// /// Send Entity Action