[Tutorial] Tool effects whilst in Liquids

Started by Echo Animates on

Topic category: Help with Minecraft modding (Java Edition)

Joined Aug 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
[Tutorial] Tool effects whilst in Liquids

Hello there modders! I'm going to keep this short so I can show you the code but also tell you how it works!

CODE:

The code.

 

Guide:

  1. Get your item/tool
  2. Go to triggers and make a "When tool in hand tick" procedure.
  3. Create the code listed above. (Replace the effects with the ones you want)
  4. Have fun!

    HM: You can switch the "Is () in water" with "Is () in lava".

    HOW IT WORKS:

    Basically, it checks every tick (50 milliseconds) to see if you're in water/lava.
    When it detects you're holding out the tool whilst in the liquid, it gives you the effects listed.