mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-08-12 12:32:27 +00:00
Merge 03cd7c19d9 into 5e5b685c72
This commit is contained in:
commit
65e1676d3d
|
|
@ -3816,7 +3816,8 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures)
|
||||||
|
|
||||||
if((player->ullButtonsPressed&(1LL<<MINECRAFT_ACTION_DROP)) && gameMode->isInputAllowed(MINECRAFT_ACTION_DROP))
|
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;
|
uint64_t ullButtonsPressed=player->ullButtonsPressed;
|
||||||
|
|
|
||||||
|
|
@ -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;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ public:
|
||||||
void sendPosition();
|
void sendPosition();
|
||||||
|
|
||||||
using Player::drop;
|
using Player::drop;
|
||||||
virtual shared_ptr<ItemEntity> drop();
|
virtual shared_ptr<ItemEntity> drop(bool dropStack = false);
|
||||||
protected:
|
protected:
|
||||||
virtual void reallyDrop(shared_ptr<ItemEntity> itemEntity);
|
virtual void reallyDrop(shared_ptr<ItemEntity> itemEntity);
|
||||||
public:
|
public:
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,8 @@ public:
|
||||||
static const int KEY_FULLSCREEN = VK_F11;
|
static const int KEY_FULLSCREEN = VK_F11;
|
||||||
static const int KEY_SCREENSHOT = VK_F2;
|
static const int KEY_SCREENSHOT = VK_F2;
|
||||||
|
|
||||||
|
static const int KEY_CONTROL = VK_CONTROL;
|
||||||
|
|
||||||
void Init();
|
void Init();
|
||||||
void Tick();
|
void Tick();
|
||||||
void ClearAllState();
|
void ClearAllState();
|
||||||
|
|
|
||||||
|
|
@ -57,6 +57,7 @@ If you're looking for Dedicated Server software, download its [Nightly Build her
|
||||||
- **Inventory**: `E`
|
- **Inventory**: `E`
|
||||||
- **Chat**: `T`
|
- **Chat**: `T`
|
||||||
- **Drop Item**: `Q`
|
- **Drop Item**: `Q`
|
||||||
|
- **Drop Stack**: `Ctrl` + `Q`
|
||||||
- **Crafting**: `C` Use `Q` and `E` to move through tabs (cycles Left/Right)
|
- **Crafting**: `C` Use `Q` and `E` to move through tabs (cycles Left/Right)
|
||||||
- **Toggle View (FPS/TPS)**: `F5`
|
- **Toggle View (FPS/TPS)**: `F5`
|
||||||
- **Fullscreen**: `F11`
|
- **Fullscreen**: `F11`
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue