From bcc5e073a9663281b08646756160ec4e0d455864 Mon Sep 17 00:00:00 2001 From: telontelvarost Date: Fri, 26 Apr 2024 20:54:54 -0400 Subject: [PATCH] UDOC-0 - Fix tab autocomplete when using SPC (press tab twice) --- CHANGELOG.md | 2 +- build.gradle | 3 +++ gradle.properties | 2 +- .../mixin/client/text/chat/ChatScreenMixin.java | 5 +++++ 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 102c090..ce6ee8b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1 +1 @@ -- Fix container offset when swapping items to hotbar slots \ No newline at end of file +- Fix tab autocomplete when using SPC (press tab twice) \ No newline at end of file diff --git a/build.gradle b/build.gradle index c2d50aa..084c2e2 100644 --- a/build.gradle +++ b/build.gradle @@ -91,6 +91,9 @@ dependencies { modImplementation("net.glasslauncher:HowManyItems-Fabric-Unofficial:${project.howmanyitems_version}") { transitive false } + modImplementation('com.github.matthewperiut:spc-babric:0.4.3') { + transitive false + } } processResources { diff --git a/gradle.properties b/gradle.properties index 61c5b3e..b233837 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,7 +9,7 @@ yarn_mappings=b1.7.3+build.8 loader_version=0.14.24-babric.1 # Mod Properties -mod_version = 1.3.2 +mod_version = 1.3.3 maven_group = pl.telvarost archives_base_name = mojangfixstationapi diff --git a/src/main/java/pl/telvarost/mojangfixstationapi/mixin/client/text/chat/ChatScreenMixin.java b/src/main/java/pl/telvarost/mojangfixstationapi/mixin/client/text/chat/ChatScreenMixin.java index 1b54303..b8f0d2e 100644 --- a/src/main/java/pl/telvarost/mojangfixstationapi/mixin/client/text/chat/ChatScreenMixin.java +++ b/src/main/java/pl/telvarost/mojangfixstationapi/mixin/client/text/chat/ChatScreenMixin.java @@ -93,6 +93,11 @@ private void onKeyPressedEntry(char character, int keyCode, CallbackInfo ci) { } } + @Inject(method = "keyPressed", at = @At("HEAD")) + private void onKeyPressedHead(char character, int keyCode, CallbackInfo ci) { + textField.setText(text); + } + @Inject(method = "keyPressed", at = @At("TAIL")) private void onKeyPressedTail(char character, int keyCode, CallbackInfo ci) { textField.keyPressed(character, keyCode);