Skip to main content

Minecraft 1.13 data pack override default loot tables

Very recently a new minecraft snapshot has come out. The snapshot introduced data packs, basically a folder with custom functions, recipes, loot tables and more.

I wanted to try this out and see if I could change the default loot table of a guardian. This is how the pack looks:

d_invpack
-pack.mcmeta
-data
    -d_invpack
        -loot_tables
            -entities
                -guardian.json

My custom loot table should make guardians drop sponges.

I loaded this in my fresh 1.13 world (17w43b), I spawned a guardian with a spawn egg and killed it with the kill command. I didn't get a sponge, but the default loot.

I found out that if I applied the loot table with the command /entitydata @e[type=guardian] {DeathLootTable="d_invpack:entities/guardian"}, the guardian does drop a sponge, so the pack and table work, but it hasn't overridden the default table.

I was told that I should use the minecraft namespace to override the default loot tables, so I changed my folder structure to this:

d_invpack
-pack.mcmeta
-data
    -minecraft
        -loot_tables
            -entities
                -guardian.json

I tried again, but still no luck. The guardian dropped the default loot. I have used the /reload command to make sure that the pack is loaded correctly, so that is not the problem. I can't alter the loot table of the guardian using commands this time, because "minecraft:entities/guardian" refers to the default table, even if I specified it in my data pack.

Can I override the default loot tables with a data pack? And how?

D-Inventor
  • 1.8k
  • 1
  • 9
  • 16