mojira.dev
MC-120106

Running a command with an error in it and using the tag= selector argument in a command block will always say that it couldn't find the entity

Normally, when you run the /xp command in the console, you can only use negative values if you are taking levels. If you are not taking levels, it will give you an error message saying that it could not give a player a negative amount of experience. That part works fine.

However, if you do it in a command block with the tag entity selector, the error message will tell you that it could not find an entity that fit the selector instead. This can be reproduced by running /scoreboard players tag @a add tagged in the console then /xp -1 @a[tag=tagged] in a command block. It fails as expected, but tells you that it couldn't find @a rather than the actual error.

EDIT: I made a mistake; the bug only occurs with the tag entity selector.

EDIT: This actually applies to all commands and errors, not just the one I mentioned.

Comments 4

Cannot reproduce. It says Cannot give player negative experience points for me. Make sure you don't have any typos in your tag name.

I checked and retyped the name multiple times. I also used CTRL+C and CTRL+V and ran a /testfor command and the exact same parameter I typed found a player.

Please provide the exact commands used. As I said, the commands in the description worked for me as expected.

Well I restarted my world and ran the commands again, it's working fine now. It seems like it might have just been a problem with that one instance of the game.

Rajat Patel

(Unassigned)

Unconfirmed

Minecraft 1.12.1

Retrieved