Open SilentChaos512 opened 4 years ago
Maybe we can collaborate on this. Happy to add code for nbt data to make it work. Or some sort of intermod compatibility? Or the loot table stuff. Let me know.
Whatever you feel works best. I suggested loot tables because that would be the most versatile solution, allowing pack makers a lot of creative freedom.
If you want to support Silent Gear specifically, you can use the GearGenerator class to create randomized gear. I have Silent Gear on a Bintray maven repo at https://dl.bintray.com/silentchaos512/silent-gear/.
Can you briefly explain what you mean by using loot tables to help me understand what I need to do? Thanks.
One option is to allow a loot table to be specified in the config, then generate loot from that. Take the first item generated (if any) and ignore the rest. The code could look something like this, although the LootContext
might need different parameters.
Had a user asking about giving mobs Silent Gear equipment with this mod (comment: https://www.curseforge.com/minecraft/mc-mods/silent-gear?comment=256). Silent Gear items without NBT won't function correctly and they can't be separate items. It's similar to Tinkers Construct.
One possible solution would be to allow loot tables to generate equipment. Silent Gear already has functions for generating random or specific gear items with loot tables. This could allow better compatibility with many other mods as well.
(edit) You could probably find a way to incorporate this into the existing config. No need to break compatibility with existing configs.