diff --git a/src/main/java/com/atsuishio/superbwarfare/item/BeamTest.java b/src/main/java/com/atsuishio/superbwarfare/item/BeamTest.java index b399b741a..75bb9e4c3 100644 --- a/src/main/java/com/atsuishio/superbwarfare/item/BeamTest.java +++ b/src/main/java/com/atsuishio/superbwarfare/item/BeamTest.java @@ -37,10 +37,14 @@ public class BeamTest extends Item { @Override public InteractionResultHolder use(Level level, Player player, InteractionHand hand) { + if (player.level().isClientSide) { + player.playSound(ModSounds.CHARGE_RIFLE_FIRE_1P.get(), 1, 1); + } else { + player.playSound(ModSounds.CHARGE_RIFLE_FIRE_3P.get(), 2, 1); + } + player.getCapability(ModCapabilities.LASER_CAPABILITY).ifPresent(capability -> { player.startUsingItem(hand); - player.playSound(ModSounds.CHARGE_RIFLE_FIRE_1P.get(), 1, 1); - if (!level.isClientSide) { double px = player.getX(); double py = player.getY() + player.getBbHeight() * 0.6F; @@ -50,7 +54,6 @@ public class BeamTest extends Item { LaserEntity laserEntity = new LaserEntity(player.level(), player, px, py, pz, yHeadRotAngle, xHeadRotAngle, 6000); capability.init(new LaserHandler(player, laserEntity)); capability.start(); - player.playSound(ModSounds.CHARGE_RIFLE_FIRE_3P.get(), 1, 1); } }); @@ -74,7 +77,7 @@ public class BeamTest extends Item { beamTest.getChargeSound().forEach(sound -> { var clientboundstopsoundpacket = new ClientboundStopSoundPacket(sound.getLocation(), SoundSource.PLAYERS); final Vec3 center = new Vec3(player.getX(), player.getY(), player.getZ()); - for (ServerPlayer player1 : player.level().getEntitiesOfClass(ServerPlayer.class, new AABB(center, center).inflate(32), e -> true).stream().sorted(Comparator.comparingDouble(e -> e.distanceToSqr(center))).toList()) { + for (ServerPlayer player1 : player.level().getEntitiesOfClass(ServerPlayer.class, new AABB(center, center).inflate(48), e -> true).stream().sorted(Comparator.comparingDouble(e -> e.distanceToSqr(center))).toList()) { player1.connection.send(clientboundstopsoundpacket); } }); diff --git a/src/main/resources/data/superbwarfare/guns/glock_17.json b/src/main/resources/data/superbwarfare/guns/glock_17.json index ca56cb181..c002b906f 100644 --- a/src/main/resources/data/superbwarfare/guns/glock_17.json +++ b/src/main/resources/data/superbwarfare/guns/glock_17.json @@ -16,6 +16,6 @@ "normal_reload_time": 30, "EmptyReloadTime": 35, "BypassesArmor": 0.15, - "SoundRadius": 10, + "SoundRadius": 8, "rpm": 400 } \ No newline at end of file diff --git a/src/main/resources/data/superbwarfare/guns/glock_18.json b/src/main/resources/data/superbwarfare/guns/glock_18.json index 496bc1264..c7a95d853 100644 --- a/src/main/resources/data/superbwarfare/guns/glock_18.json +++ b/src/main/resources/data/superbwarfare/guns/glock_18.json @@ -16,6 +16,6 @@ "normal_reload_time": 30, "EmptyReloadTime": 35, "BypassesArmor": 0.15, - "SoundRadius": 16, + "SoundRadius": 8, "rpm": 1300 } \ No newline at end of file