Topic category: Help with Minecraft modding (Java Edition)
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
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.
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!