How do I summon a mob with a custom loot_table? I don't understand how get a loot_table from a datapack

I've gone around to various sites, nothing has helped me except for the minecraft wiki when it came to how to make a loot_table and how to structure a datapack.

This is what the path from the world folder to the loot_tables folder looks like.

-saves
---dungeonMap
-----datapacks
-------DungeonRunner (datapack name)
---------data
-----------KeyItems (namespace name)
-------------loot_tables
---------------StrongAxe.json (loot table file)

I tried doing /summon pig ~ ~ ~ {DeathLootTable:"KeyItems:loot_tables/StrongAxe.json"}. It summons the pig, but it doesn't drop anything. (This is in 1.13.2)

This is what is in the loot_table: https://pastebin.com/XjQath97


Solution 1:

I found the problem!

The names of any folder and file that are inside of the custom datapack folder MUST NOT have any uppercase characters. The custom datapack folder may have uppercase characters.