I tried the custom loot tables here:

(with his website: http://minecraft.tools/en/loots.php ). I successfully obtained my chest with the custom loot using:

/give @p minecraft:chest 1 0

The problem is that I want to summon the chest instead of giving it to the player. I tried the command:

/setblock ~1 ~ ~ chest 0 replace

The chest did place, but when I opened it, the chest was always empty. Why can't I retrieve my loot this way? And if possible, how can this be done?

  • In general, don't summon tile entities such as chests and item frames. Just don't. It's very prone to glitches (mostly with chests, item frames etc. overlaying each other). If something can be produced with setblock, use setblock. Unless, of course, the summoning glitches are what you want. (Force-edited through deleting.)
    – Egor Hans
    Mar 12, 2021 at 16:05

1 Answer 1


The BlockEntityTag is the data that will be given to the block when the item is placed. Since you're setting the block directly, you can just use

/setblock ~1 ~ ~ chest 0 replace {LootTable:"mctools:chests/loot_table"}
  • I knew it might be something with the data tag, I just wasn't sure. This is perfect!
    – user126825
    Jul 7, 2017 at 2:06

You must log in to answer this question.