diff --git a/build.gradle b/build.gradle index 989ab21..c151c61 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ plugins { - id 'org.quiltmc.loom' version '1.2.+' + id 'org.quiltmc.loom' version '1.3.+' id 'java-library' id 'maven-publish' id 'org.quiltmc.gradle.licenser' version '2.0.+' @@ -9,7 +9,7 @@ plugins { group = project.maven_group version = "${project.mod_version}+${getMCVersionString()}" -archivesBaseName = project.archives_base_name +base.archivesName = project.archives_base_name def targetJavaVersion = 17 @@ -107,7 +107,7 @@ processResources { jar { from('LICENSE') { - rename { "${it}_${project.archivesBaseName}" } + rename { "${it}_${project.base.archivesName.get()}" } } } diff --git a/gradle.properties b/gradle.properties index 4f13484..be05101 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,11 +1,12 @@ org.gradle.jvmargs=-Xmx1G +org.gradle.parallel=true # Fabric properties -minecraft_version=1.20 -quilt_mappings=1 -loader_version=0.18.5 +minecraft_version=1.20.1 +quilt_mappings=23 +loader_version=0.20.2 -qsl_version=6.0.1 +qsl_version=6.1.1 # Mod properties mod_version=1.8.1 diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 943f0cb..7f93135 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..ac72c34 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,7 @@ 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.3-bin.zip networkTimeout=10000 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 65dcd68..0adc8e1 100755 --- a/gradlew +++ b/gradlew @@ -83,10 +83,8 @@ done # 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"' +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -133,10 +131,13 @@ 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. + if ! command -v java >/dev/null 2>&1 + then + 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 fi # Increase the maximum file descriptors if we can. @@ -144,7 +145,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 @@ -152,7 +153,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 @@ -197,6 +198,10 @@ 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/io/github/queerbric/inspecio/Inspecio.java b/src/main/java/io/github/queerbric/inspecio/Inspecio.java index 95fc310..aae56aa 100644 --- a/src/main/java/io/github/queerbric/inspecio/Inspecio.java +++ b/src/main/java/io/github/queerbric/inspecio/Inspecio.java @@ -20,9 +20,9 @@ import io.github.queerbric.inspecio.api.InspecioEntrypoint; import io.github.queerbric.inspecio.api.InventoryProvider; import net.minecraft.block.Block; -import net.minecraft.block.DispenserBlock; import net.minecraft.block.HopperBlock; import net.minecraft.block.ShulkerBoxBlock; +import net.minecraft.block.dispenser.DispenserBlock; import net.minecraft.entity.effect.StatusEffect; import net.minecraft.entity.effect.StatusEffectInstance; import net.minecraft.inventory.Inventories; diff --git a/src/main/java/io/github/queerbric/inspecio/InspecioConfig.java b/src/main/java/io/github/queerbric/inspecio/InspecioConfig.java index 0126cd9..c18cf56 100644 --- a/src/main/java/io/github/queerbric/inspecio/InspecioConfig.java +++ b/src/main/java/io/github/queerbric/inspecio/InspecioConfig.java @@ -25,6 +25,7 @@ import com.mojang.serialization.JsonOps; import com.mojang.serialization.codecs.RecordCodecBuilder; import net.minecraft.block.*; +import net.minecraft.block.dispenser.DispenserBlock; import net.minecraft.util.math.MathHelper; import org.jetbrains.annotations.Nullable; diff --git a/src/main/java/io/github/queerbric/inspecio/mixin/ItemStackMixin.java b/src/main/java/io/github/queerbric/inspecio/mixin/ItemStackMixin.java index 90e07a5..6e564d7 100644 --- a/src/main/java/io/github/queerbric/inspecio/mixin/ItemStackMixin.java +++ b/src/main/java/io/github/queerbric/inspecio/mixin/ItemStackMixin.java @@ -121,7 +121,7 @@ private void getTooltipData(CallbackInfoReturnable> info) datas.add(new FoodTooltipComponent(comp)); } - if (config.getEffectsConfig().hasPotions()) { + if (config.getEffectsConfig().hasFood()) { if (stack.isIn(Inspecio.HIDDEN_EFFECTS_TAG)) { datas.add(new StatusEffectTooltipComponent()); } else { diff --git a/src/main/java/io/github/queerbric/inspecio/tooltip/SignTooltipComponent.java b/src/main/java/io/github/queerbric/inspecio/tooltip/SignTooltipComponent.java index e65f4e9..83e7e39 100644 --- a/src/main/java/io/github/queerbric/inspecio/tooltip/SignTooltipComponent.java +++ b/src/main/java/io/github/queerbric/inspecio/tooltip/SignTooltipComponent.java @@ -22,8 +22,9 @@ import com.mojang.blaze3d.vertex.VertexConsumer; import io.github.queerbric.inspecio.Inspecio; import io.github.queerbric.inspecio.SignTooltipMode; -import net.minecraft.block.AbstractSignBlock; import net.minecraft.block.entity.SignText; +import net.minecraft.block.sign.AbstractSignBlock; +import net.minecraft.block.sign.SignType; import net.minecraft.client.MinecraftClient; import net.minecraft.client.font.TextRenderer; import net.minecraft.client.gui.GuiGraphics; @@ -49,7 +50,6 @@ import net.minecraft.text.Text; import net.minecraft.util.DyeColor; import net.minecraft.util.Identifier; -import net.minecraft.util.SignType; import net.minecraft.util.math.Axis; import org.joml.Matrix4f; import org.quiltmc.qsl.tooltip.api.ConvertibleTooltipData; diff --git a/src/main/resources/quilt.mod.json b/src/main/resources/quilt.mod.json index 27ebb07..3b16052 100644 --- a/src/main/resources/quilt.mod.json +++ b/src/main/resources/quilt.mod.json @@ -31,11 +31,11 @@ "depends": [ { "id": "minecraft", - "versions": "~1.20" + "versions": "~1.20.1" }, { "id": "quilt_loader", - "versions": ">=0.17.11" + "versions": "*" }, "quilt_client_command", "quilt_resource_loader", @@ -48,4 +48,4 @@ ] }, "mixin": "inspecio.mixins.json" -} \ No newline at end of file +}