AutoSwitch [Fabric]

AutoSwitch [Fabric]

137k Downloads

Switchback stops working when manually switching tools when using another

ventoryprod opened this issue ยท 7 comments

commented

When I'm were mining I've noticed that the pickaxe stops switching back to the sword. After some testing, I realized that was because I was switching my pickaxe manually to sword/axe.
It fixes with reconnecting to the server.

Badlion.Client.2021.11.29.-.17.41.29.25_3.mp4
commented

I've released 3.4.1-alpha.1 on Modrinth. It contains a potential fix for this issue. It also includes a new client command, autoswitch resetSwitchState as an alternative workaround to relogging in case the fix did not work.

I can only sometimes reproduce this, so please try it and let me know if it works.

commented

What MC and AS version?

I can't seem to reproduce this, but maybe I'm misunderstanding something. This is how I see it:

- You have slot A selected
- AS selects a slot (eg pickaxe)
- While the tool is in use, you manually go to a new slot B
- When you stop using the tool, AS switches to B

I take it you want it to return to slot A instead of B? This is intended behavior - returning the previous manually selected slot after the action is complete; I'm working under the assumption that the player intended to select that slot, and that most (if not all) tool changes are being handled by AS anyways. By manually switching while a tool is in use, you create a new switch action that goes back to that tool, which switchback later undoes.

Does it persist in returning to B even when you've manually selected a new slot?

Some ways to refresh AS's cache without reconnecting:

  • Toggle AS on/off
  • Change items in the hotbar
commented

What MC and AS version?

1.17.1; 3.4.0

I can't seem to reproduce this, but maybe I'm misunderstanding something. This is how I see it:

- You have slot A selected

- AS selects a slot (eg pickaxe)

- While the tool is in use, you manually go to a new slot B

- When you stop using the tool, AS switches to B

If I explain it incorrectly, I'll write it out step by step:

  • Player holds item A (eg Sword) - Player begins mining and it autoswitches to B (pickaxe)
  • When player is mining, switching to any other slot, but continues to mine
  • When player stops mining, it switches back to A
  • The next time the item autoswitches, for example, from A to B, and when player stops using item B, there will be no switchback to A
  • Toggle AS on/off

  • Change items in the hotbar

both doesn't help.

commented

Yeah, fix works kinda fine now, not ideal tho. It bugged only once for 5 minutes of testing on one reconnect, and after using command I couldn't replicate this bug. Then I reconnected, and I was able to replicate all steps.

commented

I'd like to keep this open till a fix is found.

So after clearing the state, the bug was gone? I've published 2.4.1-alpha.2 that resets the state when connecting to a world. Please see if that properly fixes the issue. Should be available on Modrinth in a couple of minutes.

commented

So after clearing the state, the bug was gone?

Yep.

Please see if that properly fixes the issue. Should be available on Modrinth in a couple of minutes.

Caught bug only once, after reconnecting it was completely gone, and I cannot reproduce it even after restarting game.

commented

Hmm...

I'm not sure what else I can do. It sounds like it's (mostly) fixed. I'm going to bump that version to release for now. If it shows up again, feel free to reopen/make a new issue (same with any other bugs you find).

Thanks for bearing with the testing!