Started by
HummingBird
on
Topic category: Help with modding (Java Edition)
I'm trying to make it so you when a player has a potion effect active, numbers will appear telling them how much time is left on their effect. I'm also pretty new at working with mcreator and stuff so nice and descriptive help would be nice, thanks in advance
Edited by HummingBird on Tue, 10/06/2020 - 17:42
I think there should be an procedure block for "get duration of potion ____".
You may be able to have a procedure that runs every tick and sets a global player-lifetime variable to the potion duration. And then have an overlay that displays that variable.
However, this would only work if a specific potion effect is listed, you may need to have it set for every potion. But then, since it would be trying to show all of them, you could have it so it checks for the highest one. Using is __>___ and such. Though, that would take a long while and a lot of ___>___s.
So it may be better just to leave things as is. After all, vanilla minecraft already lists potion effect durations while the inventory is open. But that's of course your choice.