From d95a0233a44f2b41918cf639ab288928e4623454 Mon Sep 17 00:00:00 2001 From: jiink Date: Thu, 18 Apr 2024 15:41:57 -0700 Subject: [PATCH] more breaking sounds --- .../smeltinginapinch/WoodenFurnaceBlockEntity.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main/java/jiink/smeltinginapinch/WoodenFurnaceBlockEntity.java b/src/main/java/jiink/smeltinginapinch/WoodenFurnaceBlockEntity.java index 3c55992..218a057 100644 --- a/src/main/java/jiink/smeltinginapinch/WoodenFurnaceBlockEntity.java +++ b/src/main/java/jiink/smeltinginapinch/WoodenFurnaceBlockEntity.java @@ -19,6 +19,8 @@ import net.minecraft.screen.PropertyDelegate; import net.minecraft.screen.ScreenHandler; import net.minecraft.server.network.ServerPlayerEntity; +import net.minecraft.sound.SoundCategory; +import net.minecraft.sound.SoundEvents; import net.minecraft.state.property.Properties; import net.minecraft.text.Text; import net.minecraft.util.collection.DefaultedList; @@ -123,6 +125,14 @@ public void tick(World world, BlockPos pos, BlockState state) { //world.createExplosion(null, (double)pos.getX(), (double)pos.getY(), (double)pos.getZ(), 4.0f, true, ExplosionSourceType.MOB); // make block breaking particles and sound world.syncWorldEvent(WorldEvents.BLOCK_BROKEN, pos, Block.getRawIdFromState(state)); + world.playSound( + null, + pos, + SoundEvents.BLOCK_SCAFFOLDING_BREAK, + SoundCategory.BLOCKS, + 1f, + 0.75f + ); // destroy block and replace it with fire world.setBlockState(pos, net.minecraft.block.Blocks.FIRE.getDefaultState()); }