I want to replace an empty dispenser in a specific area with a dispenser with Items in it. But the position of the dispenser varies each time. So i thought i could solve this via /fill and replace all found dispensers with a new one.
To short it down i tested if it works when i only want to exchange dispenser by dispensers (without stuff in it)
As an example this works (replace stained clay with a redstone block):
/fill ~8 81 ~8 ~-8 94 ~-8 stained_hardened_clay 6 replace redstone_block
And this fails
/fill ~8 81 ~8 ~-8 94 ~-8 dispenser 6 replace dispenser
with the error:
Data tag parsing failed: Invalid tag encountered, expected ‘{‘ as first char
EDIT: After a few more testings: i found out that the first "dispenser" is causing the problem. When replacing it with another block e.g wool it works. So here seems to be the Issue
EDIT 2: Tested it with other "container blocks" like dropper, chests, Enderchest. Always the same Issue.
What do i do wrong or is there another way?
/fill ~8 81 ~8 ~-8 94 ~-8 dispenser 6
works by the way