Topic category: Help with Minecraft modding (Java Edition)
I created an effect that necessarily can only be canceled by another item in the game the problem is that milk removes all effects from the player
My first idea would be to make the item that removes the effect put another effect
What would happen and when the potion ran out it would check if the player has a certain ''effect'' and send a message if the player didn't just reapply the effect, this last option would happen if the player drinks milk, if the player drinks milk he gets nothing, and then the potion would detect this and reapply the effect
I've already heard that I could do it with NBT tags but that doesn't help either, it seems that nothing is able to prevent the milk from removing the effects
I think that image doesn´t work because the procedure is called after the milk removed the effect, then the first condition is false
You need the PotionRemoveEvent trigger, but it looks like MCreator hasn't added it yet.
Don't worry I think I got it, basically when the potion runs out it casts another potion that does nothing, this new potion would be a variant of the main one, so when effect A runs out it casts A1 and that effect checks for a counter effect, so if you have the bleeding effect in my mod you need to use a bandage that will give you the bandaged effect if you don't have the effect it the bleeding will be reapplied in the same second, thus making the milk useless
make a text NBT -> haveYourEffect and mark it when it drink the potion, make on playercheck update check for the NBT mark, if yes -> give potion effect, this will make milk useless for your specific effect