Trouble with sounds

Started by Lizardinthedeep on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jul 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Trouble with sounds
Tue, 07/18/2023 - 01:08 (edited)

I'm trying to add sounds when I use an item however when I use the item it plays the sound for every other item you use. I need help with how to add it so the sound only plays for one item only.

Edited by Lizardinthedeep on Tue, 07/18/2023 - 01:08
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Is your custom item playing…
Tue, 07/18/2023 - 01:18

Is your custom item playing a default item sounds, or are all items playing your custom sounds?

Either way, just write a procedure to play the sound when you right click with the item, either connecting it exclusively to the 'item used' trigger of the custom item, or making it so it's triggered by right clicking with an item, but then only plays if the item in the player's main or off hand is the custom item.

You might also want to add cooldown to the item so the sound can't be spammed, otherwise the sound may play multiple times on use.

Joined Jul 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Would you know how I can do…
Tue, 07/18/2023 - 02:27

Would you know how I can do that with using the procedure block instead of write out the code?