aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client
diff options
context:
space:
mode:
authorMarvelco <helito941@gmail.com>2026-03-06 02:48:27 +0200
committerGitHub <noreply@github.com>2026-03-06 07:48:27 +0700
commitb7b29c0b7b191313a9ac9cb33696577ab324fd70 (patch)
tree9e76f98c57ab03ca952483fee033d622b5d2c6f3 /Minecraft.Client
parent8398eb16b8996df7093960bb0a5d7fc65b8229d4 (diff)
Fixed the double block break in Creative mode (#642)
* this seems unnecessary * fixed the double block break on single click
Diffstat (limited to 'Minecraft.Client')
-rw-r--r--Minecraft.Client/Minecraft.cpp5
-rw-r--r--Minecraft.Client/MultiPlayerGameMode.cpp7
2 files changed, 4 insertions, 8 deletions
diff --git a/Minecraft.Client/Minecraft.cpp b/Minecraft.Client/Minecraft.cpp
index b197638c..b87745f0 100644
--- a/Minecraft.Client/Minecraft.cpp
+++ b/Minecraft.Client/Minecraft.cpp
@@ -3530,11 +3530,14 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures)
}
#ifdef _WINDOWS64
+ bool actionPressed = InputManager.ButtonPressed(iPad, MINECRAFT_ACTION_ACTION) || (iPad == 0 && g_KBMInput.IsKBMActive() && g_KBMInput.IsMouseButtonPressed(KeyboardMouseInput::MOUSE_LEFT));
bool actionHeld = InputManager.ButtonDown(iPad, MINECRAFT_ACTION_ACTION) || (iPad == 0 && g_KBMInput.IsKBMActive() && g_KBMInput.IsMouseButtonDown(KeyboardMouseInput::MOUSE_LEFT));
#else
+ bool actionPressed = InputManager.ButtonPressed(iPad, MINECRAFT_ACTION_ACTION);
bool actionHeld = InputManager.ButtonDown(iPad, MINECRAFT_ACTION_ACTION);
#endif
- if (actionHeld && ticks - player->lastClickTick[0] >= timer->ticksPerSecond / 4)
+
+ if (actionPressed)
{
//printf("MINECRAFT_ACTION_ACTION ButtonDown");
player->handleMouseClick(0);
diff --git a/Minecraft.Client/MultiPlayerGameMode.cpp b/Minecraft.Client/MultiPlayerGameMode.cpp
index 8cbd1b91..5f9fc9de 100644
--- a/Minecraft.Client/MultiPlayerGameMode.cpp
+++ b/Minecraft.Client/MultiPlayerGameMode.cpp
@@ -86,13 +86,6 @@ bool MultiPlayerGameMode::destroyBlock(int x, int y, int z, int face)
if (oldTile == NULL) return false;
-#ifdef _WINDOWS64
- if (g_NetworkManager.IsHost())
- {
- level->levelEvent(LevelEvent::PARTICLES_DESTROY_BLOCK, x, y, z, oldTile->id + (level->getData(x, y, z) << Tile::TILE_NUM_SHIFT));
- }
-#endif
-
level->levelEvent(LevelEvent::PARTICLES_DESTROY_BLOCK, x, y, z, oldTile->id + (level->getData(x, y, z) << Tile::TILE_NUM_SHIFT));
int data = level->getData(x, y, z);