From f6ca23fcc1d13389ab9460c843a0f2126eb84443 Mon Sep 17 00:00:00 2001 From: DeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com> Date: Thu, 18 Aug 2022 13:31:23 +0200 Subject: Blur (#94) * blurring * api * update optifine hook --- .../oneconfig/internal/plugin/hooks/OptifineConfigHook.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'versions/src/main/java/cc/polyfrost/oneconfig/internal/plugin') diff --git a/versions/src/main/java/cc/polyfrost/oneconfig/internal/plugin/hooks/OptifineConfigHook.java b/versions/src/main/java/cc/polyfrost/oneconfig/internal/plugin/hooks/OptifineConfigHook.java index 197d9c2..124c44e 100644 --- a/versions/src/main/java/cc/polyfrost/oneconfig/internal/plugin/hooks/OptifineConfigHook.java +++ b/versions/src/main/java/cc/polyfrost/oneconfig/internal/plugin/hooks/OptifineConfigHook.java @@ -26,20 +26,20 @@ package cc.polyfrost.oneconfig.internal.plugin.hooks; -import cc.polyfrost.oneconfig.gui.OneConfigGui; import cc.polyfrost.oneconfig.platform.Platform; import cc.polyfrost.oneconfig.utils.gui.GuiUtils; +import cc.polyfrost.oneconfig.utils.gui.OneUIScreen; import java.util.Optional; public class OptifineConfigHook { public static boolean shouldNotApplyFastRender() { - if (Platform.getGuiPlatform().getCurrentScreen() instanceof OneConfigGui) { + if (Platform.getGuiPlatform().getCurrentScreen() instanceof OneUIScreen && ((OneUIScreen) Platform.getGuiPlatform().getCurrentScreen()).hasBackgroundBlur()) { return true; } for (Optional screen : GuiUtils.getScreenQueue()) { - if (screen.isPresent() && screen.get() instanceof OneConfigGui) { + if (screen.isPresent() && screen.get() instanceof OneUIScreen && ((OneUIScreen) screen.get()).hasBackgroundBlur()) { return true; } } -- cgit