Skip to content

Commit

Permalink
more breaking sounds
Browse files Browse the repository at this point in the history
  • Loading branch information
jiink committed Apr 18, 2024
1 parent 44aa2e7 commit d95a023
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/main/java/jiink/smeltinginapinch/WoodenFurnaceBlockEntity.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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());
}
Expand Down

0 comments on commit d95a023

Please sign in to comment.