aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/moe/nea/firmament/mixins/HideStatusEffectsPatch.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/moe/nea/firmament/mixins/HideStatusEffectsPatch.java')
-rw-r--r--src/main/java/moe/nea/firmament/mixins/HideStatusEffectsPatch.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/main/java/moe/nea/firmament/mixins/HideStatusEffectsPatch.java b/src/main/java/moe/nea/firmament/mixins/HideStatusEffectsPatch.java
index 58f52f4..b2884cd 100644
--- a/src/main/java/moe/nea/firmament/mixins/HideStatusEffectsPatch.java
+++ b/src/main/java/moe/nea/firmament/mixins/HideStatusEffectsPatch.java
@@ -2,8 +2,8 @@ package moe.nea.firmament.mixins;
import moe.nea.firmament.features.fixes.Fixes;
import moe.nea.firmament.util.SBData;
-import net.minecraft.client.gui.DrawContext;
-import net.minecraft.client.gui.screen.ingame.StatusEffectsDisplay;
+import net.minecraft.client.gui.GuiGraphics;
+import net.minecraft.client.gui.screens.inventory.EffectsInInventory;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;
@@ -11,20 +11,20 @@ import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
-@Mixin(StatusEffectsDisplay.class)
+@Mixin(EffectsInInventory.class)
public abstract class HideStatusEffectsPatch {
@Shadow
- public abstract boolean shouldHideStatusEffectHud();
+ public abstract boolean canSeeEffects();
- @Inject(method = "shouldHideStatusEffectHud", at = @At("HEAD"), cancellable = true)
+ @Inject(method = "canSeeEffects", at = @At("HEAD"), cancellable = true)
private void hideStatusEffects(CallbackInfoReturnable<Boolean> cir) {
if (Fixes.TConfig.INSTANCE.getHidePotionEffects()) {
cir.setReturnValue(false);
}
}
- @Inject(method = "drawStatusEffects", at = @At("HEAD"), cancellable = true)
- private void conditionalRenderStatuses(DrawContext context, int mouseX, int mouseY, CallbackInfo ci) {
+ @Inject(method = "renderEffects", at = @At("HEAD"), cancellable = true)
+ private void conditionalRenderStatuses(GuiGraphics context, int mouseX, int mouseY, CallbackInfo ci) {
if (Fixes.TConfig.INSTANCE.getHidePotionEffects()) {
ci.cancel();
}