Minecraft mcp method to pause asynchronously?

La
10

So a method so that Minecraft does not stop while there's a delay

Lo

See TimeHelper

La

Doesn't work

La

I can't keep nested if queries with time.hasreached. In addition, time.delay does not work either

Lo

I can't keep nested if queries with time.hasreached.

how so?

In addition, time.delay does not work either

you do not need

La

Because I want to do windowclick several times on certain slots

La

I want something like time.delay between the statements because the hasreahed method takes a lot of if conditions

Lo

Delay is the same as hasReached only with float instead of long, baka!

Because I want to do windowclick several times on certain slots

just do a query with if, or show me how you imagine it (even if it doesn't work)

La

For (int i = 54; I

If (! (I == certain slot)) {

Windowclick (MC.theplayer.openconatainer.windowid, i, 0, 1, MC.theplayer);

Time.delay (500);

}

If (I = 81) {

continue;

}

}

So don't write any formatting on mobile

La

In short, if MC clicked 5 times on the window, it should click on slot 23. Of course with delays in between

Lo

Int index = 54;

public void onTick () {
if (index> = mc.thePlayer.inventorybeidoublechest)
return;

if (timer.hasReached (1000L)) {
if (index! = certain slot) {
windowClick (mc.thePlayer.openContainer.windowId, index, 0, 1, mc.thePlayer);
}

timer.reset ();
index ++;
}
}