Skip to content

Commit dc2ff43

Browse files
authored
Fix the Inventory Tweaks chest stealer/dumper sleeping when it shouldn't (#6040)
1 parent 6409c29 commit dc2ff43

1 file changed

Lines changed: 16 additions & 13 deletions

File tree

src/main/java/meteordevelopment/meteorclient/systems/modules/misc/InventoryTweaks.java

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -404,19 +404,6 @@ private void moveSlots(ScreenHandler handler, int start, int end, boolean steal)
404404
for (int i = start; i < end; i++) {
405405
if (!handler.getSlot(i).hasStack()) continue;
406406

407-
int sleep;
408-
if (initial) {
409-
sleep = autoStealInitDelay.get();
410-
initial = false;
411-
} else sleep = getSleepTime();
412-
if (sleep > 0) {
413-
try {
414-
Thread.sleep(sleep);
415-
} catch (InterruptedException e) {
416-
MeteorClient.LOG.error("Error when sleeping the slot mover", e);
417-
}
418-
}
419-
420407
// Exit if user closes screen or exit world
421408
if (mc.currentScreen == null || !Utils.canUpdate()) break;
422409

@@ -433,6 +420,22 @@ private void moveSlots(ScreenHandler handler, int start, int end, boolean steal)
433420
continue;
434421
}
435422

423+
int sleep;
424+
if (initial) {
425+
sleep = autoStealInitDelay.get();
426+
initial = false;
427+
} else sleep = getSleepTime();
428+
if (sleep > 0) {
429+
try {
430+
Thread.sleep(sleep);
431+
} catch (InterruptedException e) {
432+
MeteorClient.LOG.error("Error when sleeping the slot mover", e);
433+
}
434+
}
435+
436+
// Exit if user closes screen or exit world
437+
if (mc.currentScreen == null || !Utils.canUpdate()) break;
438+
436439
if (steal && stealDrop.get()) {
437440
if (dropBackwards.get()) {
438441
int iCopy = i;

0 commit comments

Comments
 (0)