diff options
author | Jacob <55346310+Kathund@users.noreply.github.com> | 2025-06-26 22:17:00 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-06-26 16:17:00 +0200 |
commit | 081590e019fe9e2bfc633214ef623e21dce11fb3 (patch) | |
tree | 5c345c9a536569e015cad9e6d52686d338b645dd /src | |
parent | 194b6f642d25fdb50dc8aa098cb9fdad3a0bc5d1 (diff) | |
download | Firmament-081590e019fe9e2bfc633214ef623e21dce11fb3.tar.gz Firmament-081590e019fe9e2bfc633214ef623e21dce11fb3.tar.bz2 Firmament-081590e019fe9e2bfc633214ef623e21dce11fb3.zip |
Merge pull request #165
* fix: let hide potion effects hide top right
* convert to own opiton
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/moe/nea/firmament/mixins/HudRenderEventsPatch.java | 7 | ||||
-rw-r--r-- | src/main/kotlin/features/fixes/Fixes.kt | 1 |
2 files changed, 8 insertions, 0 deletions
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 } |