From 799bc814c50976c2cc5070dc649d2c5d77415a81 Mon Sep 17 00:00:00 2001 From: CarbonNeuron Date: Sat, 2 May 2020 03:55:23 -0500 Subject: [PATCH] Add Chatbot API for Sneaking / Unsneaking without using SendAction --- MinecraftClient/ChatBot.cs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/MinecraftClient/ChatBot.cs b/MinecraftClient/ChatBot.cs index a90a9600..77e5196e 100644 --- a/MinecraftClient/ChatBot.cs +++ b/MinecraftClient/ChatBot.cs @@ -676,9 +676,23 @@ namespace MinecraftClient Handler.UseItemOnHand(); } /// + /// start Sneaking + /// + protected bool Sneak() + { + return SendAction(Protocol.ActionType.StartSneaking); + } + /// + /// Sends UnSneak + /// + protected bool UnSneak() + { + return SendAction(Protocol.ActionType.StopSneaking); + } + /// /// Send Entity Action /// - protected bool SendAction(Protocol.ActionType action) + private bool SendAction(Protocol.ActionType action) { return Handler.sendEntityAction(action); }