0

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
{BlockEntityTag:{LootTable:"mctools:chests/loot_table"}}

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
{BlockEntityTag:{LootTable:"mctools:chests/loot_table"}}

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?

1
  • 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
    Commented Mar 12, 2021 at 16:05

1 Answer 1

4

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"}
1
  • I knew it might be something with the data tag, I just wasn't sure. This is perfect!
    – user126825
    Commented Jul 7, 2017 at 2:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.