Diet (Fabric/Forge/Quilt)

Diet (Fabric/Forge/Quilt)

6M Downloads

[Five Food Groups]: Trying to 'escape' modded foods that are drinks.

TheVillain-Inc opened this issue ยท 5 comments

commented

If applicable, which other mod(s) is/are involved in your request?

https://www.curseforge.com/minecraft/mc-mods/farmers-respite
https://www.curseforge.com/minecraft/mc-mods/neapolitan
https://www.curseforge.com/minecraft/mc-mods/mindful-eating

What is the new support or change you're requesting?

So its a bit of an odd one and I can see a closed issue touches on this.

Drinkables.

I'm noticing that the Bucket of Milk currently escapes the Diet system neatly and has no effect, but some of the above mods add food items that - despite having zero hunger points- seem to interact with Diet and cause an issue with Mindful Eating (which builds on Diet, and effects the hunger bar icon to update with a visual representation of last food eaten's food groups).

Is there anyway I can go about creating a hidden food group or tagging these modded food items (tea, hot cocoa) to be ignored by Diet (similar to how the Milk Bucket is)?

I've already prodded Mindful Eating Dev, but I suspect its going to be something I hook into Diet, rather than going top down.

commented

Hm, that's strange. Anything that doesn't actually provide hunger values, even if they can be eaten, shouldn't add to Diet at all. Can you provide specific examples of foods that seem to add to Diet but do not have any hunger values so that I can investigate further?

commented

Certainly!

https://www.curseforge.com/minecraft/mc-mods/farmers-respite
Black Tea, Rose hip tea, green tea, coffee - all the teas seem to be interacting on some level.

The end issue I'm having is with Mindful eating which uses Diet as a backbone.

Mindful eating updates the HUD to show the food groups last eaten - for example:
mixed food

However when Farmers Respite Teas are consumed it wipes the bar as it doesn't know what food group they're from.
hudcheck

Interestingly Creates Builders Tea doesn't do this - and again nor does minecrafts Milk Bucket. Despite them both behaving similarly.

I have noticed Farmers Respite Tea does have a 'cronch' noise right at the end after 'slurping'.


Edit - I've asked Mindful Eating's author about it, and they have a solution of a sorts, but I suspect the root cause is in how Diet is seeing these foods. If I could implement something more flexible for modded foods/drinkables/etc this may help future players/mod makers with compat down the line.

commented

Just wanted to check in on this -

Did you need more information from me (I assumed the above would have been clear enough but may not be)?

commented

Hey,

No apology necessary, thank you for taking the time to look into this.

What you've outlined above makes sense from a laymans perspective and based on my interactions with it in game. I'll get back to Mindful eating's Dev and pass this information on so they can implement an appropriate solution.

Thanks for getting back to me, and thanks for your time ๐Ÿ‘

commented

Sorry for the delay, just got around to looking into this properly. Don't worry, you gave me all the information necessary.

I think this is ultimately an issue that Mindful Eating should fix on their end. The problem is that the drinkable items that you listed are coded as food items, which is what triggers Mindful Eating to store the data. Then it probably errors or renders nothing when it sees that the last food eaten does not have any food groups from Diet. Mindful Eating should probably check first to see if the food it's storing has any food groups before storing it, or perhaps checking if it has any food values, depending on which implementation the developer finds more suitable.

I don't think there's anything I can do on my end to better serve this issue since these drinkables currently do not get consumed by Diet's systems, which is the correct behavior. In my testing, the drinkables do not cause any of Diet's consumption code to be run.