i want to stop players from using milk to remove the effects i created

Started by JPZamps on

Topic category: Help with modding (Java Edition)

Last seen on 15:41, 28. Mar 2024
Joined Dec 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
i want to stop players from using milk to remove the effects i created

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

 

 

Procedure showing what its said below



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

Last seen on 15:41, 28. Mar 2024
Joined Dec 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
(No subject)
Wed, 01/11/2023 - 21:01

Last seen on 05:57, 3. Nov 2023
Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I think that image doesn´t…
Tue, 02/07/2023 - 12:32

I think that image doesn´t work because the procedure is called after the milk removed the effect, then the first condition is false

Last seen on 01:06, 14. Mar 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You need the…
Wed, 03/15/2023 - 04:28

You need the PotionRemoveEvent trigger, but it looks like MCreator hasn't added it yet.

Last seen on 15:41, 28. Mar 2024
Joined Dec 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Don't worry I think I got it…
Wed, 03/15/2023 - 16:03

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

Last seen on 04:46, 14. Mar 2024
Joined Nov 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
make a text NBT ->…
Wed, 12/20/2023 - 04:44

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