Food Funk

Food Funk

443k Downloads

Does it work with items that have different indices under the same registry name?

nephatrine opened this issue ยท 1 comments

commented

Is your feature request related to a problem? Please describe.
I would like some items like ink sacs and cocao beens to rot. I am not sure how to reference these in the configuration file and don't see any documentation around it. I've tried minecraft:dye:0 for ink sacs but that doesn't work?

Describe the solution you'd like
I would like documentation of how to reference such items that are sub-items like dyes or the food in tinkers where it shares a name and just has different damage values. If such items are not supported without affecting the items residing at the other damage values then I would like that functionality added.

Describe alternatives you've considered
Would using crafttweaker to add an ore dictionary entry for that specific item like listAllinksacs and then using that ore dictionary entry in the foodfunk config work? That's the only other way I can think of but not ideal as it requires another mod. Yeah this doesn't work either.

Additional context
Even outside dye, there's mods where they put a huge variety of different items under a single registry id like Tinker's slime balls and jerky both being under tconstruct:edible. It would be nice to put separate rot totals on each.

commented

Yes, I need to document the matchingConfig/nameKey system.

To start, you can enable debugging by setting Game Options->Mod Options->Wumple Util Library->debugging->Debug mode to true.

Then enable Minecraft's Advanced Tooltips to shown by hitting F3+H.

Now hover over an item in your inventory: in the tooltip, for each group it will show nameKey: in the order from most specific to least specific the item.

For a dirt block item, it lists: minecraft:dirt@0, minecraft:dirt, dirt
For black dye/ink sack, it lists: minecraft:dye@0, minecraft:dye, dyeBlack, dye
For blue dye/lapis lazuli, it lists: minecraft:dye@4, minecraft:dye, gemLapis, dyeBlue, dye

To match items with metadata, use the at sign @ followed by the metadata number to match items with that specific metadata value. So for the ink sac, use minecraft:dye@0

The rules that generate the nameKeys for things are in the source file: https://github.com/Stormwind99/WumpleUtil/blob/master/src/main/java/com/wumple/util/config/NameKeys.java