Fix mechanical drill and saw using the wrong SoundSource (#7038)

This commit is contained in:
justliliandev 2025-01-10 18:24:38 +01:00 committed by GitHub
parent d8310a6fb9
commit 18fb3b4beb
Failed to generate hash of commit

View file

@ -110,7 +110,7 @@ public abstract class BlockBreakingKineticBlockEntity extends KineticBlockEntity
float breakSpeed = getBreakSpeed();
destroyProgress += Mth.clamp((int) (breakSpeed / blockHardness), 1, 10 - destroyProgress);
level.playSound(null, worldPosition, stateToBreak.getSoundType()
.getHitSound(), SoundSource.NEUTRAL, .25f, 1);
.getHitSound(), SoundSource.BLOCKS, .25f, 1);
if (destroyProgress >= 10) {
onBlockBroken(stateToBreak);
@ -142,7 +142,7 @@ public abstract class BlockBreakingKineticBlockEntity extends KineticBlockEntity
return;
if (level.restoringBlockSnapshots)
return;
ItemEntity itementity = new ItemEntity(level, vec.x, vec.y, vec.z, stack);
itementity.setDefaultPickUpDelay();
itementity.setDeltaMovement(Vec3.ZERO);