Test for anything but a specific item in a chest [duplicate]
I'm trying to test for anything but a specific item in a chest. I've heard that this would be possible by removing the brackets.
The normal to test for an item is;
/testforblock X Y Z minecraft:chest -1 {Items:[{id:"minecraft:diamond"}]}
And the syntax to test for anything but the item would be;
/testforblock X Y Z minecraft:chest -1 {Items:[id:"minecraft:diamond"]}
However, this doesn't work, probably because removing the brackets doesn't actually invert the command. Does anyone know how I can test for any item except a diamond in my chest?
The chest is emptied each time it is tested, so I'm testing for the following situations;
There's a diamond in the chest, there is an item that isn't a diamond in the chest, or there's nothing in the chest.
Pictures about "Test for anything but a specific item in a chest [duplicate]"
![Test for anything but a specific item in a chest [duplicate] - Two Clear Glass Jars Beside Several Flasks Test for anything but a specific item in a chest [duplicate] - Two Clear Glass Jars Beside Several Flasks](/assets/images/test_for_anything_but_a_specific_item_in_a_chest_duplicate_1.jpeg)
![Test for anything but a specific item in a chest [duplicate] - Person Pouring Blue Liquid Into a Glass Container Test for anything but a specific item in a chest [duplicate] - Person Pouring Blue Liquid Into a Glass Container](/assets/images/test_for_anything_but_a_specific_item_in_a_chest_duplicate_2.jpeg)
![Test for anything but a specific item in a chest [duplicate] - Chemical test with empty flask mounted on ring stand while burner under flask and tubes filled with reagents in modern lab Test for anything but a specific item in a chest [duplicate] - Chemical test with empty flask mounted on ring stand while burner under flask and tubes filled with reagents in modern lab](/assets/images/test_for_anything_but_a_specific_item_in_a_chest_duplicate_3.jpeg)
How do you duplicate items in a chest?
In addition, it states in the Minecraft wiki for Chests: By holding \u21e7 Shift and double-clicking while holding an item, all items of a type clicked on will be moved into or out of the chest.Duplicate a Chest, and its Contents [Creative 1.9+ Minecraft]
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: Rodolfo Clix, Pixabay, Ivan Samkov, RF._.studio
