Embed a loot table definition directly inside a block/entity

๐ŸŽ™๏ธ tryashtar ยท 12 points ยท Posted at 00:56:16 on November 24, 2016 ยท (Permalink)


The two loot table tags, LootTable and DeathLootTable, only support a file path from which a loot table is loaded. Therefore, it is impossible to change the drops of a mob/block to an arbitrary loot table with commands alone -- prior file editing is required.

I suggest the ability to embed the entire loot table directly in the string itself, so you can have both a file path or a loot table.

e.g.
summon pig ~ ~ ~ {DeathLootTable:"{\"pools\":[{\"rolls\":{\"min\":1,\"max\":5},\"entries\":[{\"type\":\"item\",\"weight\":1,\"name\":\"minecraft:diamond_pickaxe\"}]}]}"}

Currently, this does nothing, and the only way to make a pig drop between one and five pickaxes is to put that loot table in a file instead.

[deleted] ยท 1 points ยท Posted at 18:00:35 on November 24, 2016 ยท (Permalink)

Amazing idea. It will be so useful for all sorts of command block things.

Telbaru ยท 1 points ยท Posted at 16:55:33 on April 11, 2017 ยท (Permalink)

nice idea! So not only the serverowner can change a loottable if you play on a vanilla server.