mojira.dev
MC-308012

The success message of `/enchant` reports that it affected more entities than it did

The bug

When an /enchant command targets multiple entities, it can succeed for some but fail for others. In this case, the command’s result correctly returns the number of entities that were affected, but the feedback message incorrectly shows the number of entities that were targeted.

How to reproduce

  1. Run /summon armor_stand ~ ~ ~ {ShowArms:1b} three times

  2. Give a sword to one of them

  3. /enchant @e[type=armor_stand] sharpness

Expected result

Should say “Applied enchantment Sharpness I to Armor Stand’s item”

Observed result

Says “Applied enchantment Sharpness I to 3 entities”

Notes

If execute store is used, the result is properly 1, not 3. If no entities are affected, the command properly fails.

This issue was split from MC-122717

Comments 0

No comments.

tryashtar

(Unassigned)

Confirmed

Platform

Low

Commands

26.1.2, 26.2 Snapshot 6

26.3 Snapshot 1

Retrieved