Stormwind99 / FoodFunk

Minecraft mod: What is that funky smell in my backpack? Food spoils over time unless preserved. Configure any item to rot, any container to preserve items.
https://minecraft.curseforge.com/projects/food-funk
GNU Lesser General Public License v3.0
10 stars 8 forks source link

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

Open nephatrine opened 5 years ago

nephatrine commented 5 years ago

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.

Stormwind99 commented 4 years ago

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