diff options
author | alemi <me@alemi.dev> | 2024-01-17 00:36:57 +0100 |
---|---|---|
committer | alemi <me@alemi.dev> | 2024-01-17 00:36:57 +0100 |
commit | 57dd48049d4b4aeb83b9cf531d626777d7897bbb (patch) | |
tree | d84d3d2be42fbade43e6a4f0aa6cdeb103a720fd /src | |
parent | 2893438f64fa9e5a4c38d896c93244daa51aacd6 (diff) |
fix: only hide effects when no gui is shown
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/ftbsc/bscv/modules/hud/InfoDisplay.java | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/main/java/ftbsc/bscv/modules/hud/InfoDisplay.java b/src/main/java/ftbsc/bscv/modules/hud/InfoDisplay.java index 2df6b10..6553e94 100644 --- a/src/main/java/ftbsc/bscv/modules/hud/InfoDisplay.java +++ b/src/main/java/ftbsc/bscv/modules/hud/InfoDisplay.java @@ -175,10 +175,13 @@ public class InfoDisplay extends HudModule { @SubscribeEvent public void onRenderOverlay(RenderGameOverlayEvent event) { - if (event.getType() == ElementType.POTION_ICONS) { - if (this.hide_effects.get() && event.isCancelable()) { - event.setCanceled(true); - } + if ( + event.getType() == ElementType.POTION_ICONS + && MC.screen == null + && this.hide_effects.get() + && event.isCancelable() + ) { + event.setCanceled(true); } if (event.getType() != ElementType.TEXT) return; |