From af5dbdb3ad0f64f22bd0692d12483e7d040d7ac7 Mon Sep 17 00:00:00 2001 From: CalMWolfs <94038482+CalMWolfs@users.noreply.github.com> Date: Sat, 1 Jun 2024 19:29:23 +1000 Subject: Fix: Movable hotbar messing with some other mods (#1965) --- src/main/java/at/hannibal2/skyhanni/features/gui/MovableHotBar.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/main/java/at/hannibal2/skyhanni/features/gui/MovableHotBar.kt b/src/main/java/at/hannibal2/skyhanni/features/gui/MovableHotBar.kt index 37a86eb22..636bb64ef 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/gui/MovableHotBar.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/gui/MovableHotBar.kt @@ -7,6 +7,7 @@ import at.hannibal2.skyhanni.utils.RenderUtils.transform import net.minecraft.client.Minecraft import net.minecraft.client.renderer.GlStateManager import net.minecraftforge.client.event.RenderGameOverlayEvent +import net.minecraftforge.fml.common.eventhandler.EventPriority import net.minecraftforge.fml.common.eventhandler.SubscribeEvent class MovableHotBar { @@ -15,7 +16,7 @@ class MovableHotBar { private var post = false - @SubscribeEvent + @SubscribeEvent(priority = EventPriority.LOWEST) fun onRenderHotbar(event: RenderGameOverlayEvent.Pre) { if (event.type != RenderGameOverlayEvent.ElementType.HOTBAR || !isEnabled()) return post = true @@ -28,7 +29,7 @@ class MovableHotBar { GuiEditManager.add(config.hotbar, "Hotbar", 182 - 1, 22 - 1) // -1 since the editor for some reason add +1 } - @SubscribeEvent + @SubscribeEvent(priority = EventPriority.HIGHEST) fun onRenderHotbar(event: RenderGameOverlayEvent.Post) { if (event.type != RenderGameOverlayEvent.ElementType.HOTBAR || !post) return GlStateManager.popMatrix() -- cgit