From 2eab1abd21fac71bbe2b85bd97e7652fab3d4066 Mon Sep 17 00:00:00 2001 From: Jerozgen Date: Wed, 15 Mar 2023 21:01:17 +0300 Subject: [PATCH] Fix crash with Debugify --- gradle.properties | 2 +- .../languagereload/mixin/LanguageOptionsScreenMixin.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle.properties b/gradle.properties index 9f961a9..9e48fd7 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,7 +9,7 @@ loader_version=0.14.12 fabric_version=0.72.0+1.19.3 # Mod Properties -mod_version=1.5.5+1.19.3 +mod_version=1.5.6+1.19.3 maven_group=jerozgen archives_base_name=language-reload diff --git a/src/main/java/jerozgen/languagereload/mixin/LanguageOptionsScreenMixin.java b/src/main/java/jerozgen/languagereload/mixin/LanguageOptionsScreenMixin.java index 144b95c..4fffda0 100644 --- a/src/main/java/jerozgen/languagereload/mixin/LanguageOptionsScreenMixin.java +++ b/src/main/java/jerozgen/languagereload/mixin/LanguageOptionsScreenMixin.java @@ -68,7 +68,6 @@ public void setFocused(boolean focused) { }; searchBox.setChangedListener(__ -> refresh()); addSelectableChild(searchBox); - setInitialFocus(searchBox); var listWidth = Math.min(width / 2 - 4, 200); var it = (LanguageOptionsScreen) (Object) this; @@ -84,6 +83,7 @@ public void setFocused(boolean focused) { addDrawableChild(ButtonWidget.builder(ScreenTexts.DONE, this::onDone) .dimensions(width / 2 - 155 + 160, height - 28, 150, 20) .build()); + setInitialFocus(searchBox); super.init(); ci.cancel();