Files
NeoForge/patches/net/minecraft/client/renderer/LevelEventHandler.java.patch
T
b160270bd5 Port to 26.3 (#3403)
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]>
2026-09-16 03:08:09 +08:00

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