mirror of
https://github.com/neoforged/NeoForge.git
synced 2026-10-11 22:29:51 +00:00
Co-authored-by: XFactHD <[email protected]> Co-authored-by: Technici4n <[email protected]> Co-authored-by: sciwhiz12 <[email protected]> Co-authored-by: Matyrobbrt <[email protected]> Co-authored-by: Marc Hermans <[email protected]> Co-authored-by: Sara Freimer <[email protected]>
14 lines
860 B
Diff
14 lines
860 B
Diff
--- a/net/minecraft/client/renderer/LevelEventHandler.java
|
|
+++ b/net/minecraft/client/renderer/LevelEventHandler.java
|
|
@@ -311,8 +_,8 @@
|
|
break;
|
|
case 2001:
|
|
BlockState blockState = Block.stateById(data);
|
|
- if (!blockState.isAir()) {
|
|
- SoundType soundType = blockState.getSoundType();
|
|
+ if (!blockState.isAir() && !net.neoforged.neoforge.client.extensions.common.IClientBlockExtensions.of(blockState).playBreakSound(blockState, this.level, pos)) {
|
|
+ SoundType soundType = blockState.getSoundType(this.level, pos, null);
|
|
this.level
|
|
.playLocalSound(
|
|
pos, soundType.getBreakSound(), SoundSource.BLOCKS, (soundType.getVolume() + 1.0F) / 2.0F, soundType.getPitch() * 0.8F, false
|