diff options
| author | qwasdrizzel <145519042+qwasdrizzel@users.noreply.github.com> | 2026-03-05 22:18:36 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-05 22:18:36 -0600 |
| commit | cffe636e359441e1c667784d40bd71d111c281de (patch) | |
| tree | 11144e082d516ba05a66aa3564875f5879a45f7c /Minecraft.Client/MultiPlayerGameMode.cpp | |
| parent | d1eb09a4b97f38476a538f7a7de06a0a620a1a65 (diff) | |
| parent | 5cbdf27b46e4ac23e441489c524b1f1aba88c269 (diff) | |
Merge branch 'smartcmd:main' into main
Diffstat (limited to 'Minecraft.Client/MultiPlayerGameMode.cpp')
| -rw-r--r-- | Minecraft.Client/MultiPlayerGameMode.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/Minecraft.Client/MultiPlayerGameMode.cpp b/Minecraft.Client/MultiPlayerGameMode.cpp index 9c4b0795..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); @@ -133,6 +126,9 @@ void MultiPlayerGameMode::startDestroyBlock(int x, int y, int z, int face) if (localPlayerMode->isCreative()) { + // Skip if we just broke a block — prevents double-break on single clicks + if (destroyDelay > 0) return; + connection->send(shared_ptr<PlayerActionPacket>( new PlayerActionPacket(PlayerActionPacket::START_DESTROY_BLOCK, x, y, z, face) )); creativeDestroyBlock(minecraft, this, x, y, z, face); destroyDelay = 5; @@ -178,6 +174,7 @@ void MultiPlayerGameMode::stopDestroyBlock() isDestroying = false; destroyProgress = 0; + destroyDelay = 0; minecraft->level->destroyTileProgress(minecraft->player->entityId, xDestroyBlock, yDestroyBlock, zDestroyBlock, -1); } |
