RusherDevelopment / rusherhack-issues

Public repository for reporting issues and suggestions in an efficient manner
76 stars 10 forks source link

[BUG] AutoArmor no longer works on 2b2t after 1.20 update. #1603

Closed 0xTas closed 6 months ago

0xTas commented 6 months ago

Describe the bug After 2b2t updated to 1.20, AutoArmor now fails to swap elytras during flight. I did not test with other armor types.

To Reproduce Steps to reproduce the behavior:

  1. turn on AutoArmor with elytra priority and durability set to 5
  2. use efly and wait for your elytra to decay below the threshold
  3. the module freaks out and fails to swap your elytra with a new one, forcing you to land.

Other mods List other mods you are using (if any): meteor, future, & some other qol client mods, but these are all irrelevant because I already have a working fix in my own custom meteor module and it works perfectly fine regardless of what client's efly I am using, so this is not a mod conflict issue.

Expected behavior A clear and concise description of what you expected to happen. AutoArmor should successfully and instantly swap your elytra the moment that it meets the criteria to be swapped.

Screenshots If applicable, add screenshots to help explain your problem. N/A

Additional context This issue is likely due to 2b2t updating to 1.20. You can no longer manually swap armor pieces in your inventory by left-clicking them into an empty armor slot, or by click-swapping them on a preoccupied armor slot. The server rejects your transaction when you do this.

The new way of swapping armor is to either shift-click the armor piece into its empty armor slot, or in the case of an already occupied armor slot: hold the desired piece of equipment in your main hand and right-click it (or otherwise invoke or spoof the interactionManager.interactItem() procedure with it.)

You can continue to achieve silent/instant swaps but the steps now go like this:

  1. locate a valid piece of replacement armor in the player's inventory.
  2. swap that valid piece into the player's active slot
  3. simulate interacting with that armor item
  4. swap the previously equipped piece (which is now active item) back into an empty inventory slot (the slot you got your new armor piece from works well.)

from my testing this can all be done on the same tick, so the player shouldn't notice any difference.

*edit: small behavior details correction

0xTas commented 6 months ago

Nevermind I am dumb, this is caused because xCarry and Armor Storage were patched with the 1.20 update. Disable any modules that use these features such as Meteor's inventory tweaks, and the issue goes away. Still, the new method of swapping armor is worth looking into because it works regardless and isn't subject to this conflict behavior.