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

Started by JPZamps on

Topic category: Help with Minecraft modding (Java Edition)

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

Joined Dec 2019
Points:

User statistics:

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

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

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.

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

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