Question: I am designing a hunger games map for single player, and wanted to know if I could save myself some work (like 1000 or so command blocks), by doing something like this.

```
/fill ~0 ~0 ~0 ~20 ~10 ~20 minecraft:prismarine 0 replace minecraft:chest{"LootTable:minecraft:chests/HG_Loot_Table"}

```

to replace all prismarine in the area with a chest that had a prefilled loot table or if I had to do it all by hand.

Answer: 
While you've reversed the order of the blocks specified, `/fill` is not capable of replacing specific blocks if the block you're placing is a tile entity (in this case, a chest). In those cases you can **only** specify NBT data for the tile entity:

```
/fill ~0 ~0 ~0 ~20 ~10 ~20 minecraft:chest 0 replace {LootTable:"minecraft:chests/HG_Loot_Table"}

```

See [this comment](https://bugs.mojang.com/browse/MC-61864?focusedCommentId=175057&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-175057) by Searge explaining that this isn't currently possible:

> 
> Replacing blocks with tile entities is not supported, this is due to a limitation in the parsing of commands. It may be changed in the future, but not until after 1.8.
> 
> 
>
You kind of mixed it up, what you want is this:
`/fill ~0 ~0 ~0 ~20 ~10 ~20 minecraft:chest 0 replace minecraft:prismarine {"LootTable:minecraft:chests/HG_Loot_Table"}`.

This is the proper syntax: `fill <x1> <y1> <z1> <x2> <y2> <z2> <block> <dataValue|state> replace [replaceTileName] [replaceDataValue]`