I want to use a command block that detects if there is a gold block in the player's inventory and replace it with a gold block that can only be placed on grass.
Now, here is what I'm doing: I started a redstone clock which connects to a command block which has this command to clear all gold blocks.
clear @p gold_block
Then I have a comparator that takes that signal and points into another command block that gives the player a gold block that can only be placed on grass.
give @p gold_block 1 0 {CanPlaceOn:[grass]}
What happens is that this special gold block also gets removed by the previous command block. I've tried to give the gold block a name with the display tag, but I don't know how to configure the command to give the block both tags (Display & Can PlaceOn).