fixed broken Maintained mod (#23)

Co-authored-by: Quarri6343 <[email protected]>
This commit is contained in:
AnrDaemonandQuarri6343 authored and GitHub committed 2024-07-01 06:43:57 +02:00
1 parent 6279ef2b09
commit a189446cac
1 file changed
+3 -2
@@ -37,19 +37,20 @@ public class KeyEvent {
@SubscribeEvent
public void onKeyEvent(KeyInputEvent event) {
boolean showKey = key_show.isPressed();
if (key_cfg.isPressed()) {
Minecraft mc = Minecraft.getMinecraft();
if (mc.currentScreen == null) {
mc.displayGuiScreen(new ScreenConfig(null));
}
} else if (key_show.isPressed() && ConfigHandler.instance()
} else if (showKey && ConfigHandler.instance()
.getConfig(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_MODE, false)) {
boolean status = ConfigHandler.instance()
.getConfig(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_SHOW, true);
ConfigHandler.instance()
.setConfig(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_SHOW, !status);
} else
if (key_show.isPressed() && !ConfigHandler.instance()
if (showKey && !ConfigHandler.instance()
.getConfig(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_MODE, false)) {
ConfigHandler.instance()
.setConfig(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_SHOW, true);