From 75e9d226ff4c8d6bb64b86780d26e946cdb257ef Mon Sep 17 00:00:00 2001 From: Atsuihsio <842960157@qq.com> Date: Wed, 8 Jan 2025 19:45:36 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E9=9F=B3=E6=95=88=EF=BC=8C?= =?UTF-8?q?=E6=94=B9=E7=89=88=E6=9C=AC=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gradle.properties | 2 +- .../com/atsuishio/superbwarfare/entity/vehicle/Ah6Entity.java | 4 ---- .../com/atsuishio/superbwarfare/event/ClientSoundHandler.java | 4 ++-- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/gradle.properties b/gradle.properties index 270184cba..98d79e734 100644 --- a/gradle.properties +++ b/gradle.properties @@ -13,5 +13,5 @@ mod_description=A Warfare Mod minecraft_version=1.20.1 jei_version=15.2.0.27 cloth_config_version=11.1.106 -mod_version=0.3.5 +mod_version=0.3.6 mod_authors=Atsuishio, Roki27, Light_Quanta \ No newline at end of file diff --git a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Ah6Entity.java b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Ah6Entity.java index 984f89f3a..bf4c63a5b 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Ah6Entity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Ah6Entity.java @@ -318,10 +318,6 @@ public class Ah6Entity extends ContainerMobileEntity implements GeoEntity, IHeli engineStart = false; engineStartOver = false; } - -// if (level().isClientSide) { -// level().playLocalSound(this.getX() + this.getDeltaMovement().x, this.getY() + this.getBbHeight() + this.getDeltaMovement().y + 0.06, this.getZ() + this.getDeltaMovement().z, this.getEngineSound(), this.getSoundSource(), Math.max((this.upInputDown ? 10f : 3f) * 6 * this.entityData.get(POWER) - 0.038f, 0), (random.nextFloat() * 0.1f + 1.0f), false); -// } } @Override diff --git a/src/main/java/com/atsuishio/superbwarfare/event/ClientSoundHandler.java b/src/main/java/com/atsuishio/superbwarfare/event/ClientSoundHandler.java index f54f641f0..9f2a75e6d 100644 --- a/src/main/java/com/atsuishio/superbwarfare/event/ClientSoundHandler.java +++ b/src/main/java/com/atsuishio/superbwarfare/event/ClientSoundHandler.java @@ -31,7 +31,7 @@ public class ClientSoundHandler { return; } - List engineVehicle = SeekTool.getVehicleWithinRange(player, player.level(), 196); + List engineVehicle = SeekTool.getVehicleWithinRange(player, player.level(), 192); for (var e : engineVehicle) { if (e instanceof MobileVehicleEntity mobileVehicle){ @@ -45,7 +45,7 @@ public class ClientSoundHandler { SoundEvent engineSound = mobileVehicle.getEngineSound(); float distanceReduce; if (e instanceof Ah6Entity ah6Entity) { - distanceReduce = (float) (1 - distance / 64); + distanceReduce = (float) Math.max((1 - distance / 128), 0); if (player.getVehicle() == ah6Entity) { player.playSound(ModSounds.HELICOPTER_ENGINE_1P.get(), 2 * (mobileVehicle.getEntityData().get(PROPELLER_ROT) - 0.012f), (float) ((2 * Math.random() - 1) * 0.1f + 1.0f)); } else {