调整音效,改版本号

This commit is contained in:
Atsuihsio 2025-01-08 19:45:36 +08:00
parent 3e72c22bf9
commit 75e9d226ff
3 changed files with 3 additions and 7 deletions

View file

@ -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

View file

@ -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

View file

@ -31,7 +31,7 @@ public class ClientSoundHandler {
return;
}
List<Entity> engineVehicle = SeekTool.getVehicleWithinRange(player, player.level(), 196);
List<Entity> 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 {