diff --git a/build.gradle b/build.gradle index e1c4bd1..9e6e53c 100644 --- a/build.gradle +++ b/build.gradle @@ -1,12 +1,8 @@ plugins { - id 'fabric-loom' version '0.11-SNAPSHOT' + id 'fabric-loom' version '1.2-SNAPSHOT' id 'maven-publish' } -sourceCompatibility = JavaVersion.VERSION_17 -targetCompatibility = JavaVersion.VERSION_17 - -archivesBaseName = project.archives_base_name version = project.mod_version group = project.maven_group @@ -30,6 +26,10 @@ dependencies { compileOnly 'com.google.code.findbugs:jsr305:+' } +base { + archivesName = project.archives_base_name +} + processResources { inputs.property "version", project.version @@ -40,6 +40,9 @@ processResources { // from(sourceSets.main.resources.srcDirs) { // exclude "fabric.mod.json" // } + + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 } // ensure that the encoding is set to UTF-8, no matter what the system default is @@ -53,12 +56,13 @@ tasks.withType(JavaCompile) { // if it is present. // If you remove this task, sources will not be generated. task sourcesJar(type: Jar, dependsOn: classes) { - classifier = "sources" from sourceSets.main.allSource } jar { - from "LICENSE" + from ("LICENSE") { + rename { "${it}_${base.archivesName.get()}"} + } } // configure the maven publication diff --git a/gradle.properties b/gradle.properties index 7bb54f7..f644edf 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,10 +3,9 @@ org.gradle.jvmargs=-Xmx1G # Fabric Properties # check these on https://fabricmc.net/use - minecraft_version=1.19.3 - yarn_mappings=1.19.3+build.5 - loader_version=0.14.13 - + minecraft_version=1.19.4 + yarn_mappings=1.19.4+build.2 + loader_version=0.14.19 # Mod Properties mod_version = 1.2.6 @@ -17,5 +16,5 @@ org.gradle.jvmargs=-Xmx1G # Dependencies # currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api - fabric_version=0.73.0+1.19.3 + fabric_version=0.79.0+1.19.4 modmenu_version=5.0.2 diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 7454180..c1962a7 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 84d1f85..c898b7a 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip +networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists +zipStorePath=wrapper/dists \ No newline at end of file diff --git a/gradlew b/gradlew index 1b6c787..0bfeb0a 100644 --- a/gradlew +++ b/gradlew @@ -55,7 +55,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -80,10 +80,10 @@ do esac done -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -APP_NAME="Gradle" +# This is normally unused +# shellcheck disable=SC2034 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"' @@ -127,14 +127,12 @@ if [ -n "$JAVA_HOME" ] ; then fi if [ ! -x "$JAVACMD" ] ; then die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - Please set the JAVA_HOME variable in your environment to match the location of your Java installation." fi else JAVACMD=java which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - Please set the JAVA_HOME variable in your environment to match the location of your Java installation." fi @@ -143,12 +141,16 @@ fi 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 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac case $MAX_FD in #( '' | soft) :;; #( *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -193,6 +195,9 @@ 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 @@ -205,6 +210,12 @@ set -- \ org.gradle.wrapper.GradleWrapperMain \ "$@" +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + # Use "xargs" to parse quoted args. # # With -n1 it outputs one arg per line, with the quotes and backslashes removed. @@ -231,4 +242,4 @@ eval "set -- $( tr '\n' ' ' )" '"$@"' -exec "$JAVACMD" "$@" +exec "$JAVACMD" "$@" \ No newline at end of file diff --git a/src/main/java/net/entityoutliner/ui/ColorWidget.java b/src/main/java/net/entityoutliner/ui/ColorWidget.java index 6652977..c84d069 100644 --- a/src/main/java/net/entityoutliner/ui/ColorWidget.java +++ b/src/main/java/net/entityoutliner/ui/ColorWidget.java @@ -52,7 +52,6 @@ public void renderButton(MatrixStack matrices, int mouseX, int mouseY, float del RenderSystem.defaultBlendFunc(); RenderSystem.blendFunc(GlStateManager.SrcFactor.SRC_ALPHA, GlStateManager.DstFactor.ONE_MINUS_SRC_ALPHA); drawTexture(matrices, this.getX(), this.getY(), this.isFocused() ? 20.0F : 0.0F, this.color.ordinal() * 20, 20, 20, 40, 180); - this.renderBackground(matrices, minecraftClient, mouseX, mouseY); } public enum Color { diff --git a/src/main/java/net/entityoutliner/ui/EntityListWidget.java b/src/main/java/net/entityoutliner/ui/EntityListWidget.java index 9a8d31e..a8c1fbd 100644 --- a/src/main/java/net/entityoutliner/ui/EntityListWidget.java +++ b/src/main/java/net/entityoutliner/ui/EntityListWidget.java @@ -152,7 +152,7 @@ public static EntityListWidget.HeaderEntry create(SpawnGroup category, TextRende } public void render(MatrixStack matrices, int i, int j, int k, int l, int m, int n, int o, boolean bl, float f) { - DrawableHelper.drawCenteredText(matrices, this.font, this.title, this.width / 2, j + (this.height / 2) - (this.font.fontHeight / 2), 16777215); + this.font.draw(matrices, this.title, (float) (this.width / 2 - this.font.getWidth(this.title) / 2), (float) (j + (this.height / 2) - (this.font.fontHeight / 2)), 16777215); } public List children() { diff --git a/src/main/java/net/entityoutliner/ui/EntitySelector.java b/src/main/java/net/entityoutliner/ui/EntitySelector.java index f6eb31a..f61cce7 100644 --- a/src/main/java/net/entityoutliner/ui/EntitySelector.java +++ b/src/main/java/net/entityoutliner/ui/EntitySelector.java @@ -247,7 +247,7 @@ public void render(MatrixStack matrices, int mouseX, int mouseY, float delta) { // Render our search bar this.setFocused(this.searchField); - this.searchField.setTextFieldFocused(true); + this.searchField.setFocused(true); this.searchField.render(matrices, mouseX, mouseY, delta); // Render buttons diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 04d78f5..eaa545f 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -33,7 +33,7 @@ ], "depends": { - "fabricloader": ">=0.7.4", + "fabricloader": ">=0.14.19", "fabric": "*", "fabric-lifecycle-events-v1": "*", "fabric-key-binding-api-v1": "*",