How do I make a sound play only once in a entity tick update procedure?

Started by Guy Of Silliness232 on

Topic category: Help with modding (Java Edition)

Last seen on 06:19, 8. Oct 2024
Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do I make a sound play only once in a entity tick update procedure?

Hi. 

 

I have a entity that is set to increase speed when it sees a entity. I want it to play a sound only when it starts increasing speed but not while it is increasing speed. The problem is that it constantly plays the sound every tick when it is in this state. Any help?

It's also in the entity tick update.

Last seen on 06:19, 8. Oct 2024
Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I'm also too lazy to use NBT…
Sun, 07/14/2024 - 04:12

I'm also too lazy to use NBT Timers.