From 081590e019fe9e2bfc633214ef623e21dce11fb3 Mon Sep 17 00:00:00 2001 From: Jacob <55346310+Kathund@users.noreply.github.com> Date: Thu, 26 Jun 2025 22:17:00 +0800 Subject: Merge pull request #165 * fix: let hide potion effects hide top right * convert to own opiton --- src/main/java/moe/nea/firmament/mixins/HudRenderEventsPatch.java | 7 +++++++ src/main/kotlin/features/fixes/Fixes.kt | 1 + 2 files changed, 8 insertions(+) (limited to 'src') diff --git a/src/main/java/moe/nea/firmament/mixins/HudRenderEventsPatch.java b/src/main/java/moe/nea/firmament/mixins/HudRenderEventsPatch.java index 85c0462..49e86fb 100644 --- a/src/main/java/moe/nea/firmament/mixins/HudRenderEventsPatch.java +++ b/src/main/java/moe/nea/firmament/mixins/HudRenderEventsPatch.java @@ -4,6 +4,7 @@ package moe.nea.firmament.mixins; import moe.nea.firmament.events.HotbarItemRenderEvent; import moe.nea.firmament.events.HudRenderEvent; +import moe.nea.firmament.features.fixes.Fixes; import net.minecraft.client.gui.DrawContext; import net.minecraft.client.gui.hud.InGameHud; import net.minecraft.client.render.RenderTickCounter; @@ -26,4 +27,10 @@ public class HudRenderEventsPatch { if (stack != null && !stack.isEmpty()) HotbarItemRenderEvent.Companion.publish(new HotbarItemRenderEvent(stack, context, x, y, tickCounter)); } + + @Inject(method = "renderStatusEffectOverlay", at = @At("HEAD"), cancellable = true) + public void hideStatusEffects(CallbackInfo ci) { + if (Fixes.TConfig.INSTANCE.getHidePotionEffectsHud()) ci.cancel(); + } + } diff --git a/src/main/kotlin/features/fixes/Fixes.kt b/src/main/kotlin/features/fixes/Fixes.kt index 30034db..6742745 100644 --- a/src/main/kotlin/features/fixes/Fixes.kt +++ b/src/main/kotlin/features/fixes/Fixes.kt @@ -23,6 +23,7 @@ object Fixes : FirmamentFeature { val autoSprintHud by position("auto-sprint-hud", 80, 10) { Point(0.0, 1.0) } val peekChat by keyBindingWithDefaultUnbound("peek-chat") val hidePotionEffects by toggle("hide-mob-effects") { false } + val hidePotionEffectsHud by toggle("hide-potion-effects-hud") { false } val noHurtCam by toggle("disable-hurt-cam") { false } val hideSlotHighlights by toggle("hide-slot-highlights") { false } val hideRecipeBook by toggle("hide-recipe-book") { false } -- cgit