How to play music while you're in water for some time

Started by RedCorr on

Topic category: Help with Minecraft modding (Java Edition)

Joined Sep 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to play music while you're in water for some time

Hello! Recently was interested in making a client-sided mod that allows you to play specific music if you're in water for a long period of time.
Can I actually make that? If so, what code do i need to write?

Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You could probably use theā€¦
Sun, 07/10/2022 - 00:26

You could probably use the world trigger on player tick update to start playing the music randomly. Just be careful when using Tick Update world triggers as they can cause performance issues if the procedure is too big.