mojira.dev
MC-126952

Loot_table (chest) datapack.

To reproduce

1. create new world
2. create new datapack.
World
->DataPacks
->"Name"
->pack.mcmeta
->Data
->"Name"
->loot_tables
->chests
->test.json

3. create custom loot_tables me for the test I chose a loot tables already existing

{
  "pools": [
    {
      "rolls": 1,
      "entries": [
        {
          "type": "item",
          "name": "minecraft:diamond_sword",
          "weight": 1,
          "functions": [
            {
              "function": "set_nbt",
              "tag": "{Unbreakable:1}"
            }
          ]
        }
      ]
    }
  ]
}

4. (In game) /setblock ~ ~-1 ~ minecraft:chest{LootTable:"hardel:loot_tables/chests/test"}
Look a chest he is empty

Attachments

Comments 4

LootTable:"namespace:path/to/loot_table"

datapacks/<pack name>/data/namespace/loot_tables/path/to/loot_table

so in your case you need “test:test” as LootTable.

Look my new scrrenshot.
Custom loot_table dosen't work for me.

[media]

[media]

[media]

did you close and open the world, or use /reliad after adding that file?

Thx /reload not working but close minecraft and re-open work

Hardel

(Unassigned)

Unconfirmed

Minecraft 18w10c, Minecraft 18w10d

Retrieved