From ec23aa2b985667268add64f883abb64c4694a0cb Mon Sep 17 00:00:00 2001 From: Alezito2008 Date: Sun, 8 Mar 2026 22:17:55 -0300 Subject: [PATCH 1/2] Input: Add Ctrl+Q shortcut to drop entire item stack --- Minecraft.Client/Minecraft.cpp | 3 ++- Minecraft.Client/MultiPlayerLocalPlayer.cpp | 8 ++++++-- Minecraft.Client/MultiPlayerLocalPlayer.h | 2 +- Minecraft.Client/Windows64/KeyboardMouseInput.h | 2 ++ 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/Minecraft.Client/Minecraft.cpp b/Minecraft.Client/Minecraft.cpp index aa8fa1fa3a..14184cacd9 100644 --- a/Minecraft.Client/Minecraft.cpp +++ b/Minecraft.Client/Minecraft.cpp @@ -3797,7 +3797,8 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) if((player->ullButtonsPressed&(1LL<isInputAllowed(MINECRAFT_ACTION_DROP)) { - player->drop(); + bool ctrlHeld = g_KBMInput.IsKBMActive() && g_KBMInput.IsKeyDown(KeyboardMouseInput::KEY_CONTROL); + player->drop(ctrlHeld); } uint64_t ullButtonsPressed=player->ullButtonsPressed; diff --git a/Minecraft.Client/MultiPlayerLocalPlayer.cpp b/Minecraft.Client/MultiPlayerLocalPlayer.cpp index aef7898f25..1c3dadb4cc 100644 --- a/Minecraft.Client/MultiPlayerLocalPlayer.cpp +++ b/Minecraft.Client/MultiPlayerLocalPlayer.cpp @@ -173,9 +173,13 @@ void MultiplayerLocalPlayer::sendPosition() } -shared_ptr MultiplayerLocalPlayer::drop() +shared_ptr MultiplayerLocalPlayer::drop(bool dropAll) { - connection->send(std::make_shared(PlayerActionPacket::DROP_ITEM, 0, 0, 0, 0)); + int action = dropAll ? + PlayerActionPacket::DROP_ALL_ITEMS : + PlayerActionPacket::DROP_ITEM; + + connection->send(std::make_shared(action, 0, 0, 0, 0)); return nullptr; } diff --git a/Minecraft.Client/MultiPlayerLocalPlayer.h b/Minecraft.Client/MultiPlayerLocalPlayer.h index e660a96a20..7adb61cfc1 100644 --- a/Minecraft.Client/MultiPlayerLocalPlayer.h +++ b/Minecraft.Client/MultiPlayerLocalPlayer.h @@ -35,7 +35,7 @@ class MultiplayerLocalPlayer : public LocalPlayer void sendPosition(); using Player::drop; - virtual shared_ptr drop(); + virtual shared_ptr drop(bool dropStack = false); protected: virtual void reallyDrop(shared_ptr itemEntity); public: diff --git a/Minecraft.Client/Windows64/KeyboardMouseInput.h b/Minecraft.Client/Windows64/KeyboardMouseInput.h index 0f14dfa1f5..1bdbb3d9cf 100644 --- a/Minecraft.Client/Windows64/KeyboardMouseInput.h +++ b/Minecraft.Client/Windows64/KeyboardMouseInput.h @@ -32,6 +32,8 @@ class KeyboardMouseInput static const int KEY_DEBUG_INFO = VK_F3; static const int KEY_DEBUG_MENU = VK_F4; + static const int KEY_CONTROL = VK_CONTROL; + void Init(); void Tick(); void ClearAllState(); From 03cd7c19d9da82653772f15e7b0140abc258fc1f Mon Sep 17 00:00:00 2001 From: Alezito2008 Date: Sun, 8 Mar 2026 22:30:29 -0300 Subject: [PATCH 2/2] Add drop stack control to README --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 122157ba87..6d6e3234da 100644 --- a/README.md +++ b/README.md @@ -80,6 +80,7 @@ Minecraft.Client.exe -name Steve -fullscreen - **Inventory**: `E` - **Chat**: `T` - **Drop Item**: `Q` +- **Drop Stack**: `Ctrl` + `Q` - **Crafting**: `C` Use `Q` and `E` to move through tabs (cycles Left/Right) - **Toggle View (FPS/TPS)**: `F5` - **Fullscreen**: `F11`