Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Minecraft.Client/Minecraft.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3797,7 +3797,8 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures)

if((player->ullButtonsPressed&(1LL<<MINECRAFT_ACTION_DROP)) && gameMode->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;
Expand Down
8 changes: 6 additions & 2 deletions Minecraft.Client/MultiPlayerLocalPlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,13 @@ void MultiplayerLocalPlayer::sendPosition()

}

shared_ptr<ItemEntity> MultiplayerLocalPlayer::drop()
shared_ptr<ItemEntity> MultiplayerLocalPlayer::drop(bool dropAll)
{
connection->send(std::make_shared<PlayerActionPacket>(PlayerActionPacket::DROP_ITEM, 0, 0, 0, 0));
int action = dropAll ?
PlayerActionPacket::DROP_ALL_ITEMS :
PlayerActionPacket::DROP_ITEM;

connection->send(std::make_shared<PlayerActionPacket>(action, 0, 0, 0, 0));
return nullptr;
}

Expand Down
2 changes: 1 addition & 1 deletion Minecraft.Client/MultiPlayerLocalPlayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class MultiplayerLocalPlayer : public LocalPlayer
void sendPosition();

using Player::drop;
virtual shared_ptr<ItemEntity> drop();
virtual shared_ptr<ItemEntity> drop(bool dropStack = false);
protected:
virtual void reallyDrop(shared_ptr<ItemEntity> itemEntity);
public:
Expand Down
2 changes: 2 additions & 0 deletions Minecraft.Client/Windows64/KeyboardMouseInput.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down