As you might expect, I searched far and wide for a current tutorial on implementing custom effects. I also searched for "custom potion effects" here at Modder Support, to no avail - there was one particular thread (the one specifying that it's NOT supposed to be a custom effect, but a custom potion item - the exact opposite of what I want to achieve) that kept showing up multiple times, so I gave that idea up.
What I'm trying to do is a custom effect that is not bound to any particular potion - and I definitely do not want any extra potions showing up in Creative. This effect has several levels of intensities that stack up.
I have this heavily "@Override"-n ItemFood, let's say FructoseGlucoseBomb. Once eaten (onItemUse), instead of nullifying its ItemStack, the item gets damaged, let's say it's got 8 durability overall. Every "consumption" either applies the SugarRush status effect (if the player is not under it already) or increases the intensity of the effect, based on several factors. Also, depending on the intensity of the SugarRush, it would also cause the player to gain other status effects, on random, with random duration etc, like Speed II, Jump Boost or... Blindness. You know. Because of diabetes. Sugar's bad for you, kids. TL;DR, a status effect, with stackable amplitude, caused by consuming a damageable food item (that bit is done, works like a charm), not by drinking potions, which also causes other random status effects (vanilla/custom), and that status effect does not register a potion.
So it wouldn't be a potion that's calling the effect, it would be an instance of ItemFood or a class that extends it. But I still want full "status effect" functionality, like amplitude, duration, consumables that "heal" it etc.
Unfortunately, I couldn't find any tutorials or open-source mods that do such a thing - you know, a status effect not brought on by a potion, but ItemFood.
If you could point me to some resources on the subject, I'd be forever grateful! Thanks!