Add sound to block

Started by PWPOZITIV on

Topic category: Help with Minecraft modding (Java Edition)

Active 2 years ago
Joined Aug 2022
Points:
262

User statistics:

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

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

Active 2 years ago
Joined Aug 2022
Points:
264

User statistics:

  • Modifications: 0
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 4
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:

Active 1 year ago
Joined Jul 2022
Points:
268

User statistics:

  • Modifications: 0
  • Forum topics: 0
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 1
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.

Active 1 year ago
Joined Sep 2023
Points:
90

User statistics:

  • Modifications: 0
  • Forum topics: 0
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 2
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:

Active 1 year ago
Joined Sep 2023
Points:
90

User statistics:

  • Modifications: 0
  • Forum topics: 0
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 2
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)