fix: only hide effects when no gui is shown
This commit is contained in:
parent
2893438f64
commit
57dd48049d
1 changed files with 7 additions and 4 deletions
|
@ -175,11 +175,14 @@ public class InfoDisplay extends HudModule {
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void onRenderOverlay(RenderGameOverlayEvent event) {
|
public void onRenderOverlay(RenderGameOverlayEvent event) {
|
||||||
if (event.getType() == ElementType.POTION_ICONS) {
|
if (
|
||||||
if (this.hide_effects.get() && event.isCancelable()) {
|
event.getType() == ElementType.POTION_ICONS
|
||||||
|
&& MC.screen == null
|
||||||
|
&& this.hide_effects.get()
|
||||||
|
&& event.isCancelable()
|
||||||
|
) {
|
||||||
event.setCanceled(true);
|
event.setCanceled(true);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (event.getType() != ElementType.TEXT) return;
|
if (event.getType() != ElementType.TEXT) return;
|
||||||
if (this.shouldHide()) return;
|
if (this.shouldHide()) return;
|
||||||
|
|
Loading…
Reference in a new issue