Mindful Eating

Mindful Eating

13.7k Downloads

Milk Bucket- 'escaping' other foods?

TheVillain-Inc opened this issue ยท 12 comments

commented

Ahoy!

I've been fiddling around with adding other foods and I suspect this is something Diet handles, but thought I'd start at the top and work down.

I noticed when a player drinks a Milk Bucket it doesnt effect the food bar etc. However modded foods that dont hook into Diets tagging make the food bar disappear (because I'm guessing your mod doesn't know what to render). However the Milk Bucket implies some way of 'escaping' certain foods/consumables.

I've tried going at it upside down and just giving the modded foods (tea in this case) the sugar stat for Diet, but this isn't the perfect solution.

SO. Is there a way for your mod to 'ignore' foods that dont have any Diet tags, or is that something that Diet handles?

Any help, appreciated.

commented

Milk bucket isn't a food because it doesn't give any hunger points. There might be a way to make diet ignore modded foods, but if there isn't I could add something on my end.

commented

I see, that makes sense and adds up with what I've read about Diets systems. The dev of Diet specifically didn't want 'drinkables' or anything without hunger stats to have a food group, as this could then be consumed to spam the diet group for perks - even when the player is already full from food.

I guess this is what the milk bucket is doing, so I'm still confused as to why these modded drinkables (which have some effects but no food value) are causing the hunger bar to disappear - but the milk bucket isn't.

Further testing, it might be something Diet has to manage, but this doesnt (obviously) happen without mindful eating. Attached image for clarity.
hudcheck

commented

My guess is that those items might technically be registered as food even though they don't give any hunger points. I could change the code so that if the food has no groups, the last food eaten wouldn't change?

commented

That - sounds like what I'm going for. I'm trying to get Diet/Mindful Eating to just ignore them as they're just 'fun' foods with some minor buffs. Shame to wipe your last complex meals buffs in Mindful just because you wanted to have a tea.

I've prodded Diets Dev, because I can see that has space for datapacks and adding custom food groups - which would be a more reasonable solution and flexible for other modded content. But if you think its something Mindful needs to address, the above solution would be amazing.


Edit - I've noticed the offending objects do seem to have a 'slurping animation' followed by a very brief 'crunch' noise. So I'll have a nose at how they're implemented.
Create's tea for example, doesnt cause an issue, and has no crunch.
Farmers Respite...does.

commented

Alright, let me know if Diet isn't going to change it on their end so I can fix it on mine :)

commented

Unfortunately I've not heard anything back from the Diet author beyond a request for further details - they may simply be busy, or not interested in 'fixing' this. Which is fair.

I've prodded them to see what the case is, but I might have to ask for your help after all.

commented

Ahoy!

After some back and forth with Diets Dev - they've concluded that its not an issue with Diet, it is purely an interaction from Mindful Eating.
They have some suggestions on how it could be handled but you may have your own methods in mind.

illusivesoulworks/diet#118

If you have the time to fix this, I'd appreciate it, let me know if you need any further information from me. I'm happy to help, but my skill set is (currently) limited to datapacks/json.

commented

I have seen it, but I've been very busy and haven't had the chance to update the code. I'll let you know when I fix this issue. Thanks for your information!

commented

Hi there,

Just wondered if you'd had a chance to look at the above?

commented

I wanted to post this as a new issue, but I suspect this is a part of this bug as well: eating Neapolitan's Ice Cubes causes the hunger bar to completely vanish.

commented

Yup, can confirm. You'll have to give them a stat, but you cant escape it sadly.

commented

Alright I changed it so that the food isn't recorded if it has no groups in the latest curseforge version