Wabbit0101 / mods_hoardercraft

Wild and wacky ways to hoard ALL the loot (crops, food, materials, gems, etc.) you generate in Minecraft!
GNU General Public License v3.0
11 stars 4 forks source link

[suggestion]auto-detect ItemArmor #64

Open Jackiecrazy opened 5 years ago

Jackiecrazy commented 5 years ago

I don't know how easy it would be depending on the specific implementation but it would really help pack creators. Check if the item is an instance of ItemArmor and if it is, whether its slot corresponds to the slot of the underwear, and if so generate the output. Then whitelist could then be used to add odd cases (e.g. mob heads) or exclude armor items that would be too powerful with this level of adjustment (erm... can't think of any right now)

Wabbit0101 commented 5 years ago

Probably not going to add full item registry scanning as it's rather expensive (and much worse from 1.13 on). Also, assuming ItemArmor = allowed may be fine for some players/pack-authors but not-so-fine for others as it could really screw up progression which is something a lot of people playing with a mod like TAN have...

Can you give me an idea of how many armor pieces we're talking about there? I played around with a few mods for testing and honestly I couldn't find a case where I wanted ALL the custom armors from any particular mod to be automatically included (Silent's Gems/Gear, Armory Construct, ArmorPlus, Twilight Forest, Base Metals, Cyclic Magic, etc.)

Jackiecrazy commented 5 years ago

Advent of Ascension has 257 armor pieces. And the item registry won't have to be scanned, the output can be dynamically generated based on input and some IRecipe tweaking (unless TAN registers all their temperature-modifying items before the game fully starts, but that'd be a strange way to design it. Haven't looked deeply into their code yet)

Wabbit0101 commented 5 years ago

There's already custom recipes for the armor lining/snipping/etc. The lining recipe is based on an ore-dict tag that's matched by the builtin Forge recipe (eg 'itemChestplate', 'itemLeggings', etc.) as well as an ItemArmor check. The config is just a way to let the mod do the registration under that ore dict for you. Basically the suggestion is to remove that pre-check that uses the ore-dict and just assume it's ok because it's an ItemArmor piece. In the current version I decided not to do that on purpose as I was really only modifying vanilla and vanilla+ armor in my pack.

I'm having to have a rethink about how to implement these recipes in 1.13.2 Forge anyway as dynamic tag groups are not as trivial as they were pre-1.13. So yea, I might just dump the whole pre-check in which case viola! your suggestion is implemented!