[Request] Creating new loot tables
belathus opened this issue ยท 7 comments
I'm trying to add a new empty loot table to the modpack so I can add drops to mobs in an EvilCraft spirit furnace that don't currently use loot tables for their drops (IE: Animania).
For reference, I'm still running 1.10.2.
The relevant section of EvilCraft's config is linked here: https://github.com/belathus/Wanderlust-Renewed/blob/master/config/evilcraft.cfg#L447-L449
Already on the to-do list. Until I can find time to add that feature, you can use ResourceLoader to add an empty loot table, which you can then tinker with using LootTweaker. I think that should work, I'm not sure if vanilla registers loot tables added through resource packs with the loot table list. If it doesn't, LootTweaker won't be able to find loot tables added through resource packs.
I tried to implement this the other day, it looks like it's not possible in 1.12. I had a look at the 1.13 loot system code by decompiling a snapshot, it looks like this may be viable in 1.13. It's hard to tell as the obfuscation makes the decompiled code hard to read.
Couldn't you just do what ContentTweaker does and use a loader to support adding new loottables early in preinit, so they exist later when you try to alter it with loottweaker.
No, the issue is with where MC 1.12 loads loot tables from, it has nothing to do with the loading stage,
Ah yeah, I figured after toying with it a bit myself. Bummer, Hopefully 1.13 and datapacks will make it easier to work with.
Couldn't you just do what ContentTweaker does and use a loader to support adding new loottables early in preinit, so they exist later when you try to alter it with loottweaker.
for example
// load script early with "#loader loottweaker"
CraftTweakerAPI.tweaker.loadScript(false, LootTweakerMain.Constants.MODID);
called during preinit
For the record, I tried using resourceloader and it does not seem to work.
Available in 0.2.0, at long last!
https://www.curseforge.com/minecraft/mc-mods/loottweaker/files/2988990
There's a test release for this now, if either of you are interested in testing it.
https://github.com/Daomephsta/LootTweaker/releases/tag/create-table-pre1