New Procedure - stop playing music when block destroyed

Published by cap174 on
Status
Fixed
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.