How do i check if the player has drunk the minecraft water bottle?`

Started by RealACKtbt on

Topic category: Help with modding (Java Edition)

Last seen on 04:45, 22. Jan 2023
Joined Dec 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do i check if the player has drunk the minecraft water bottle?`

Hello. I am trying to make a thirst system for my mod and the last thing i need is to check if the player has used a water bottle. I have the code and it runs well with other items like bread, etc, but i cannot make it specific to water bottles as the 'water bottle' is a Item.POTION, where each other potion is the same. I have read a thread on this but it wasn't explained well enough for me to understand it, and the link had expired. Thanks for the help.

Last seen on 04:45, 22. Jan 2023
Joined Dec 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Bump
Thu, 01/12/2023 - 09:41

Bump

Last seen on 15:56, 2. Dec 2023
Joined Feb 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hi RealACKtbt,   I would…
Fri, 02/17/2023 - 17:16

Hi RealACKtbt,

 

I would recommend you to create a new effect:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Go to Triggers and use:

 

 

 

 

 

Here you put the code that triggers the water system you made (im just going to use a simple chat command):

 

 

 

 

 

 

Go back to the effects triggers and select the trigger you just set up!

 

Then go to your potion and add it:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Set the Parameters like this:

 

 

 

 

 

 

 

I Tested It too:

https://ibb.co/qxZ9Ckw

 

Hope this Helps You!