I want a testforblock command to tell if a chest is empty

I know how to test if there are items in a chest, but how would I test if there are no items in a chest?


Solution 1:

You can use List:[] to check for an empty list, so you can do the following:

/testforblock X Y Z chest * {Items:[]}