New Procedure - stop playing music when block destroyed

Published by cap174 on Sat, 02/16/2019 - 09:39
Status
Fixed
Product/platform
Not applicable
Priority
Normal
Issue description

Hello!

I have a new idea for a procedure - a way to stop playing music when a block is destroyed. This would be really useful for custom jukeboxes and other music playing devices.

Issue comments

I am not sure if it is possible to stop specific sound without a lot of code, but you can stop all sounds using

Minecraft.getMinecraft().getSoundHandler().stopSounds();

We will consider adding this procedure block.

I could definitely use this. I have some bosses that are designed to play boss music when they are alive, and the music carries on even after they are dead. A procedure block to stop sounds would be very helpful for that.

Unfortunately, this function is client side only. You can still use it (just paste the snippet in the custom code procedure block), but we won't add this as official procedure block as this block would crash servers.



Donate to MCreator

By donating to developers you can speed up development, as with more resources, we can dedicate more time to MCreator. It is a free project made by developers working on it in their free time.