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

Config file has unexpected priorities #24

Closed esotericist closed 6 years ago

esotericist commented 6 years ago

Near as I can tell, a config entry without metadata (such as I:"minecraft:fish"=7) takes precedence over a config entry with metadata (such as I:"minecraft:fish:0"=22).

Since the config handler automatically adds its default entries, this makes it impossible to specify different rot durations for the different types of vanilla fish (which I mostly want to do for pupperfish reasons).

As a general rule of software development, more specific entries should generally take precedence over less specific.

In the same vein: minecraft:food is taking precedence over the rest of the config entries with metadata, when it absolutely should be the last thing considered. (and similarly, since it's in the default configuration, it's currently impossible to specify rot times for food items with metadata)

esotericist commented 6 years ago

I stand corrected: right now I think the metadata format is being ignored in general (despite being accepted by the config handler). When I swapped: I:"minecraft:tallgrass"=70 to I:"minecraft:tallgrass:1"=70, it stopped putting a rot time on tall grass.

so either it's not working, or that's not the format (and #23 is the concern)

esotericist commented 6 years ago

Aight, I finally thought to try I:"minecraft:tallgrass@1"=70, and that did work as expected, and my report here is erroneous. I just needed to know the correct format as per #23.