0

The Wiki states that a block's data, in terms of loot tables, there should be a LootTable tag associated with it. After figuring out and running data get block on a chest, I've found... nothing of the sort. I even tried to do it on a sunken shipwreck and found nothing. I also found the same section of the Wiki says;

The loot tables of mobs and containers can be altered with /entitydata, /blockdata, /execute store and /data merge.

Seeing as the two former (entitydata and blockdata) were removed come 17w45b (a 1.13 snapshot), I'm going to assume that this would prove to be outdated. This is also helped by running data get on a Zombie and trying to find its loot table (which the Wiki says could be found in DeathLootTable tag of a mob), and getting nothing of the sort.

Without going into the files of the game to find each loot table or some other tedious workaround, is there any way that I can simply get the loot table in-game then set it using data modify or data merge?

1 Answer 1

3
+50

For entities, you can use:

/data modify entity @e[type=sheep,limit=1,sort=nearest] DeathLootTable set value "minecraft:entities/spider"

and the same goes for blocks:

/data modify block <x> <y> <z> LootTable set value "minecraft:chests/village/village_toolsmith"

there is a list of all loot tables on the Minecraft wiki: https://minecraft.wiki/w/Loot_table#List_of_loot_tables. Just expand the "File structure" section.

2
  • Ah, so the tag exists, but no longer in a "traditional" NBT tag sense like the Wiki says. (Also, completely missed that section.) Thank you! I can't award bounty yet, but I will when I can.
    – xTerrene
    Commented Apr 1, 2020 at 0:33
  • 1
    It is totally a normal NBT tag, just that it doesn't exist anywhere by default (I thought it did for loot chests, but I guess not). There are many tags like that, a lot don't exist if they don't need to. Example: A writeable book has no "pages" tag until you start writing into it. Commented Apr 2, 2020 at 21:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .