Topic category: Help with Minecraft modding (Java Edition)
I saw a post on how to do this using nbt tags, the only problem is that what should happen would be for the tag to disappear when the potion expires, but the milk makes the potion expire what to make it go over the nbt tag
I think that's what happens
1.Player gets the potion ''A'' and now the NBT tag ''effect A'' is true
2.the word checks player ticks and with they have ''effect A'' true they will give to the player potion ''A'''
3.But it needs a way to make the ''effect A'' goes to true to false
4.So i make when the potion expires the NBT ''effect A'' goes to true to false ending the potion effect
5.when he drinks milk it removes the effects of the potion which is the same as making it expire, there is no difference between the potion expiring or it being removed from the player, by doing so the milk removes the potion and removes the NBT tag
Maybe there is a simpler solution but I don't see it here, could someone help me?
i think that what you can do is instead of a continuous timer set a timer that will give the effect repeatedly every tick than even if you drink milk the effect will be given again. I hope i could help you.
actually it would work for some effects only, those that do something when the potion expires would fall into the same problem I described above