Skip to content

KillAura's shield-break weapon check doesn't verify the axe is actually equippable/available #6611

Description

@hokindo9000

Describe the bug

In KillAura.java, acceptableWeapon() checks shouldShieldBreak() first:

private boolean acceptableWeapon(ItemStack stack) {
    if (shouldShieldBreak()) return stack.getItem() instanceof AxeItem;
    ...
}

This correctly requires the currently held item to be an axe when shield
breaking is active. However, in the main onTick() logic, auto-switch only
swaps to an axe if one is found:

if (shouldShieldBreak()) {
    FindItemResult axeResult = InvUtils.find(itemStack -> itemStack.getItem() instanceof AxeItem, 0, 8);
    if (axeResult.found()) weaponResult = axeResult;
}

If auto-switch is OFF (or no axe exists in the hotbar) while shield-break
mode is active and the player is not already holding an axe,
acceptableWeapon() will correctly return false via shouldShieldBreak()'s
branch - causing KillAura to call stopAttacking() every tick with no
attack ever occurring, and no feedback/warning shown to the user about
why KillAura appears to silently do nothing against a blocking target.

Steps to reproduce

  1. Enable KillAura, set Shield Mode to "Break", disable Auto Switch (or
    ensure no axe is present in the hotbar).
  2. Target a player who is actively blocking with a shield.
  3. Observe KillAura does not attack and gives no indication that it's
    because no axe is available for shield breaking.

Meteor Version

26.1.2-42

Minecraft Version

26.1.2

Operating System

Linux

Before submitting a bug report

  • This bug wasn't already reported (I have searched bug reports on GitHub).

  • This is a valid bug (I am able to reproduce this on the latest dev build).

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions