summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorSoniEx2 <endermoneymod@gmail.com>2025-03-18 00:44:22 -0300
committerSoniEx2 <endermoneymod@gmail.com>2025-03-18 00:44:22 -0300
commita21a09b1a79597d2f55a7cbd3ba2f25055edfc65 (patch)
tree1aa10032191556a59c263579aaafd7d693228535
parentfec48e3c41fc40be626182653fc0c4726bd91c4a (diff)
Filter only transmitters that have text
-rw-r--r--src/client/kotlin/space/autistic/radio/client/sound/PirateRadioSoundInstance.kt2
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)