Skip to content

Fix type mismatch in AutoArmor, aura leak in AutoEat, stale packets in Blink#6443

Open
Aevumly wants to merge 5 commits into
MeteorDevelopment:masterfrom
Aevumly:master
Open

Fix type mismatch in AutoArmor, aura leak in AutoEat, stale packets in Blink#6443
Aevumly wants to merge 5 commits into
MeteorDevelopment:masterfrom
Aevumly:master

Conversation

@Aevumly
Copy link
Copy Markdown

@Aevumly Aevumly commented May 30, 2026

Type of change

  • Bug fix
  • New feature

Description

AutoArmor — Curse of Binding check never fires + avoided enchantment penalty broken

enchantments is keyed by Holder<Enchantment>, but two places were passing ResourceKey<Enchantment> directly. containsKey(Enchantments.BINDING_CURSE) always returns false since the types never compare equal, meaning AutoArmor would attempt to swap off Binding Curse armor. Same issue in decreaseScoreByAvoidedEnchantmentsenchantments.getInt(ResourceKey) always returns 0, so the score penalty for avoided enchantments was effectively dead code. Fixed both by using Holder.is() and Utils.getEnchantmentLevel, consistent with how the rest of the class handles enchantment lookups.

AutoEat — auras get permanently disabled when slot swap fails

When searchInventory is enabled and food is in the main inventory, changeSlot can return false if the hotbar is full. In that case eat() returns early without setting eating = true, but startEating still continues and pauses auras and baritone. Since eating stays false, stopEating is never triggered — including from onDeactivate, which guards on if (eating). Added an early return in startEating right after eat() to avoid pausing auras if the eat didn't actually start.

Blink — stale packets sent to the next server after disconnect

onLeaveGame called onDeactivate, which exits early through Utils.canUpdate() when mc.player is null. So the packets list never gets cleared on disconnect. When the player joins a new server, those old movement packets are still queued and get flushed when Blink is disabled. Replaced the onDeactivate call with dumpPackets(false) directly since it skips the send path and is safe to call with a null player.

Related issues

N/A

Checklist:

  • My code follows the style guidelines of this project.
  • I have added comments to my code in more complex areas.
  • I have tested the code in both development and production environments.

@Aevumly
Copy link
Copy Markdown
Author

Aevumly commented May 30, 2026

Heads up — I accidentally pushed directly to my fork’s master instead of a separate branch. The changes are the same, will use a dedicated branch next time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant