aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/TitleManager.kt (renamed from src/main/java/at/hannibal2/skyhanni/data/TitleUtils.kt)2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/bingo/MinionCraftHelper.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinPetWarning.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/event/diana/InquisitorWaypointShare.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/GardenNextJacobContest.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/GardenOptimalSpeed.kt9
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterDisplay.kt7
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenBurrowingSporesNotifier.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCropMilestoneDisplay.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/farming/WildStrawberryDyeNotification.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/farming/WrongFungiCutterWarning.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorTimer.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/ServerRestartTitle.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/SkyBlockKickDuration.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorFeatures.kt5
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorSolver.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/rift/area/wyldwoods/ShyCruxWarnings.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerBossSpawnSoon.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerItemProfitTracker.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerQuestWarning.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerRngMeterDisplay.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/slayer/VampireSlayerFeatures.kt11
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/slayer/blaze/BlazeSlayerFirePitsWarning.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/slayer/enderman/EndermanSlayerFeatures.kt7
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt5
27 files changed, 52 insertions, 61 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt
index 127c5c342..aeca73f3a 100644
--- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt
+++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt
@@ -35,7 +35,7 @@ import at.hannibal2.skyhanni.data.ScoreboardData
import at.hannibal2.skyhanni.data.SkillExperience
import at.hannibal2.skyhanni.data.SlayerAPI
import at.hannibal2.skyhanni.data.TitleData
-import at.hannibal2.skyhanni.data.TitleUtils
+import at.hannibal2.skyhanni.data.TitleManager
import at.hannibal2.skyhanni.data.ToolTipData
import at.hannibal2.skyhanni.data.repo.RepoManager
import at.hannibal2.skyhanni.events.LorenzTickEvent
@@ -329,7 +329,7 @@ class SkyHanniMod {
loadModule(ItemClickData())
// loadModule(Year300RaffleEvent)
loadModule(MinecraftData())
- loadModule(TitleUtils())
+ loadModule(TitleManager())
loadModule(ItemTipHelper())
loadModule(RenderLivingEntityHelper())
loadModule(SkillExperience())
diff --git a/src/main/java/at/hannibal2/skyhanni/data/TitleUtils.kt b/src/main/java/at/hannibal2/skyhanni/data/TitleManager.kt
index 3970a1777..4fa661562 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/TitleUtils.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/TitleManager.kt
@@ -10,7 +10,7 @@ import net.minecraft.client.renderer.GlStateManager
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
import kotlin.time.Duration
-class TitleUtils {
+class TitleManager {
companion object {
private var display = ""
diff --git a/src/main/java/at/hannibal2/skyhanni/features/bingo/MinionCraftHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/bingo/MinionCraftHelper.kt
index 6d211dcb5..1470ace28 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/bingo/MinionCraftHelper.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/bingo/MinionCraftHelper.kt
@@ -1,7 +1,6 @@
package at.hannibal2.skyhanni.features.bingo
import at.hannibal2.skyhanni.SkyHanniMod
-import at.hannibal2.skyhanni.data.TitleUtils
import at.hannibal2.skyhanni.events.GuiRenderEvent
import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent
import at.hannibal2.skyhanni.events.LorenzTickEvent
@@ -253,7 +252,7 @@ class MinionCraftHelper {
private fun notify(minionName: String) {
if (alreadyNotified.contains(minionName)) return
- TitleUtils.sendTitle("Can craft $minionName", 3.seconds)
+ LorenzUtils.sendTitle("Can craft $minionName", 3.seconds)
alreadyNotified.add(minionName)
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinPetWarning.kt b/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinPetWarning.kt
index e5838aec8..356e44468 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinPetWarning.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinPetWarning.kt
@@ -2,7 +2,6 @@ package at.hannibal2.skyhanni.features.event.diana
import at.hannibal2.skyhanni.SkyHanniMod
import at.hannibal2.skyhanni.data.IslandType
-import at.hannibal2.skyhanni.data.TitleUtils
import at.hannibal2.skyhanni.events.LorenzTickEvent
import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.LorenzUtils.isInIsland
@@ -23,7 +22,7 @@ class GriffinPetWarning {
if (!DianaAPI.hasGriffinPet() && lastWarnTime.passedSince() > 30.seconds) {
lastWarnTime = SimpleTimeMark.now()
- TitleUtils.sendTitle("§cGriffin Pet!", 3.seconds)
+ LorenzUtils.sendTitle("§cGriffin Pet!", 3.seconds)
LorenzUtils.chat("§e[SkyHanni] Reminder to use a Griffin pet for Mythological Ritual!")
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/diana/InquisitorWaypointShare.kt b/src/main/java/at/hannibal2/skyhanni/features/event/diana/InquisitorWaypointShare.kt
index 5f0437ebe..8c139c923 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/event/diana/InquisitorWaypointShare.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/event/diana/InquisitorWaypointShare.kt
@@ -3,7 +3,6 @@ package at.hannibal2.skyhanni.features.event.diana
import at.hannibal2.skyhanni.SkyHanniMod
import at.hannibal2.skyhanni.data.IslandType
-import at.hannibal2.skyhanni.data.TitleUtils
import at.hannibal2.skyhanni.events.EntityHealthUpdateEvent
import at.hannibal2.skyhanni.events.LorenzChatEvent
import at.hannibal2.skyhanni.events.LorenzTickEvent
@@ -235,7 +234,7 @@ object InquisitorWaypointShare {
if (!waypoints.containsKey(cleanName)) {
LorenzUtils.chat("§e[SkyHanni] $playerName §l§efound an inquisitor at §l§c$x $y $z!")
if (cleanName != LorenzUtils.getPlayerName()) {
- TitleUtils.sendTitle("§dINQUISITOR §efrom §b$cleanName", 5.seconds)
+ LorenzUtils.sendTitle("§dINQUISITOR §efrom §b$cleanName", 5.seconds)
SoundUtils.playBeepSound()
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenNextJacobContest.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenNextJacobContest.kt
index 6174298c4..1e904ea4f 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenNextJacobContest.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenNextJacobContest.kt
@@ -1,7 +1,6 @@
package at.hannibal2.skyhanni.features.garden
import at.hannibal2.skyhanni.SkyHanniMod
-import at.hannibal2.skyhanni.data.TitleUtils
import at.hannibal2.skyhanni.events.ConfigLoadEvent
import at.hannibal2.skyhanni.events.GuiRenderEvent
import at.hannibal2.skyhanni.events.InventoryCloseEvent
@@ -320,7 +319,7 @@ object GardenNextJacobContest {
val cropText = crops.joinToString("§7, ") { "§a${it.cropName}" }
LorenzUtils.chat("§e[SkyHanni] Next farming contest: $cropText")
- TitleUtils.sendTitle("§eFarming Contest!", 5.seconds)
+ LorenzUtils.sendTitle("§eFarming Contest!", 5.seconds)
SoundUtils.playBeepSound()
if (config.nextJacobContestWarnPopup && !Display.isActive()) {
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenOptimalSpeed.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenOptimalSpeed.kt
index 1574bf839..b5999eed2 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenOptimalSpeed.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenOptimalSpeed.kt
@@ -1,7 +1,6 @@
package at.hannibal2.skyhanni.features.garden
import at.hannibal2.skyhanni.SkyHanniMod
-import at.hannibal2.skyhanni.data.TitleUtils
import at.hannibal2.skyhanni.events.GardenToolChangeEvent
import at.hannibal2.skyhanni.events.GuiRenderEvent
import at.hannibal2.skyhanni.events.TabListUpdateEvent
@@ -71,8 +70,8 @@ class GardenOptimalSpeed {
CropType.CARROT -> configCustomSpeed.carrot
CropType.POTATO -> configCustomSpeed.potato
CropType.NETHER_WART -> configCustomSpeed.netherWart
- CropType.PUMPKIN -> configCustomSpeed.pumpkin
- CropType.MELON -> configCustomSpeed.melon
+ CropType.PUMPKIN -> configCustomSpeed.pumpkin
+ CropType.MELON -> configCustomSpeed.melon
CropType.COCOA_BEANS -> configCustomSpeed.cocoaBeans
CropType.SUGAR_CANE -> configCustomSpeed.sugarCane
CropType.CACTUS -> configCustomSpeed.cactus
@@ -88,7 +87,7 @@ class GardenOptimalSpeed {
val text = "Optimal Speed: §f$optimalSpeed"
if (optimalSpeed != currentSpeed) {
config.optimalSpeedPos.renderString("§c$text", posLabel = "Garden Optimal Speed")
- warn()
+ warn()
} else {
config.optimalSpeedPos.renderString("§a$text", posLabel = "Garden Optimal Speed")
}
@@ -101,7 +100,7 @@ class GardenOptimalSpeed {
if (System.currentTimeMillis() < lastWarnTime + 20_000) return
lastWarnTime = System.currentTimeMillis()
- TitleUtils.sendTitle("§cWrong speed!", 3.seconds)
+ LorenzUtils.sendTitle("§cWrong speed!", 3.seconds)
cropInHand?.let {
LorenzUtils.chat("§e[SkyHanni] Wrong speed for ${it.cropName}: §f$currentSpeed §e(§f$optimalSpeed §eis optimal)")
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterDisplay.kt
index 13679f643..dede1d708 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterDisplay.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterDisplay.kt
@@ -1,7 +1,6 @@
package at.hannibal2.skyhanni.features.garden.composter
import at.hannibal2.skyhanni.SkyHanniMod
-import at.hannibal2.skyhanni.data.TitleUtils
import at.hannibal2.skyhanni.events.GuiRenderEvent
import at.hannibal2.skyhanni.events.TabListUpdateEvent
import at.hannibal2.skyhanni.features.garden.GardenAPI
@@ -143,7 +142,7 @@ class ComposterDisplay {
if (ComposterAPI.getOrganicMatter() <= config.composterNotifyLowOrganicMatter && System.currentTimeMillis() >= hidden.informedAboutLowMatter) {
if (config.composterNotifyLowTitle) {
- TitleUtils.sendTitle("§cYour Organic Matter is low", 4.seconds)
+ LorenzUtils.sendTitle("§cYour Organic Matter is low", 4.seconds)
}
LorenzUtils.chat("§e[SkyHanni] §cYour Organic Matter is low!")
hidden.informedAboutLowMatter = System.currentTimeMillis() + 60_000 * 5
@@ -153,7 +152,7 @@ class ComposterDisplay {
System.currentTimeMillis() >= hidden.informedAboutLowFuel
) {
if (config.composterNotifyLowTitle) {
- TitleUtils.sendTitle("§cYour Fuel is low", 4.seconds)
+ LorenzUtils.sendTitle("§cYour Fuel is low", 4.seconds)
}
LorenzUtils.chat("§e[SkyHanni] §cYour Fuel is low!")
hidden.informedAboutLowFuel = System.currentTimeMillis() + 60_000 * 5
@@ -203,6 +202,6 @@ class ComposterDisplay {
if (System.currentTimeMillis() < storage.lastComposterEmptyWarningTime + 1000 * 60 * 2) return
storage.lastComposterEmptyWarningTime = System.currentTimeMillis()
LorenzUtils.chat("§e[SkyHanni] $warningMessage")
- TitleUtils.sendTitle("§eComposter Warning!", 3.seconds)
+ LorenzUtils.sendTitle("§eComposter Warning!", 3.seconds)
}
} \ No newline at end of file
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenBurrowingSporesNotifier.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenBurrowingSporesNotifier.kt
index 8d67434de..93387ac32 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenBurrowingSporesNotifier.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenBurrowingSporesNotifier.kt
@@ -1,9 +1,9 @@
package at.hannibal2.skyhanni.features.garden.farming
import at.hannibal2.skyhanni.SkyHanniMod
-import at.hannibal2.skyhanni.data.TitleUtils
import at.hannibal2.skyhanni.events.LorenzChatEvent
import at.hannibal2.skyhanni.features.garden.GardenAPI
+import at.hannibal2.skyhanni.utils.LorenzUtils
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
import kotlin.time.Duration.Companion.seconds
@@ -15,7 +15,7 @@ class GardenBurrowingSporesNotifier {
if (!SkyHanniMod.feature.garden.burrowingSporesNotification) return
if (event.message.endsWith("§6§lVERY RARE CROP! §r§f§r§9Burrowing Spores")) {
- TitleUtils.sendTitle("§9Burrowing Spores!", 5.seconds)
+ LorenzUtils.sendTitle("§9Burrowing Spores!", 5.seconds)
// would be sent too often, nothing special then
// ItemBlink.setBlink(NEUItems.getItemStackOrNull("BURROWING_SPORES"), 5_000)
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCropMilestoneDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCropMilestoneDisplay.kt
index 384136ec2..52b5f7f3c 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCropMilestoneDisplay.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCropMilestoneDisplay.kt
@@ -5,7 +5,6 @@ import at.hannibal2.skyhanni.data.GardenCropMilestones
import at.hannibal2.skyhanni.data.GardenCropMilestones.getCounter
import at.hannibal2.skyhanni.data.GardenCropMilestones.isMaxed
import at.hannibal2.skyhanni.data.GardenCropMilestones.setCounter
-import at.hannibal2.skyhanni.data.TitleUtils
import at.hannibal2.skyhanni.events.ConfigLoadEvent
import at.hannibal2.skyhanni.events.CropMilestoneUpdateEvent
import at.hannibal2.skyhanni.events.GuiRenderEvent
@@ -218,7 +217,7 @@ object GardenCropMilestoneDisplay {
SoundUtils.playBeepSound()
}
if (!needsInventory) {
- TitleUtils.sendTitle(title, 1.5.seconds)
+ LorenzUtils.sendTitle(title, 1.5.seconds)
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/WildStrawberryDyeNotification.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/WildStrawberryDyeNotification.kt
index 1e5736f91..9b3859542 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/WildStrawberryDyeNotification.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/WildStrawberryDyeNotification.kt
@@ -1,7 +1,6 @@
package at.hannibal2.skyhanni.features.garden.farming
import at.hannibal2.skyhanni.SkyHanniMod
-import at.hannibal2.skyhanni.data.TitleUtils
import at.hannibal2.skyhanni.events.GuiContainerEvent
import at.hannibal2.skyhanni.events.OwnInventoryItemUpdateEvent
import at.hannibal2.skyhanni.features.garden.GardenAPI
@@ -37,7 +36,7 @@ class WildStrawberryDyeNotification {
val internalName = event.itemStack.getInternalName_old()
if (internalName == "DYE_WILD_STRAWBERRY") {
val name = event.itemStack.name!!
- TitleUtils.sendTitle(name, 5.seconds)
+ LorenzUtils.sendTitle(name, 5.seconds)
LorenzUtils.chat("§e[SkyHanni] You found a $name§e!")
SoundUtils.playBeepSound()
ItemBlink.setBlink(NEUItems.getItemStackOrNull("DYE_WILD_STRAWBERRY"), 5_000)
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/WrongFungiCutterWarning.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/WrongFungiCutterWarning.kt
index 3ee90913e..46936a7bb 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/WrongFungiCutterWarning.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/WrongFungiCutterWarning.kt
@@ -2,12 +2,12 @@ package at.hannibal2.skyhanni.features.garden.farming
import at.hannibal2.skyhanni.SkyHanniMod
import at.hannibal2.skyhanni.data.ClickType
-import at.hannibal2.skyhanni.data.TitleUtils
import at.hannibal2.skyhanni.events.CropClickEvent
import at.hannibal2.skyhanni.events.GardenToolChangeEvent
import at.hannibal2.skyhanni.events.LorenzChatEvent
import at.hannibal2.skyhanni.features.garden.CropType
import at.hannibal2.skyhanni.utils.ItemUtils.getLore
+import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.SoundUtils
import net.minecraft.item.ItemStack
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
@@ -45,7 +45,7 @@ class WrongFungiCutterWarning {
private fun notifyWrong() {
if (!SkyHanniMod.feature.garden.fungiCutterWarn) return
- TitleUtils.sendTitle("§cWrong Fungi Cutter Mode!", 2.seconds)
+ LorenzUtils.sendTitle("§cWrong Fungi Cutter Mode!", 2.seconds)
if (System.currentTimeMillis() > lastPlaySoundTime + 3_00) {
lastPlaySoundTime = System.currentTimeMillis()
SoundUtils.playBeepSound()
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt
index 7497e5b74..e34b0ab84 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt
@@ -2,7 +2,6 @@ package at.hannibal2.skyhanni.features.garden.visitor
import at.hannibal2.skyhanni.SkyHanniMod
import at.hannibal2.skyhanni.data.IslandType
-import at.hannibal2.skyhanni.data.TitleUtils
import at.hannibal2.skyhanni.events.CheckRenderEntityEvent
import at.hannibal2.skyhanni.events.GuiRenderEvent
import at.hannibal2.skyhanni.events.InventoryCloseEvent
@@ -579,7 +578,7 @@ class GardenVisitorFeatures {
logger.log("New visitor detected: '$name'")
if (config.visitorNotificationTitle && System.currentTimeMillis() > LorenzUtils.lastWorldSwitch + 2_000) {
- TitleUtils.sendTitle("§eNew Visitor", 5.seconds)
+ LorenzUtils.sendTitle("§eNew Visitor", 5.seconds)
}
if (config.visitorNotificationChat) {
val displayName = GardenVisitorColorNames.getColoredName(name)
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorTimer.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorTimer.kt
index a741017b6..ca36bb5a1 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorTimer.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorTimer.kt
@@ -1,7 +1,6 @@
package at.hannibal2.skyhanni.features.garden.visitor
import at.hannibal2.skyhanni.SkyHanniMod
-import at.hannibal2.skyhanni.data.TitleUtils
import at.hannibal2.skyhanni.events.CropClickEvent
import at.hannibal2.skyhanni.events.GuiRenderEvent
import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent
@@ -9,6 +8,7 @@ import at.hannibal2.skyhanni.events.PreProfileSwitchEvent
import at.hannibal2.skyhanni.events.VisitorArrivalEvent
import at.hannibal2.skyhanni.features.garden.GardenAPI
import at.hannibal2.skyhanni.test.command.CopyErrorCommand
+import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.RenderUtils.renderString
import at.hannibal2.skyhanni.utils.SoundUtils
import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher
@@ -116,7 +116,7 @@ class GardenVisitorTimer {
if (isSixthVisitorEnabled() && millis < 0) {
visitorsAmount++
if (!sixthVisitorReady) {
- TitleUtils.sendTitle("§a6th Visitor Ready", 5.seconds)
+ LorenzUtils.sendTitle("§a6th Visitor Ready", 5.seconds)
sixthVisitorReady = true
if (isSixthVisitorWarningEnabled()) SoundUtils.playBeepSound()
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/ServerRestartTitle.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/ServerRestartTitle.kt
index f87e249a4..5f8db82de 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/ServerRestartTitle.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/ServerRestartTitle.kt
@@ -2,7 +2,6 @@ package at.hannibal2.skyhanni.features.misc
import at.hannibal2.skyhanni.SkyHanniMod
import at.hannibal2.skyhanni.data.ScoreboardData
-import at.hannibal2.skyhanni.data.TitleUtils
import at.hannibal2.skyhanni.events.LorenzTickEvent
import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher
@@ -28,7 +27,7 @@ class ServerRestartTitle {
val totalSeconds = minutes * 60 + seconds
if (totalSeconds > 120 && totalSeconds % 30 != 0) return
val time = TimeUtils.formatDuration(totalSeconds.toLong() * 1000)
- TitleUtils.sendTitle("§cServer Restart in §b$time", 2.seconds)
+ LorenzUtils.sendTitle("§cServer Restart in §b$time", 2.seconds)
}
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/SkyBlockKickDuration.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/SkyBlockKickDuration.kt
index c571a2d63..3759d432e 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/SkyBlockKickDuration.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/SkyBlockKickDuration.kt
@@ -1,7 +1,6 @@
package at.hannibal2.skyhanni.features.misc
import at.hannibal2.skyhanni.SkyHanniMod
-import at.hannibal2.skyhanni.data.TitleUtils
import at.hannibal2.skyhanni.events.GuiRenderEvent
import at.hannibal2.skyhanni.events.LorenzChatEvent
import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent
@@ -69,7 +68,7 @@ class SkyBlockKickDuration {
}
private fun warn() {
- TitleUtils.sendTitle("§eTry rejoining SkyBlock now!", 3.seconds)
+ LorenzUtils.sendTitle("§eTry rejoining SkyBlock now!", 3.seconds)
}
fun isEnabled() = config.enabled
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorFeatures.kt
index d393fdd7f..73382b654 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorFeatures.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorFeatures.kt
@@ -3,7 +3,6 @@ package at.hannibal2.skyhanni.features.misc.trevor
import at.hannibal2.skyhanni.SkyHanniMod
import at.hannibal2.skyhanni.data.IslandType
import at.hannibal2.skyhanni.data.ScoreboardData
-import at.hannibal2.skyhanni.data.TitleUtils
import at.hannibal2.skyhanni.events.CheckRenderEntityEvent
import at.hannibal2.skyhanni.events.GuiRenderEvent
import at.hannibal2.skyhanni.events.LorenzChatEvent
@@ -88,7 +87,7 @@ object TrevorFeatures {
if (event.message == "§aReturn to the Trapper soon to get a new animal to hunt!") {
TrevorSolver.resetLocation()
if (config.trapperMobDiedMessage) {
- TitleUtils.sendTitle("§2Mob Died ", 5.seconds)
+ LorenzUtils.sendTitle("§2Mob Died ", 5.seconds)
SoundUtils.playBeepSound()
}
trapperReady = true
@@ -168,7 +167,7 @@ object TrevorFeatures {
if (timeUntilNextReady <= 0 && trapperReady) {
if (timeUntilNextReady == 0) {
- TitleUtils.sendTitle("§2Trapper Ready", 3.seconds)
+ LorenzUtils.sendTitle("§2Trapper Ready", 3.seconds)
SoundUtils.playBeepSound()
}
currentStatus = TrapperStatus.READY
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorSolver.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorSolver.kt
index f86ea9087..0dd7ba5e8 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorSolver.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorSolver.kt
@@ -1,9 +1,9 @@
package at.hannibal2.skyhanni.features.misc.trevor
-import at.hannibal2.skyhanni.data.TitleUtils
import at.hannibal2.skyhanni.utils.EntityUtils
import at.hannibal2.skyhanni.utils.LocationUtils
import at.hannibal2.skyhanni.utils.LocationUtils.distanceToPlayer
+import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.LorenzUtils.baseMaxHealth
import at.hannibal2.skyhanni.utils.LorenzUtils.derpy
import at.hannibal2.skyhanni.utils.LorenzVec
@@ -69,7 +69,7 @@ object TrevorSolver {
}
if (canSee) {
if (mobLocation != CurrentMobArea.FOUND) {
- TitleUtils.sendTitle("§2Saw ${currentMob!!.mobName}!", 3.seconds)
+ LorenzUtils.sendTitle("§2Saw ${currentMob!!.mobName}!", 3.seconds)
}
mobLocation = CurrentMobArea.FOUND
mobCoordinates = entity.position.toLorenzVec()
diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/wyldwoods/ShyCruxWarnings.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/wyldwoods/ShyCruxWarnings.kt
index 84808625a..7ac4d1ed6 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/wyldwoods/ShyCruxWarnings.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/wyldwoods/ShyCruxWarnings.kt
@@ -1,10 +1,10 @@
package at.hannibal2.skyhanni.features.rift.area.wyldwoods
-import at.hannibal2.skyhanni.data.TitleUtils
import at.hannibal2.skyhanni.events.LorenzTickEvent
import at.hannibal2.skyhanni.features.rift.RiftAPI
import at.hannibal2.skyhanni.utils.EntityUtils
import at.hannibal2.skyhanni.utils.LocationUtils.distanceToPlayer
+import at.hannibal2.skyhanni.utils.LorenzUtils
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
import kotlin.time.Duration.Companion.milliseconds
@@ -22,7 +22,7 @@ class ShyCruxWarnings {
private fun checkForShy() {
if (EntityUtils.getAllEntities().any { it.name in shyNames && it.distanceToPlayer() < 8 }) {
- TitleUtils.sendTitle("§eLook away!", 150.milliseconds)
+ LorenzUtils.sendTitle("§eLook away!", 150.milliseconds)
}
}
} \ No newline at end of file
diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerBossSpawnSoon.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerBossSpawnSoon.kt
index 1d8dd0698..7c71632e2 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerBossSpawnSoon.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerBossSpawnSoon.kt
@@ -2,8 +2,8 @@ package at.hannibal2.skyhanni.features.slayer
import at.hannibal2.skyhanni.SkyHanniMod
import at.hannibal2.skyhanni.data.SlayerAPI
-import at.hannibal2.skyhanni.data.TitleUtils
import at.hannibal2.skyhanni.events.SlayerProgressChangeEvent
+import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.NumberUtil.formatNumber
import at.hannibal2.skyhanni.utils.SoundUtils
import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher
@@ -29,7 +29,7 @@ class SlayerBossSpawnSoon {
if (completion > config.percent / 100.0) {
if (!warned || (config.repeat && completion != lastCompletion)) {
SoundUtils.playBeepSound()
- TitleUtils.sendTitle("§cSlayer boss soon!", 2.seconds)
+ LorenzUtils.sendTitle("§cSlayer boss soon!", 2.seconds)
warned = true
}
} else {
diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerItemProfitTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerItemProfitTracker.kt
index cd286beab..ed85ba489 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerItemProfitTracker.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerItemProfitTracker.kt
@@ -4,7 +4,6 @@ import at.hannibal2.skyhanni.SkyHanniMod
import at.hannibal2.skyhanni.config.Storage.ProfileSpecific.SlayerProfitList
import at.hannibal2.skyhanni.data.ProfileStorageData
import at.hannibal2.skyhanni.data.SlayerAPI
-import at.hannibal2.skyhanni.data.TitleUtils
import at.hannibal2.skyhanni.events.GuiRenderEvent
import at.hannibal2.skyhanni.events.PacketEvent
import at.hannibal2.skyhanni.events.PurseChangeCause
@@ -188,7 +187,7 @@ object SlayerItemProfitTracker {
LorenzUtils.chat("§e[SkyHanni] §a+Slayer Drop§7: §r$itemName")
}
if (config.titleWarning && price > config.minimumPriceWarning) {
- TitleUtils.sendTitle("§a+ $itemName", 5.seconds)
+ LorenzUtils.sendTitle("§a+ $itemName", 5.seconds)
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerQuestWarning.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerQuestWarning.kt
index 60fde86a5..e1cc10b6b 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerQuestWarning.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerQuestWarning.kt
@@ -3,7 +3,6 @@ package at.hannibal2.skyhanni.features.slayer
import at.hannibal2.skyhanni.SkyHanniMod
import at.hannibal2.skyhanni.data.ScoreboardData
import at.hannibal2.skyhanni.data.SlayerAPI
-import at.hannibal2.skyhanni.data.TitleUtils
import at.hannibal2.skyhanni.events.EntityHealthUpdateEvent
import at.hannibal2.skyhanni.events.LorenzChatEvent
import at.hannibal2.skyhanni.events.LorenzTickEvent
@@ -135,7 +134,7 @@ class SlayerQuestWarning {
LorenzUtils.chat("§e[SkyHanni] $chatMessage")
if (config.questWarningTitle) {
- TitleUtils.sendTitle("§e$titleMessage", 2.seconds)
+ LorenzUtils.sendTitle("§e$titleMessage", 2.seconds)
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerRngMeterDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerRngMeterDisplay.kt
index ee237c34f..4021209f6 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerRngMeterDisplay.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerRngMeterDisplay.kt
@@ -4,7 +4,6 @@ import at.hannibal2.skyhanni.SkyHanniMod
import at.hannibal2.skyhanni.config.Storage
import at.hannibal2.skyhanni.data.ProfileStorageData
import at.hannibal2.skyhanni.data.SlayerAPI
-import at.hannibal2.skyhanni.data.TitleUtils
import at.hannibal2.skyhanni.events.GuiRenderEvent
import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent
import at.hannibal2.skyhanni.events.LorenzChatEvent
@@ -72,7 +71,7 @@ class SlayerRngMeterDisplay {
val hasItemSelected = item != "" && item != "?"
if (!hasItemSelected && config.warnEmpty) {
LorenzUtils.warning("§c[SkyHanni] No Slayer RNG Meter Item selected!")
- TitleUtils.sendTitle("§cNo RNG Meter Item!", 3.seconds)
+ LorenzUtils.sendTitle("§cNo RNG Meter Item!", 3.seconds)
}
var blockChat = config.hideChat && hasItemSelected
val diff = currentMeter - old
diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/VampireSlayerFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/VampireSlayerFeatures.kt
index 23aad848c..1f13785c1 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/slayer/VampireSlayerFeatures.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/VampireSlayerFeatures.kt
@@ -2,7 +2,6 @@ package at.hannibal2.skyhanni.features.slayer
import at.hannibal2.skyhanni.SkyHanniMod
import at.hannibal2.skyhanni.data.ClickType
-import at.hannibal2.skyhanni.data.TitleUtils
import at.hannibal2.skyhanni.events.EntityClickEvent
import at.hannibal2.skyhanni.events.LorenzTickEvent
import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent
@@ -142,12 +141,13 @@ object VampireSlayerFeatures {
if (nextClawSend < System.currentTimeMillis()) {
if (shouldSendSound)
playTwinclawsSound()
- if (shouldSendTitle)
- TitleUtils.sendTitle(
+ if (shouldSendTitle) {
+ LorenzUtils.sendTitle(
"§6§lTWINCLAWS",
(1750 - config.twinclawsDelay).milliseconds,
2.6
)
+ }
nextClawSend = System.currentTimeMillis() + 5_000
}
}
@@ -198,8 +198,9 @@ object VampireSlayerFeatures {
else if (canUseSteak && configOtherBoss.steakAlert && taggedEntityList.contains(this.entityId)) true
else canUseSteak && configCoopBoss.steakAlert && containCoop
- if (shouldSendSteakTitle)
- TitleUtils.sendTitle("§c§lSTEAK!", 300.milliseconds, 2.6)
+ if (shouldSendSteakTitle) {
+ LorenzUtils.sendTitle("§c§lSTEAK!", 300.milliseconds, 2.6)
+ }
if (shouldRender) {
RenderLivingEntityHelper.setEntityColor(this, color) { isEnabled() }
diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/blaze/BlazeSlayerFirePitsWarning.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/blaze/BlazeSlayerFirePitsWarning.kt
index 69e800600..d897f0b99 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/slayer/blaze/BlazeSlayerFirePitsWarning.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/blaze/BlazeSlayerFirePitsWarning.kt
@@ -1,7 +1,6 @@
package at.hannibal2.skyhanni.features.slayer.blaze
import at.hannibal2.skyhanni.SkyHanniMod
-import at.hannibal2.skyhanni.data.TitleUtils
import at.hannibal2.skyhanni.events.BossHealthChangeEvent
import at.hannibal2.skyhanni.events.LorenzTickEvent
import at.hannibal2.skyhanni.features.damageindicator.BossType
@@ -19,7 +18,7 @@ class BlazeSlayerFirePitsWarning {
private var lastFirePitsWarning = 0L
fun fireFirePits() {
- TitleUtils.sendTitle("§cFire Pits!", 2.seconds)
+ LorenzUtils.sendTitle("§cFire Pits!", 2.seconds)
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/enderman/EndermanSlayerFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/enderman/EndermanSlayerFeatures.kt
index 6e0bdd7d3..6c192fe26 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/slayer/enderman/EndermanSlayerFeatures.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/enderman/EndermanSlayerFeatures.kt
@@ -2,7 +2,6 @@ package at.hannibal2.skyhanni.features.slayer.enderman
import at.hannibal2.skyhanni.SkyHanniMod
import at.hannibal2.skyhanni.data.IslandType
-import at.hannibal2.skyhanni.data.TitleUtils
import at.hannibal2.skyhanni.events.CheckRenderEntityEvent
import at.hannibal2.skyhanni.events.LorenzTickEvent
import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent
@@ -17,6 +16,7 @@ import at.hannibal2.skyhanni.utils.LocationUtils
import at.hannibal2.skyhanni.utils.LocationUtils.distanceToPlayer
import at.hannibal2.skyhanni.utils.LorenzColor
import at.hannibal2.skyhanni.utils.LorenzLogger
+import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.LorenzUtils.editCopy
import at.hannibal2.skyhanni.utils.LorenzUtils.isInIsland
import at.hannibal2.skyhanni.utils.LorenzUtils.toChromaColor
@@ -65,8 +65,9 @@ class EndermanSlayerFeatures {
flyingBeacons = flyingBeacons.editCopy {
add(entity)
}
- if (beaconConfig.showWarning)
- TitleUtils.sendTitle("§4Beacon", 2.seconds)
+ if (beaconConfig.showWarning) {
+ LorenzUtils.sendTitle("§4Beacon", 2.seconds)
+ }
logger.log("Added flying beacons at ${entity.getLorenzVec()}")
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt
index 4a60f18a4..392833f65 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt
@@ -4,6 +4,7 @@ import at.hannibal2.skyhanni.SkyHanniMod
import at.hannibal2.skyhanni.data.HypixelData
import at.hannibal2.skyhanni.data.IslandType
import at.hannibal2.skyhanni.data.MayorElection
+import at.hannibal2.skyhanni.data.TitleManager
import at.hannibal2.skyhanni.features.dungeon.DungeonAPI
import at.hannibal2.skyhanni.mixins.transformers.AccessorGuiEditSign
import at.hannibal2.skyhanni.test.TestBingo
@@ -537,4 +538,8 @@ object LorenzUtils {
fun <T> T.conditionalTransform(condition: Boolean, ifTrue: T.() -> Any, ifFalse: T.() -> Any) =
if (condition) ifTrue(this) else ifFalse(this)
+
+ fun sendTitle(text: String, duration: Duration, height: Double = 1.8) {
+ TitleManager.sendTitle(text, duration, height)
+ }
}