Skip to content

Commit

Permalink
feat: 1.19.x support
Browse files Browse the repository at this point in the history
  • Loading branch information
ChachyDev committed Jun 14, 2022
1 parent 18bc591 commit 7af2eca
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
8 changes: 4 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id "fabric-loom" version "0.10-SNAPSHOT"
id "fabric-loom" version "0.12-SNAPSHOT"
}

java {
Expand All @@ -14,9 +14,9 @@ version = "0.3.0"
group = "club.chachy"

dependencies {
minecraft "com.mojang:minecraft:1.18.2"
mappings "net.fabricmc:yarn:1.18.2+build.1:v2"
modImplementation "net.fabricmc:fabric-loader:0.12.6"
minecraft "com.mojang:minecraft:1.19"
mappings "net.fabricmc:yarn:1.19+build.1:v2"
modImplementation "net.fabricmc:fabric-loader:0.14.6"
}

processResources {
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ public class Constants {
public static final String SUGGESTION_TEXT = "Search for a language";

public static final String TRUNCATION_MARKER = "...";

public static final String EMPTY_TEXT = "";
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import net.minecraft.client.gui.widget.ClickableWidget;
import net.minecraft.client.gui.widget.TextFieldWidget;
import net.minecraft.client.resource.language.LanguageDefinition;
import net.minecraft.text.LiteralText;
import net.minecraft.text.Text;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
Expand Down Expand Up @@ -49,7 +48,7 @@ protected MixinLanguageOptionsScreen(Text title) {

int w = width / 5;

searchText = new TextFieldWidget(textRenderer, width - (w + 5), 11, w, 15, LiteralText.EMPTY);
searchText = new TextFieldWidget(textRenderer, width - (w + 5), 11, w, 15, Text.empty());

searchText.setSuggestion(lazyLanguageLoader$$truncateByWidth(Constants.SUGGESTION_TEXT, searchText, Constants.TRUNCATION_MARKER));
searchText.setChangedListener(this::lazyLanguageLoader$$handleText);
Expand All @@ -71,7 +70,7 @@ protected MixinLanguageOptionsScreen(Text title) {

searchText.setSuggestion(lazyLanguageLoader$$truncateByWidth(Constants.SUGGESTION_TEXT, searchText, Constants.TRUNCATION_MARKER));
} else {
searchText.setSuggestion(LiteralText.EMPTY.asString());
searchText.setSuggestion(Constants.EMPTY_TEXT);
for (LanguageOptionsScreen.LanguageSelectionListWidget.LanguageEntry entry : initialComponents) {
LanguageDefinition def = ((LanguageEntryAccessor) entry).getLanguageDefinition();

Expand Down

0 comments on commit 7af2eca

Please sign in to comment.