From 2e868528f7c5f48a6cabeeb75497d57244ba5807 Mon Sep 17 00:00:00 2001 From: xtex Date: Sat, 29 Jul 2023 16:42:58 +0800 Subject: [PATCH] fix: crash with RS --- .../kotlin/quaedam/projection/swarm/ProjectedPersonEntity.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/src/main/kotlin/quaedam/projection/swarm/ProjectedPersonEntity.kt b/common/src/main/kotlin/quaedam/projection/swarm/ProjectedPersonEntity.kt index e25d032..8c0ee8d 100644 --- a/common/src/main/kotlin/quaedam/projection/swarm/ProjectedPersonEntity.kt +++ b/common/src/main/kotlin/quaedam/projection/swarm/ProjectedPersonEntity.kt @@ -254,7 +254,7 @@ class ProjectedPersonEntity(entityType: EntityType, level: Le override fun getVoicePitch() = super.getVoicePitch() * (random.nextFloat() * 0.55f + 0.7f) - override fun getAmbientSoundInterval() = 80 - random.nextInt((findNearbySoundProjection()?.rate ?: 0) * 5) + override fun getAmbientSoundInterval() = 80 - random.nextInt((findNearbySoundProjection()?.rate ?: 1) * 5) override fun isEffectiveAi() = super.isEffectiveAi() && checkProjectionEffect()