MineflayerArmorManager icon indicating copy to clipboard operation
MineflayerArmorManager copied to clipboard

Stops when using bot.clickWindow() or bot.closeWindow()

Open TheAirBlow opened this issue 4 years ago • 6 comments

Info

  • Stops working when using bot.clickWindow() or bot.closeWindow()
  • The code below is dropping all items from inventory, and then plugin stops working

Code

      var slots = bot.inventory.slots
      for (var currSlot of slots) {
        if (currSlot == null) continue;
        bot.clickWindow(currSlot.slot, 0, 0, () => {
          bot.clickWindow(-999, 0, 0)
        })
        bot.closeWindow(slots)
        continue;
      }

TheAirBlow avatar Aug 13 '20 17:08 TheAirBlow

I'm not sure if we have this code in current version of armor manager. Are you reporting an existing issue or it's a question?

G07cha avatar Aug 14 '20 06:08 G07cha

I mean, when I executing code like this, ArmorManager stops work without any errors. Yes, this is an issue.

TheAirBlow avatar Aug 14 '20 07:08 TheAirBlow

That's interesting, thanks for reporting, I'll look into it.

G07cha avatar Aug 14 '20 07:08 G07cha

I will check the code, if I find issue I try to fix it

TheAirBlow avatar Aug 14 '20 07:08 TheAirBlow

Crap, this is coded using TypeScript

TheAirBlow avatar Aug 14 '20 07:08 TheAirBlow

This issue seems kinda flaky, I was able to reproduce it initially but only sometimes, I've done some optimisations to handler code so try latest version and if it doesn't work, please share the exact scenario when issue is occurring(minecraft version, reproducible code and how many items bot has, what kind of item you throw at him).

G07cha avatar Aug 22 '20 13:08 G07cha

Hasn't been able to reproduce it in the most recent version, please let me know if you encounter the issue again.

G07cha avatar Jul 02 '23 16:07 G07cha