Topic category: Help with Minecraft modding (Java Edition)
Currently, I have a custom mob which I am trying to set up a loot table for. The mob itself is set up, and I understand how the loot table itself works, I'm just having trouble with the loot table registry name.
I assumed that it would function similarly to naming the loot table registry "entities/chicken" so I named the registry "entities/flying" ("flying" is the ID of the mob) but this did not work.
Then I guessed that it must be similar to how modded blocks are referred to in their registry, so I named the registry "obelessia:entities/flying" (obelessia is the ID of my mod) the only problem is, it won't accept the character ":" so I had to use a forwardslash iinstead "obelessia/entities/flying" but this did not work either.
No matter what I do, the mob never drops anything from the loot table, and as far as I can tell, the loot table and the mob aren't properly identifying with each other.
How do I set up a loot table for a custom mob?
The file path should be. "resources\data\yourmodid\loot_tables\entities\yourmobregistryname.json" Make sure the name of the file is exact to your entity registry.
That being said "obelessia:entites/flying" should translate correctly.
So I suspect an error in the .json file. But it probably is due to the file path
For example, let's say I created a Ghost entity for my Paranormal mod. My path will be "resources\data\paranormal\loot_tables\entities\ghost.json"
So can you get access to the file path and post it. From what you are telling us it should work.
If worst is the worst, you can override getLootTable() method and create your own resource location.