aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonLividFinder.kt20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonLividFinder.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonLividFinder.kt
index 4d4bb6804..becbb896b 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonLividFinder.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonLividFinder.kt
@@ -7,6 +7,7 @@ import at.hannibal2.skyhanni.events.LorenzTickEvent
import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent
import at.hannibal2.skyhanni.mixins.hooks.RenderLivingEntityHelper
import at.hannibal2.skyhanni.test.GriffinUtils.drawWaypointFilled
+import at.hannibal2.skyhanni.test.command.ErrorManager
import at.hannibal2.skyhanni.utils.BlockUtils.getBlockStateAt
import at.hannibal2.skyhanni.utils.ColorUtils.withAlpha
import at.hannibal2.skyhanni.utils.EntityUtils
@@ -50,13 +51,30 @@ object DungeonLividFinder {
if (!config.enabled) return
val dyeColor = blockLocation.getBlockStateAt().getValue(BlockStainedGlass.COLOR)
- color = dyeColor.toLorenzColor() ?: error("No color found for dye color `$dyeColor`")
+ color = dyeColor.toLorenzColor()
val color = color ?: return
val chatColor = color.getChatColor()
lividArmorStand = EntityUtils.getEntities<EntityArmorStand>()
.firstOrNull { it.name.startsWith("${chatColor}﴾ ${chatColor}§lLivid") }
+
+ if (event.isMod(20)) {
+ if (lividArmorStand == null) {
+ val amountArmorStands = EntityUtils.getEntities<EntityArmorStand>().filter { it.name.contains("Livid") }.count()
+ if (amountArmorStands >= 8) {
+ ErrorManager.logErrorStateWithData(
+ "Could not find livid",
+ "could not find lividArmorStand",
+ "dyeColor" to dyeColor,
+ "color" to color,
+ "chatColor" to chatColor,
+ "amountArmorStands" to amountArmorStands,
+ )
+ }
+ }
+ }
+
val lividArmorStand = lividArmorStand ?: return
val aabb = with(lividArmorStand) {