aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/com/ambientaddons/utils/SBLocation.kt
diff options
context:
space:
mode:
authorAppability <appable@icloud.com>2022-11-13 16:54:28 -0800
committerAppability <appable@icloud.com>2022-11-13 16:54:28 -0800
commit012690fe591b7de4cb248a632a48371432be7610 (patch)
tree97e5f0c668651e904275fd4c212bab2413c1df6b /src/main/kotlin/com/ambientaddons/utils/SBLocation.kt
parent766ce61c5655935a232c5d87c1e334c6fba3d73b (diff)
downloadAmbientAddons-012690fe591b7de4cb248a632a48371432be7610.tar.gz
AmbientAddons-012690fe591b7de4cb248a632a48371432be7610.tar.bz2
AmbientAddons-012690fe591b7de4cb248a632a48371432be7610.zip
fix inaccessible color setting + fix thorn timer
Diffstat (limited to 'src/main/kotlin/com/ambientaddons/utils/SBLocation.kt')
-rw-r--r--src/main/kotlin/com/ambientaddons/utils/SBLocation.kt19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/main/kotlin/com/ambientaddons/utils/SBLocation.kt b/src/main/kotlin/com/ambientaddons/utils/SBLocation.kt
index bfd35eb..f99c5da 100644
--- a/src/main/kotlin/com/ambientaddons/utils/SBLocation.kt
+++ b/src/main/kotlin/com/ambientaddons/utils/SBLocation.kt
@@ -8,6 +8,7 @@ import com.ambientaddons.utils.Extensions.substringBetween
import com.ambientaddons.utils.TabListUtils.fetchTabEntries
import net.minecraft.scoreboard.Score
import net.minecraft.scoreboard.ScorePlayerTeam
+import net.minecraftforge.client.event.ClientChatReceivedEvent
import net.minecraftforge.event.world.WorldEvent
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
import net.minecraftforge.fml.common.gameevent.TickEvent
@@ -22,6 +23,16 @@ object SBLocation {
var dungeonFloor: DungeonFloor? = null
var ticks = 0
+ private val entryMessages = listOf(
+ "[BOSS] Bonzo: Gratz for making it this far, but I'm basically unbeatable.",
+ "[BOSS] Scarf: This is where the journey ends for you, Adventurers.",
+ "[BOSS] The Professor: I was burdened with terrible news recently...",
+ "[BOSS] Thorn: Welcome Adventurers! I am Thorn, the Spirit! And host of the Vegan Trials!",
+ "[BOSS] Livid: Welcome, you arrive right on time. I am Livid, the Master of Shadows.",
+ "[BOSS] Sadan: So you made it all the way here... Now you wish to defy me? Sadan?!",
+ "[BOSS] Maxor: WELL WELL WELL LOOK WHO'S HERE!"
+ )
+
@SubscribeEvent
fun onWorldUnload(event: WorldEvent.Unload) {
inSkyblock = false
@@ -29,6 +40,14 @@ object SBLocation {
area = null
}
+ @SubscribeEvent(receiveCanceled = true)
+ fun onChatReceived(event: ClientChatReceivedEvent) {
+ if (dungeonFloor == null) return
+ if (entryMessages.any { it == event.message.unformattedText.stripControlCodes() }) {
+ dungeonFloor?.enteredBoss = true
+ }
+ }
+
@SubscribeEvent
fun onConnect(event: FMLNetworkEvent.ClientConnectedToServerEvent) {
onHypixel = mc.runCatching {