Add sound to block

Started by PWPOZITIV on

Topic category: Help with modding (Java Edition)

Last seen on 18:55, 10. Aug 2022
Joined Aug 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Add sound to block

I created a lamp and I want it to make a buzzing sound.  Tell me how can this be done?

Last seen on 21:06, 11. Sep 2022
Joined Aug 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You could try making it so…
Wed, 08/10/2022 - 13:33

You could try making it so when the block is right clicked, it runs a command that plays the sound at the blocks position

Ese the block execute command at x: y: z:

Last seen on 20:16, 20. May 2023
Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Is there a way to do this…
Wed, 05/17/2023 - 20:05

Is there a way to do this without requiring a right-click trigger? So it's, like, ambient or something? Like how water sounds when flowing or how lava pops.

Last seen on 01:27, 12. Oct 2023
Joined Sep 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Yes. You can make it trigger…
Thu, 09/21/2023 - 00:38

Yes. You can make it trigger the sound on place but it may stop playing if you disconnect then reconnect so you might want to do something like this on update tick:

Last seen on 01:27, 12. Oct 2023
Joined Sep 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
replace 0 with however long…
Thu, 09/21/2023 - 00:39

replace 0 with however long it takes for the sound to stop playing in ticks. (if you didn't know already, 20 ticks is one second)