From 2acb57d051ac2eed1e958cc450cf6ea494652d31 Mon Sep 17 00:00:00 2001 From: InviseDivine Date: Sat, 21 Mar 2026 19:19:07 +0200 Subject: [PATCH] revert all sht --- src/client/Minecraft.cpp | 38 ++++---------------------------------- 1 file changed, 4 insertions(+), 34 deletions(-) diff --git a/src/client/Minecraft.cpp b/src/client/Minecraft.cpp index e200797..3d783bb 100755 --- a/src/client/Minecraft.cpp +++ b/src/client/Minecraft.cpp @@ -873,16 +873,12 @@ void Minecraft::tickInput() { if (useTouchscreen()) { // Touch: gesture recognizer classifies the action type (turn/destroy/build) BuildActionIntention bai; - bool buildHandled = inputHolder->getBuildInput()->tickBuild(player, &bai); - if (buildHandled) { - if (!bai.isRemoveContinue()) - handleBuildAction(&bai); + if (inputHolder && inputHolder->getBuildInput()->tickBuild(player, &bai)) { + handleBuildAction(&bai); + } else { + gameMode->stopDestroyBlock(); } -#ifdef __ANDROID__ - bool isTryingToDestroyBlock = buildHandled && bai.isRemove(); - handleMouseDown(MouseAction::ACTION_LEFT, isTryingToDestroyBlock || (buildHandled && bai.isInteract())); -#endif } else { // Desktop: left mouse = destroy/attack if (Mouse::isButtonDown(MouseAction::ACTION_LEFT)) { @@ -925,32 +921,6 @@ void Minecraft::tickInput() { TIMER_POP(); #endif } -void Minecraft::handleMouseDown(int button, bool down) { -#ifndef STANDALONE_SERVER -#ifdef __ANDROID__ - if(player->isUsingItem()) { - if(!down) { - gameMode->releaseUsingItem(player); - } - return; - } -#endif - if(player->isSleeping()) { - return; - } - if (button == MouseAction::ACTION_LEFT && missTime > 0) return; - if (down && hitResult.type == TILE && button == MouseAction::ACTION_LEFT && !hitResult.indirectHit) { - int x = hitResult.x; - int y = hitResult.y; - int z = hitResult.z; - gameMode->continueDestroyBlock(x, y, z, hitResult.f); - particleEngine->crack(x, y, z, hitResult.f); - player->swing(); - } else { - gameMode->stopDestroyBlock(); - } -#endif -} void Minecraft::handleBuildAction(BuildActionIntention* action) { #ifndef STANDALONE_SERVER