Multiple Sounds in just one Block

Started by iSDMN on Sat, 06/27/2020 - 01:21

Topic category: Help with modding (Java Edition)

Last seen on 18:38, 7. Feb 2021
Joined Jun 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Multiple Sounds in just one Block
Sat, 06/27/2020 - 01:21

Hi, I'm pretty new to MCreator and I was trying to create a mod for 1.12.2 and I started from a storage like block, a barrel.

I encountered a few hickups which I'm not sure are a problem or not. Firstly I wanted to play two different sounds for the same block, as in, when opening the block, it would either choose one or the other randomly (it would also change its model, but I found a way to do that). In the same way, I wondered if there was a way to add a sound when closing that same block, meaning when the player pressed the "Esc" key it would play the closing sound of that block and consequently change to the initial block model. Exactly like a normal barrel would in minecraft 1.14. 

I searched the forums for a possible solution, but unfortunately found none. I also watched a ton of tutorials and couldn't find anything to help me. I apologize if this has been answered before, but I really want to know, thx.

PS: I'm not that great with code, but I'll try :D

Last seen on 22:49, 17. Mar 2021
Joined Jan 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
I don't know about the…
Wed, 07/01/2020 - 15:33

I don't know about the closing, but for opening, you could just have When Block Right Clicked, play sound *sound* at X Y Z.

Last seen on 18:38, 7. Feb 2021
Joined Jun 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
I've done that, the problem…
Sun, 07/05/2020 - 03:09

I've done that, the problem is that that only plays one sound, what I don't know how to do is, for example, play multiple sounds chosen at random in a list of 6 different sounds.

But thx anyways for trying to help!