From ce16c33389b75823750cb5bd06b51a5f1a471424 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sat, 24 Sep 2022 19:52:47 +0200 Subject: fixed bug in RenderGameOverlayEvent --- src/main/java/at/hannibal2/skyhanni/features/CurrentPetDisplay.kt | 1 + src/main/java/at/hannibal2/skyhanni/features/RealTime.kt | 1 + src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCopilot.kt | 1 + .../java/at/hannibal2/skyhanni/features/dungeon/DungeonDeathCounter.kt | 1 + .../at/hannibal2/skyhanni/features/dungeon/DungeonMilestonesDisplay.kt | 1 + .../hannibal2/skyhanni/features/nether/ashfang/AshfangFreezeCooldown.kt | 1 + .../skyhanni/features/nether/ashfang/AshfangNextResetCooldown.kt | 1 + .../at/hannibal2/skyhanni/features/slayer/blaze/BlazeSlayerPillar.kt | 1 + .../at/hannibal2/skyhanni/features/summonings/SummoningMobManager.kt | 1 + 9 files changed, 9 insertions(+) (limited to 'src/main/java/at/hannibal2/skyhanni') diff --git a/src/main/java/at/hannibal2/skyhanni/features/CurrentPetDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/CurrentPetDisplay.kt index a4c25846b..0048114a3 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/CurrentPetDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/CurrentPetDisplay.kt @@ -38,6 +38,7 @@ class CurrentPetDisplay { @SubscribeEvent fun renderOverlay(event: RenderGameOverlayEvent.Post) { + if (event.type != RenderGameOverlayEvent.ElementType.ALL) return if (!LorenzUtils.inSkyblock) return if (!SkyHanniMod.feature.misc.petDisplay) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/RealTime.kt b/src/main/java/at/hannibal2/skyhanni/features/RealTime.kt index 4fe0707cc..de1d1b06e 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/RealTime.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/RealTime.kt @@ -13,6 +13,7 @@ class RealTime { @SubscribeEvent fun renderOverlay(event: RenderGameOverlayEvent.Post) { + if (event.type != RenderGameOverlayEvent.ElementType.ALL) return if (!isEnabled()) return SkyHanniMod.feature.misc.realTimePos.renderString(format.format(System.currentTimeMillis())) diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCopilot.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCopilot.kt index 79c00619b..b4620ece4 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCopilot.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCopilot.kt @@ -126,6 +126,7 @@ class DungeonCopilot { @SubscribeEvent fun renderOverlay(event: RenderGameOverlayEvent.Post) { + if (event.type != RenderGameOverlayEvent.ElementType.ALL) return if (!LorenzUtils.inDungeons) return if (!SkyHanniMod.feature.dungeon.copilotEnabled) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonDeathCounter.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonDeathCounter.kt index d3091f944..a65ee67c1 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonDeathCounter.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonDeathCounter.kt @@ -86,6 +86,7 @@ class DungeonDeathCounter { @SubscribeEvent fun renderOverlay(event: RenderGameOverlayEvent.Post) { + if (event.type != RenderGameOverlayEvent.ElementType.ALL) return if (!isEnabled()) return SkyHanniMod.feature.dungeon.deathCounterPos.renderString(DungeonMilestonesDisplay.color + textToRender) diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonMilestonesDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonMilestonesDisplay.kt index 94367d329..97798b04b 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonMilestonesDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonMilestonesDisplay.kt @@ -85,6 +85,7 @@ class DungeonMilestonesDisplay { @SubscribeEvent fun renderOverlay(event: RenderGameOverlayEvent.Post) { + if (event.type != RenderGameOverlayEvent.ElementType.ALL) return if (!isEnabled()) return SkyHanniMod.feature.dungeon.showMileStonesDisplayPos.renderString(color + textToRender) diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangFreezeCooldown.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangFreezeCooldown.kt index 8d12b4668..3c6c6af88 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangFreezeCooldown.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangFreezeCooldown.kt @@ -27,6 +27,7 @@ class AshfangFreezeCooldown { @SubscribeEvent fun renderOverlay(event: RenderGameOverlayEvent.Post) { + if (event.type != RenderGameOverlayEvent.ElementType.ALL) return if (!isEnabled()) return val duration = System.currentTimeMillis() - lastHit val maxDuration = 3_000 diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangNextResetCooldown.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangNextResetCooldown.kt index 69aac5777..ec171e2d8 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangNextResetCooldown.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangNextResetCooldown.kt @@ -31,6 +31,7 @@ class AshfangNextResetCooldown { @SubscribeEvent fun renderOverlay(event: RenderGameOverlayEvent.Post) { + if (event.type != RenderGameOverlayEvent.ElementType.ALL) return if (!isEnabled()) return if (spawnTime == -1L) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/blaze/BlazeSlayerPillar.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/blaze/BlazeSlayerPillar.kt index 2063a6435..808d29959 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/slayer/blaze/BlazeSlayerPillar.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/blaze/BlazeSlayerPillar.kt @@ -99,6 +99,7 @@ class BlazeSlayerPillar { @SubscribeEvent fun renderOverlay(event: RenderGameOverlayEvent.Post) { + if (event.type != RenderGameOverlayEvent.ElementType.ALL) return if (!isEnabled()) return if (lastPillarSpawnTime == -1L) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/summonings/SummoningMobManager.kt b/src/main/java/at/hannibal2/skyhanni/features/summonings/SummoningMobManager.kt index 6560bc606..41357fbb8 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/summonings/SummoningMobManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/summonings/SummoningMobManager.kt @@ -138,6 +138,7 @@ class SummoningMobManager { @SubscribeEvent fun renderOverlay(event: RenderGameOverlayEvent.Post) { + if (event.type != RenderGameOverlayEvent.ElementType.ALL) return if (!LorenzUtils.inSkyblock) return if (!SkyHanniMod.feature.summonings.summoningMobDisplay) return if (summoningMobs.isEmpty()) return -- cgit