2

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?

  • Dinnerbone said something about the possibility to disable the default data pack. Have you tried to copy/paste and disable it in order to get yours to be default? You'll probably still need the minecraft namespace. – dly Nov 2 '17 at 7:38
  • @dly I have not! I'll try that. I must say though that at first glance, I didn't see that default data pack in my world folder, so I first have to find it. – D-Inventor Nov 2 '17 at 7:45
  • I'm not sure if there is one right there, but it could most likely still be found in the game files. – dly Nov 2 '17 at 8:01
  • @dly So I finally had the time to take a look, but I didn't manage to find the vanilla data pack. It's not in the datapacks folder inside my world and I couldn't find it in any of the other folders. I have invisible folders on. – D-Inventor Nov 3 '17 at 14:56
1

I tried this again in the latest snapshot (17w48a) and now it works just fine. Data packs were just out at the time that I posted this question and it was a bug. In the latest snapshot, this works just fine, provided that this datapack is loaded after the vanilla datapack.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.