diff --git a/build.gradle b/build.gradle index 1b12b0d..34d53b6 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ plugins { - id 'fabric-loom' version '1.2-SNAPSHOT' + id 'fabric-loom' version '1.6-SNAPSHOT' id 'maven-publish' } @@ -30,14 +30,14 @@ processResources { } tasks.withType(JavaCompile).configureEach { - it.options.release = 17 + it.options.release = 21 } java { withSourcesJar() - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 + sourceCompatibility = JavaVersion.VERSION_21 + targetCompatibility = JavaVersion.VERSION_21 } jar { diff --git a/gradle.properties b/gradle.properties index 90a8357..06bc5e8 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,14 +4,14 @@ org.gradle.parallel=true # Fabric Properties # check these on https://fabricmc.net/develop - minecraft_version=1.19.4 - yarn_mappings=1.19.4+build.2 - loader_version=0.14.19 + minecraft_version=1.20.6 + yarn_mappings=1.20.6+build.3 + loader_version=0.15.11 # Mod Properties - mod_version = 1.0 + mod_version = 1.1 maven_group = net.qlient archives_base_name = autototem # Dependencies - fabric_version=0.79.0+1.19.4 + fabric_version=0.99.4+1.20.6 diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index c1962a7..943f0cb 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 37aef8d..509c4a2 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index aeb74cb..65dcd68 100644 --- a/gradlew +++ b/gradlew @@ -85,6 +85,9 @@ done APP_BASE_NAME=${0##*/} APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -141,7 +144,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac @@ -149,7 +152,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then '' | soft) :;; #( *) # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -194,10 +197,6 @@ if "$cygwin" || "$msys" ; then done fi - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' - # Collect all arguments for the java command; # * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of # shell script including quotes and variable substitutions, so put them in diff --git a/src/main/java/net/qlient/autototem/mixin/TotemMixin.java b/src/main/java/net/qlient/autototem/mixin/TotemMixin.java index c28d694..c326a29 100644 --- a/src/main/java/net/qlient/autototem/mixin/TotemMixin.java +++ b/src/main/java/net/qlient/autototem/mixin/TotemMixin.java @@ -53,7 +53,11 @@ private void onTotemUse(ItemStack floatingItem, CallbackInfo ci) { } private int getTotemSlot(PlayerInventory inventory) { - for (int i = 0; i < inventory.main.size(); i++) { + for (int i = 9; i < inventory.main.size(); i++) { // Check inventory first + ItemStack stack = inventory.main.get(i); + if (!stack.isEmpty() && stack.getItem() == Items.TOTEM_OF_UNDYING) return i; + } + for(int i = 0; i < 9; i++) { // Check hotbar ItemStack stack = inventory.main.get(i); if (!stack.isEmpty() && stack.getItem() == Items.TOTEM_OF_UNDYING) return i; } diff --git a/src/main/resources/assets/autototem/icon.png b/src/main/resources/assets/autototem/icon.png index b9f014e..947c63e 100644 Binary files a/src/main/resources/assets/autototem/icon.png and b/src/main/resources/assets/autototem/icon.png differ diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index c63ccb9..68024c3 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -1,7 +1,7 @@ { "schemaVersion": 1, "id": "autototem", - "version": "1.19.4", + "version": "1.1", "name": "Auto Totem", "description": "Replaces your totem when using one. (Offhand Only)",