Jump to content

Does anybody know?


Han

Recommended Posts

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
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

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