Jump to content

Does anybody know?


Recommended Posts

Posted (edited)

Why would you need to know that? I'm assuming you want to know how long to sleep for, if not, disregard this:

 

The simplest way to sleep until a fire is lit, is to sleep until the player's position has changed. The player always moves after lighting a fire, so you can just do something like:

Position currentPos = S.myPosition();
if(S.getInventory().getItem("Logs").interact()) {
    new ConditionalSleep(15_000) {
        @ Override
        public boolean condition() throws InterruptedException {
            return !S.myPosition().equals(currentPos) && !S.myPlayer().isMoving();
        }
    }.sleep();
}
Edited by Explv
  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...