Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-272490

@n can select dying entities, unlike @e

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 1.21 Pre-Release 1
    • 24w21b
    • None
    • Confirmed
    • Commands
    • Important
    • Platform

      @n is supposed to be equivalent to @e[limit=1,sort=nearest], but @e does not select entities that are in the process of dying, while @n does.

      How to Reproduce:

      1. Summon 2 pigs.
      2. Name each a different thing.
      3. RunĀ /kill @n[type=pig] twice in quick succession.
      4. Note that it kills the same pig twice.
      5. Repeat, but use /kill @e[type=pig,limit=1,sort=nearest] twice instead
      6. Note that both pigs are killed.

      I'm assuming that this is not intended behavior because it was not described to function this way in the patch notes.

            boq [Mojang] Bartosz Bok
            Immodial Immodial
            Votes:
            6 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: