Using the Fill and Replace command to fill up all dispenser?
I have a schematic of a large build with a couple hundred empty dispensers (facing all different directions) that I wanted replaced with TNT-filled dispensers. I was messing around with the /fill command and replace [oldBlockHandling] but couldn't get it to work.
/fill -884 28 977 -889 25 972 minecraft:dispenser 0 replace {Items:[{id:"tnt",Count:64b,Slot:0b}]}I cut the filling slot to 1 because it won't fit in chat but all this command does is completely fills my selected area with filled dispensers. It doesn't selectively replace empty dispensers, which is what I want. Anyone know what I'm doing wrong? Thanks.
31 Answer
The NBT of the to be placed block belongs directly after the to be placed block (technically it's even a part of it). And you didn't tell the game which block to replace. And metadata (the 0) no longer exists.
/fill -884 28 977 -889 25 972 dispenser{Items:[{id:"tnt",Count:64b,Slot:0b}]} replace dispenser 1