Checking if the block is a chest and getting the chest's contents