From 7e4f5eaf9c0aa0c0d327cd1a4a53e06d191cd4c1 Mon Sep 17 00:00:00 2001 From: Atsuihsio <842960157@qq.com> Date: Sun, 9 Mar 2025 20:24:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=82=AE=E5=A1=94=E6=97=8B?= =?UTF-8?q?=E8=BD=AC=E9=9F=B3=E6=95=88=E6=92=AD=E6=94=BE=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../superbwarfare/entity/vehicle/base/VehicleEntity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/base/VehicleEntity.java b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/base/VehicleEntity.java index 43d3d3621..ab2c8f38c 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/base/VehicleEntity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/base/VehicleEntity.java @@ -215,7 +215,7 @@ public abstract class VehicleEntity extends Entity { } public void turretTurnSound(float diffX, float diffY, float pitch) { - if (level().isClientSide && java.lang.Math.max(Mth.abs(diffX), Mth.abs(diffY)) > 0) { + if (level().isClientSide && (java.lang.Math.abs(diffY) > 0.5 || java.lang.Math.abs(diffX) > 0.5)) { level().playLocalSound(this.getX(), this.getY() + this.getBbHeight() * 0.5, this.getZ(), ModSounds.TURRET_TURN.get(), this.getSoundSource(), (float) java.lang.Math.min(0.15 * (java.lang.Math.max(Mth.abs(diffX), Mth.abs(diffY))), 0.75), (random.nextFloat() * 0.05f + pitch), false); } }