Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/1.20.x/dev' into 1.20.x/dev
Browse files Browse the repository at this point in the history
# Conflicts:
#	build.gradle
#	gradle/wrapper/gradle-wrapper.properties
  • Loading branch information
ChachyDev committed Apr 16, 2024
2 parents 8e89b84 + a560e3c commit a8b8625
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 19 deletions.
12 changes: 6 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id "fabric-loom" version "1.2-SNAPSHOT"
id "fabric-loom" version "1.3-SNAPSHOT"
}

java {
Expand All @@ -10,13 +10,13 @@ java {
withSourcesJar()
}

version = "0.3.3"
version = "0.3.5"
group = "dev.chachy"

dependencies {
minecraft "com.mojang:minecraft:1.20"
mappings "net.fabricmc:yarn:1.20+build.1:v2"
modImplementation "net.fabricmc:fabric-loader:0.14.21"
minecraft "com.mojang:minecraft:1.20.4"
mappings "net.fabricmc:yarn:1.20.4+build.1:v2"
modImplementation "net.fabricmc:fabric-loader:0.15.0"
}

processResources {
Expand All @@ -34,7 +34,7 @@ tasks.withType(JavaCompile).configureEach {

jar {
from("LICENSE") {
rename { "${it}_${project.archivesBaseName}" }
rename { "${it}_${project.name}" }
}
}

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-8.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,24 @@
import dev.chachy.lazylanguageloader.client.api.scroll.Scrollable;
import net.minecraft.client.gui.widget.EntryListWidget;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Unique;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;

@Mixin(EntryListWidget.class)
public class MixinEntryListWidget implements Scrollable {
@Unique
private boolean scrolled;


@Inject(method = "mouseScrolled", at = @At("HEAD"))
private void mouseScrolled(double mouseX, double mouseY, double amount, CallbackInfoReturnable<Boolean> cir) {
scrolled = true;
private void mouseScrolled(double mouseX, double mouseY, double horizontalAmount, double verticalAmount, CallbackInfoReturnable<Boolean> cir) {
this.scrolled = true;
}


@SuppressWarnings("AddedMixinMembersNamePattern")
@Override
public boolean hasScrolled() {
return scrolled;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,7 @@ protected MixinLanguageOptionsScreen(Text title) {
super(title);
}

@Inject(
method = "init",
at = @At(
value = "INVOKE",
target = "Lnet/minecraft/client/gui/screen/option/LanguageOptionsScreen;addSelectableChild(Lnet/minecraft/client/gui/Element;)Lnet/minecraft/client/gui/Element;",
shift = At.Shift.AFTER
)
)
@Inject(method = "init", at = @At("TAIL"))
private void lazyLanguageLoader$$init(CallbackInfo ci) {
initialComponents = new ArrayList<>(languageSelectionList.children());

Expand All @@ -59,7 +52,7 @@ protected MixinLanguageOptionsScreen(Text title) {
private void lazyLanguageLoader$$handleText(String text) {
List<LanguageOptionsScreen.LanguageSelectionListWidget.LanguageEntry> children = languageSelectionList.children();

if (text.isBlank() || text.isBlank()) {
if (text.isBlank()) {
int initialSize = initialComponents.size();
int currentSize = children.size();

Expand Down Expand Up @@ -119,6 +112,7 @@ protected MixinLanguageOptionsScreen(Text title) {
}
}

@Unique
private String lazyLanguageLoader$$addTruncationMarker(String text, String marker) {
return text.length() > marker.length() ? text.substring(0, text.length() - marker.length()) : marker;
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"accessWidener": "lazy-language-loader.accesswidener",
"depends": {
"fabricloader": ">=0.12.3",
"minecraft": ">=1.20",
"minecraft": ">=1.20.2",
"java": ">=17"
}
}

0 comments on commit a8b8625

Please sign in to comment.