I've been trying to make a command block contraption that replaces a named barrel in Minecraft 1.14.4
I originally substituted the block information from a setblock command into a fill command but it wouldn't work. even though the setblock command works perfectly
/setblock ~1 ~ ~ minecraft:barrel{CustomName:"\"a\""}
/fill ~-8 ~-8 ~-8 ~8 ~8 ~8 minecraft:wet_sponge replace minecraft:barrel{CustomName:"\"a\""}
I then tried testing for the block using this
/execute if block ~ ~-1 ~ minecraft:barrel{CustomName:"\"a\""}
still wouldn't work. I did try searching a lot and this is my last option I don't know this is a bug or what but perhaps I'm still doing something wrong.