diff options
| author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-02-26 15:47:46 +0100 |
|---|---|---|
| committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-02-26 15:47:46 +0100 |
| commit | a94cdd4331f2d7aa275745c0e44d16bbe69492a1 (patch) | |
| tree | 616e1311d03856bc9cb67077452dfc8e85fc74a5 /src/main/java/at/hannibal2/skyhanni/features/fishing | |
| parent | c15c3d2db212f2fb73e6063aa5ff3cc2b5a7a4f5 (diff) | |
| download | skyhanni-a94cdd4331f2d7aa275745c0e44d16bbe69492a1.tar.gz skyhanni-a94cdd4331f2d7aa275745c0e44d16bbe69492a1.tar.bz2 skyhanni-a94cdd4331f2d7aa275745c0e44d16bbe69492a1.zip | |
Using GuiRenderEvent.GameOverlayRenderEvent instead of RenderGameOverlayEvent.
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/fishing')
| -rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/fishing/BarnFishingTimer.kt | 5 | ||||
| -rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/fishing/SharkFishCounter.kt | 5 |
2 files changed, 4 insertions, 6 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/BarnFishingTimer.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/BarnFishingTimer.kt index 0487dfa2f..e245c77dd 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/fishing/BarnFishingTimer.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/BarnFishingTimer.kt @@ -2,6 +2,7 @@ package at.hannibal2.skyhanni.features.fishing import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.data.IslandType +import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.utils.* import at.hannibal2.skyhanni.utils.RenderUtils.renderString import at.hannibal2.skyhanni.utils.SoundUtils.playSound @@ -10,7 +11,6 @@ import net.minecraft.client.audio.ISound import net.minecraft.client.audio.PositionedSound import net.minecraft.entity.item.EntityArmorStand import net.minecraft.util.ResourceLocation -import net.minecraftforge.client.event.RenderGameOverlayEvent import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import net.minecraftforge.fml.common.gameevent.TickEvent @@ -88,8 +88,7 @@ class BarnFishingTimer { } @SubscribeEvent - fun onRenderOverlay(event: RenderGameOverlayEvent.Post) { - if (event.type != RenderGameOverlayEvent.ElementType.ALL) return + fun onRenderOverlay(event: GuiRenderEvent.GameOverlayRenderEvent) { if (!LorenzUtils.inSkyBlock) return if (!SkyHanniMod.feature.fishing.barnTimer) return if (!rightLocation) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/SharkFishCounter.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/SharkFishCounter.kt index 439dcd940..cc89adc39 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/fishing/SharkFishCounter.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/SharkFishCounter.kt @@ -1,13 +1,13 @@ package at.hannibal2.skyhanni.features.fishing import at.hannibal2.skyhanni.SkyHanniMod +import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.SeaCreatureFishEvent import at.hannibal2.skyhanni.utils.ItemUtils.getLore import at.hannibal2.skyhanni.utils.ItemUtils.name import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.RenderUtils.renderString import net.minecraft.client.Minecraft -import net.minecraftforge.client.event.RenderGameOverlayEvent import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import net.minecraftforge.fml.common.gameevent.TickEvent @@ -54,8 +54,7 @@ class SharkFishCounter { } @SubscribeEvent - fun onRenderOverlay(event: RenderGameOverlayEvent.Post) { - if (event.type != RenderGameOverlayEvent.ElementType.ALL) return + fun onRenderOverlay(event: GuiRenderEvent.GameOverlayRenderEvent) { if (!LorenzUtils.inSkyBlock) return if (!SkyHanniMod.feature.fishing.sharkFishCounter) return if (!hasWaterRodInHand) return |
