Merge pull request #165

* fix: let hide potion effects hide top right

* convert to own opiton
This commit is contained in:
Jacob
2025-06-26 22:17:00 +08:00
committed by GitHub
parent 194b6f642d
commit 081590e019
3 changed files with 10 additions and 0 deletions

View File

@@ -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();
}
}

View File

@@ -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 }

View File

@@ -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",