aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob <55346310+Kathund@users.noreply.github.com>2025-06-26 22:17:00 +0800
committerGitHub <noreply@github.com>2025-06-26 16:17:00 +0200
commit081590e019fe9e2bfc633214ef623e21dce11fb3 (patch)
tree5c345c9a536569e015cad9e6d52686d338b645dd
parent194b6f642d25fdb50dc8aa098cb9fdad3a0bc5d1 (diff)
downloadFirmament-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
-rw-r--r--src/main/java/moe/nea/firmament/mixins/HudRenderEventsPatch.java7
-rw-r--r--src/main/kotlin/features/fixes/Fixes.kt1
-rw-r--r--translations/en_us.json2
3 files changed, 10 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 }
diff --git a/translations/en_us.json b/translations/en_us.json
index ec78ed6..0628915 100644
--- a/translations/en_us.json
+++ b/translations/en_us.json
@@ -129,6 +129,8 @@
"firmament.config.fixes.disable-hurt-cam.description": "Disable the damage screen shake animation.",
"firmament.config.fixes.hide-mob-effects": "Hide Potion Effects",
"firmament.config.fixes.hide-mob-effects.description": "Hide Potion effects on the right side of your player inventory.",
+ "firmament.config.fixes.hide-potion-effects-hud": "Hide Potion Effects HUD",
+ "firmament.config.fixes.hide-potion-effects-hud.description": "Hides the potion effects HUd in the top right.",
"firmament.config.fixes.hide-recipe-book": "No Recipe Book",
"firmament.config.fixes.hide-recipe-book.description": "Remove the recipe book from your inventory",
"firmament.config.fixes.hide-slot-highlights": "Hide Slot Highlights",