-
Bug
-
Resolution: Invalid
-
None
-
Minecraft 1.12.2
-
None
-
PC Java Edition - Windows 10 Home - Java Version 9.0.4
-
Unconfirmed
Summary: Using entity selectors to filter by tag does not behave correctly when tags are removed and when testing for multiple tags.
Description: While testing for only one tag works as intended, when attempting to test for multiple tags (or test for the lack of a tag in addition to the presence of a tag), the game will incorrectly persist in believing the conditions of the selector are met despite the fact that the condition is no longer true.
How To Reproduce:
1) Start a new creative singleplayer world in 1.12.2
2) Run /give @p minecraft:command_block
3) Place down a command block and set the command block to run
title @a[tag=A,tag=!B] title "Hello" constantly (set Mode to Repeating / Unconditional / Always Active) Note that this command block should now attempting to show a title to every player who has the tag A and does not have the tag B.
4) Run /title @a times 0 20 0 in the chat to make the title appear onscreen instantly when the command block finds the selector to be true, and to make it quickly apparent that the selector has stopped being true.
5) Place down four more command blocks with the following commands in them (keep track of which one is which)
- Number One: scoreboard players tag @p add A
- Number Two: scoreboard players tag @p remove A
- Number Three: scoreboard players tag @p add B
- Number Four: scoreboard players tag @p remove B
6) Activate Command Block One. The title will now appear on screen (as expected)
7) Activate Command Block Three. The title will disappear from the screen (as expected)
8) Activate Command Block Two. The title will continue to not display (as expected)
9) Activate Command Block Four. The title will suddenly jump back onto the screen, despite the fact that the condition is NOT true. The player has neither Tag A nor Tag B, which is not what the command block should be checking for: has Tag A and does not have Tag B.
The issue persists in the world even after reloading the world and/or restarting the game. The only option is to modify the repeating command block's entity selector, thus resetting the check the command block is performing. Unfortunately, I am unsure what code is causing this behavior.