Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

Sign up now!

Question Best way to dropping?

Joined
Jan 25, 2015
Messages
121
ForEach is better way to Dropping items?

Actually I'm using a code like this below and the bot stills undropping some items.

Code:
for (SpriteItem x : Inventory.getItems()){

    if (x != null){

        if (x.interact("Drop")){

            Execution.delayUntil(() -> !x.isValid(), 1200);
        }
    }
}

Has another way more efficiently to drop items or could this iteration wrong?
 
Java Warlord
Joined
Nov 17, 2014
Messages
4,906
Dont use loops to interact with the game. Drop one item at once per loop.
 
Top