diff options
author | SoniEx2 <endermoneymod@gmail.com> | 2025-03-18 00:44:22 -0300 |
---|---|---|
committer | SoniEx2 <endermoneymod@gmail.com> | 2025-03-18 00:44:22 -0300 |
commit | a21a09b1a79597d2f55a7cbd3ba2f25055edfc65 (patch) | |
tree | 1aa10032191556a59c263579aaafd7d693228535 | |
parent | fec48e3c41fc40be626182653fc0c4726bd91c4a (diff) |
Filter only transmitters that have text
-rw-r--r-- | src/client/kotlin/space/autistic/radio/client/sound/PirateRadioSoundInstance.kt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/kotlin/space/autistic/radio/client/sound/PirateRadioSoundInstance.kt b/src/client/kotlin/space/autistic/radio/client/sound/PirateRadioSoundInstance.kt index 5fb80bc..4e3fd51 100644 --- a/src/client/kotlin/space/autistic/radio/client/sound/PirateRadioSoundInstance.kt +++ b/src/client/kotlin/space/autistic/radio/client/sound/PirateRadioSoundInstance.kt @@ -47,7 +47,7 @@ class PirateRadioSoundInstance(private val player: ClientPlayerEntity) : MovingS // find relevant entities @Suppress("UNCHECKED_CAST") val trackedEntities: List<DisposableTransmitterEntity> = player.clientWorld.entities.filter { it.type == PirateRadioEntityTypes.DISPOSABLE_TRANSMITTER } - .filter { (it as DisposableTransmitterEntity).frequency <= PirateRadioClient.frequency + 1 && it.frequency >= PirateRadioClient.frequency - 1 } + .filter { (it as DisposableTransmitterEntity).frequency <= PirateRadioClient.frequency + 1 && it.frequency >= PirateRadioClient.frequency - 1 && it.text.isNotEmpty() } .sortedBy { player.pos.squaredDistanceTo(it.pos) } as List<DisposableTransmitterEntity> val main = trackedEntities.filter { it.frequency == PirateRadioClient.frequency } .take(if (PirateRadioClient.mode == FmSimulatorMode.FAST) 1 else 2) |