@@ -346,6 +346,8 @@ public void OnTickPlayer(TickEvent.ClientTickEvent event) {
346346 if (mc .currentScreen instanceof GuiIngameMenu ) {
347347 // LogUtils.debugLog("Detected esc menu, stopping all threads");
348348 Utils .resetExecutor ();
349+ updateKeys (false , false , false , false , false , false );
350+ return ;
349351 }
350352
351353 if (mc .currentScreen instanceof GuiInventory && buying ) {
@@ -355,6 +357,7 @@ public void OnTickPlayer(TickEvent.ClientTickEvent event) {
355357 buying = false ;
356358 cookie = true ;
357359 godPot = true ;
360+ return ;
358361 }
359362
360363 if (buying && (System .currentTimeMillis () - timeoutStart ) > 20000 ) {
@@ -373,6 +376,7 @@ public void OnTickPlayer(TickEvent.ClientTickEvent event) {
373376 LogUtils .debugLog ("Failed to buy 3 times, turning off auto cookie/pot" );
374377 LogUtils .webhookLog ("Failed to buy 3 times, turning off auto cookie/pot" );
375378 }
379+ return ;
376380 }
377381
378382 if (selling && checkFull && (System .currentTimeMillis () - timeoutStart ) > 20000 ) {
@@ -396,7 +400,7 @@ public void OnTickPlayer(TickEvent.ClientTickEvent event) {
396400 double dz = Math .abs (mc .thePlayer .posZ - mc .thePlayer .lastTickPosZ );
397401 double dy = Math .abs (mc .thePlayer .posY - mc .thePlayer .lastTickPosY );
398402 currentLocation = getLocation ();
399- Utils .ExecuteRunnable (updateCounters );
403+ if ( ProfitCalculatorConfig . profitCalculator ) Utils .ExecuteRunnable (updateCounters );
400404
401405 if (caged ) {
402406 switch (currentLocation ) {
@@ -585,7 +589,7 @@ else if (inTrenches) {
585589 if ((mc .thePlayer .posY % 1 ) == 0 ) {
586590 if (!stuck && !dropping ) {
587591 try {
588- AngleUtils .hardRotate (playerYaw );
592+ // AngleUtils.hardRotate(playerYaw);
589593 } catch (Exception e ) {
590594 e .printStackTrace ();
591595 }
@@ -822,7 +826,7 @@ else if ((mc.thePlayer.posY % 1) == 0.8125) {
822826 }
823827 } else {
824828 try {
825- AngleUtils .hardRotate (playerYaw );
829+ // AngleUtils.hardRotate(playerYaw);
826830 } catch (Exception e ) {
827831 e .printStackTrace ();
828832 }
@@ -955,6 +959,7 @@ public void run() {
955959 angleEnum = angleEnum .ordinal () < 2 ? AngleEnum .values ()[angleEnum .ordinal () + 2 ] : AngleEnum .values ()[angleEnum .ordinal () - 2 ];
956960 playerYaw = AngleUtils .angleToValue (angleEnum );
957961 AngleUtils .smoothRotateClockwise (180 , 1.2f );
962+ System .out .println ("-------EXPECTED: " + AngleUtils .get360RotationYaw () + "ACTUAL--------" + playerYaw );
958963 Thread .sleep (100 );
959964 KeyBinding .setKeyBindState (PlayerUtils .keybindW , true );
960965 Thread .sleep (200 );
@@ -1341,6 +1346,7 @@ public void run() {
13411346 Thread .sleep (100 );
13421347 KeyBinding .onTick (PlayerUtils .keybindUseItem );
13431348 }
1349+ Thread .sleep (20 );
13441350 KeyBinding .setKeyBindState (PlayerUtils .keybindUseItem , false );
13451351 if (mc .thePlayer .inventory .getFirstEmptyStack () != -1 ) {
13461352 InventoryUtils .waitForItemClick (19 , "God Potion" , 4 , "Bits Shop" );
@@ -1358,7 +1364,10 @@ public void run() {
13581364 Thread .sleep (100 );
13591365 }
13601366 LogUtils .debugLog ("Found god pot in inventory, switching" );
1367+ KeyBinding .unPressAllKeys ();
13611368 mc .thePlayer .closeScreen ();
1369+ Thread .sleep (20 );
1370+ KeyBinding .setKeyBindState (PlayerUtils .keybindUseItem , false );
13621371 while (mc .currentScreen instanceof GuiContainer ) {
13631372 if (Thread .currentThread ().isInterrupted ()) throw new Exception ("Detected interrupt - stopping" );
13641373 LogUtils .debugLog ("Waiting for shop to close" );
0 commit comments