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

/kill @e[name=...] not targeting newly named mobs

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • Minecraft 1.10.2
    • None
    • Mac OSX 10.9.5 running Java 1.8.0_74 64bit
    • Unconfirmed

      In a newly created, superflat world with gamerules commandBlockOutput, doDayLightCycle and doMobSpawning set to false and in creative mode, I placed a command block on Repeat - Unconditional - Always Active with the following command:

      /kill @e[name=killThis1234]
      

      I immediately renamed a name tag on an anvil to killThis1234.

      What I expected to happen:
      When using that name tag on any mob spawned with /summon or a spawn egg, that mob should immediately die. That is what happens most of the time, but...

      What actually happened:
      ...but when the mob was spawned unnamed with his head directly under a 1x1 solid surface (stone, glass, hopper, bottom side of a slab etc) and then given the name, it would take it without dying. Removing the block over its head or getting closer to the mob and then using the name tag again does indeed kill the mob.

      How to reproduce it:
      -Generate a superflat world with preset "Redstone ready", structures off, cheats on, difficulty set to normal and creative mode, modify the gamerules and set up the previously mentioned command block as described.
      -Dig a 3 deep 1x1 hole on the ground. Break the first two blocks of one side starting from the bottom up, in such a way that a two block tall air space lies under a sandstone block.
      -Spawn any two block tall mob on that space.
      -Rename it to killThis1234 with a name tag while standing at ground level and looking downwards at the mob, not at its same height.

      Notes on reproducing the bug
      -As mentioned, the sandstone block over the head of the mob can be changed to anything that would collide with the mob if it jumped at any point of the block. Partial or non-colliding blocks like fences, glass panes, ladders, torches, upside-down slabs and such will not trigger the effect.
      -If the mob is given the name with /entitydata instead of the name tag, the /kill command will always work. Same goes for spawning it already named.
      -Distance to the mob and relative angle player-mob at the moment of applying the name tag may influence the bug, but I have not managed to isolate the behavior of those properties.
      -This bug happens at all heights, not only at ground level.
      -Spawning the mob and then putting the block over its head has the same effect.

            Unassigned Unassigned
            hernanhtml@hotmail.es Hernán González
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: