diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index e6441136..b1b8ef56 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 c61a118f..df6a6ad7 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,7 +1,9 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.5.1-bin.zip networkTimeout=10000 +retries=0 +retryBackOffMs=500 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 1aa94a42..b9bb139f 100755 --- a/gradlew +++ b/gradlew @@ -1,7 +1,7 @@ #!/bin/sh # -# Copyright © 2015-2021 the original authors. +# Copyright © 2015 the original authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/3d91ce3b8caaf77ad09f381f43615b715b53f72c/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -84,7 +86,7 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # 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 +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -112,7 +114,6 @@ case "$( uname )" in #( NONSTOP* ) nonstop=true ;; esac -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar # Determine the Java command to use to start the JVM. @@ -170,7 +171,6 @@ fi # For Cygwin or MSYS, switch paths to Windows format before running java if "$cygwin" || "$msys" ; then APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) - CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) JAVACMD=$( cygpath --unix "$JAVACMD" ) @@ -203,15 +203,14 @@ fi DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' # Collect all arguments for the java command: -# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, # and any embedded shellness will be escaped. # * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be # treated as '${Hostname}' itself on the command line. set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ - -classpath "$CLASSPATH" \ - org.gradle.wrapper.GradleWrapperMain \ + -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \ "$@" # Stop when "xargs" is not available. diff --git a/gradlew.bat b/gradlew.bat index 7101f8e4..aa5f10b0 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -13,6 +13,8 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem @if "%DEBUG%"=="" @echo off @rem ########################################################################## @@ -21,8 +23,8 @@ @rem @rem ########################################################################## -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal +@rem Set local scope for the variables, and ensure extensions are enabled +setlocal EnableExtensions set DIRNAME=%~dp0 if "%DIRNAME%"=="" set DIRNAME=. @@ -49,7 +51,7 @@ echo. 1>&2 echo Please set the JAVA_HOME variable in your environment to match the 1>&2 echo location of your Java installation. 1>&2 -goto fail +"%COMSPEC%" /c exit 1 :findJavaFromJavaHome set JAVA_HOME=%JAVA_HOME:"=% @@ -63,30 +65,18 @@ echo. 1>&2 echo Please set the JAVA_HOME variable in your environment to match the 1>&2 echo location of your Java installation. 1>&2 -goto fail +"%COMSPEC%" /c exit 1 :execute @rem Setup the command line -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar @rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* - -:end -@rem End local scope for the variables with windows NT shell -if %ERRORLEVEL% equ 0 goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -set EXIT_CODE=%ERRORLEVEL% -if %EXIT_CODE% equ 0 set EXIT_CODE=1 -if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% -exit /b %EXIT_CODE% - -:mainEnd -if "%OS%"=="Windows_NT" endlocal +@rem endlocal doesn't take effect until after the line is parsed and variables are expanded +@rem which allows us to clear the local environment before executing the java command +endlocal & "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* & call :exitWithErrorLevel -:omega +:exitWithErrorLevel +@rem Use "%COMSPEC%" /c exit to allow operators to work properly in scripts +"%COMSPEC%" /c exit %ERRORLEVEL% diff --git a/libs.versions.toml b/libs.versions.toml index fb318d88..a1c3bb9a 100644 --- a/libs.versions.toml +++ b/libs.versions.toml @@ -1,8 +1,8 @@ [versions] -minecraft = "26.1" -fabric-loader = "0.18.4" +minecraft = "26.2-rc-2" +fabric-loader = "0.19.3" -fabric-api = "0.144.1+26.1" +fabric-api = "0.152.1+26.2" # Kotlin kotlin = "2.3.10" @@ -10,7 +10,7 @@ kotlin = "2.3.10" fabric-kotlin = "1.13.9+kotlin.2.3.10" fabric-permissions = "0.7.0" -translations = "3.0.0+26.1-pre-3" +translations = "3.1.0+26.2" exposed = "1.0.0-rc-2" sqlite-jdbc = "3.50.3.0" @@ -43,5 +43,5 @@ detekt-formatting = { module = "dev.detekt:detekt-rules-ktlint-wrapper", version [plugins] kotlin = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" } detekt = { id = "dev.detekt", version.ref = "detekt" } -loom = { id = "net.fabricmc.fabric-loom", version = "1.15.+" } +loom = { id = "net.fabricmc.fabric-loom", version = "1.17.+" } git_hooks = { id = "com.github.jakemarsden.git-hooks", version = "0.0.2" } diff --git a/src/main/java/com/github/quiltservertools/ledger/mixin/blocks/PointedDripstoneBlockMixin.java b/src/main/java/com/github/quiltservertools/ledger/mixin/blocks/SpeleothemBlockMixin.java similarity index 86% rename from src/main/java/com/github/quiltservertools/ledger/mixin/blocks/PointedDripstoneBlockMixin.java rename to src/main/java/com/github/quiltservertools/ledger/mixin/blocks/SpeleothemBlockMixin.java index 89d317bb..4458ce38 100644 --- a/src/main/java/com/github/quiltservertools/ledger/mixin/blocks/PointedDripstoneBlockMixin.java +++ b/src/main/java/com/github/quiltservertools/ledger/mixin/blocks/SpeleothemBlockMixin.java @@ -2,8 +2,8 @@ import com.github.quiltservertools.ledger.callbacks.BlockBreakCallback; import com.github.quiltservertools.ledger.utility.Sources; +import net.minecraft.world.level.block.SpeleothemBlock; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.PointedDripstoneBlock; import net.minecraft.server.level.ServerLevel; import net.minecraft.core.BlockPos; import net.minecraft.util.RandomSource; @@ -12,8 +12,8 @@ import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; -@Mixin(PointedDripstoneBlock.class) -public abstract class PointedDripstoneBlockMixin { +@Mixin(SpeleothemBlock.class) +public abstract class SpeleothemBlockMixin { @Inject(method = "tick", at = @At(value = "INVOKE", target = "Lnet/minecraft/server/level/ServerLevel;destroyBlock(Lnet/minecraft/core/BlockPos;Z)Z")) diff --git a/src/main/java/com/github/quiltservertools/ledger/mixin/entities/EvokerEntityWololoGoalMixin.java b/src/main/java/com/github/quiltservertools/ledger/mixin/entities/EvokerEntityWololoGoalMixin.java index c79eef21..25467122 100644 --- a/src/main/java/com/github/quiltservertools/ledger/mixin/entities/EvokerEntityWololoGoalMixin.java +++ b/src/main/java/com/github/quiltservertools/ledger/mixin/entities/EvokerEntityWololoGoalMixin.java @@ -14,7 +14,6 @@ import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; -import org.spongepowered.asm.mixin.injection.callback.LocalCapture; @Mixin(Evoker.EvokerWololoSpellGoal.class) public abstract class EvokerEntityWololoGoalMixin { @@ -31,7 +30,7 @@ public void legerLogOldEntity(CallbackInfo ci, @Local Sheep sheepEntity) { @Inject(method = "performSpellCasting", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/entity/animal/sheep/Sheep;setColor(Lnet/minecraft/world/item/DyeColor;)V", shift = At.Shift.AFTER)) public void ledgerEvokerDyeSheep(CallbackInfo ci, @Local Sheep sheepEntity) { if (oldEntityTags != null) { - EntityModifyCallback.EVENT.invoker().modify(sheepEntity.level(), sheepEntity.blockPosition(), oldEntityTags, sheepEntity, Items.RED_DYE.getDefaultInstance(), null, Sources.DYE); + EntityModifyCallback.EVENT.invoker().modify(sheepEntity.level(), sheepEntity.blockPosition(), oldEntityTags, sheepEntity, Items.DYE.red().getDefaultInstance(), null, Sources.DYE); } } } diff --git a/src/main/kotlin/com/github/quiltservertools/ledger/actions/ItemDropActionType.kt b/src/main/kotlin/com/github/quiltservertools/ledger/actions/ItemDropActionType.kt index 65b31c0e..7848c7c8 100644 --- a/src/main/kotlin/com/github/quiltservertools/ledger/actions/ItemDropActionType.kt +++ b/src/main/kotlin/com/github/quiltservertools/ledger/actions/ItemDropActionType.kt @@ -14,7 +14,7 @@ import net.minecraft.network.chat.HoverEvent import net.minecraft.server.MinecraftServer import net.minecraft.util.ProblemReporter import net.minecraft.world.entity.Entity -import net.minecraft.world.entity.EntityType +import net.minecraft.world.entity.EntityTypes import net.minecraft.world.entity.item.ItemEntity import net.minecraft.world.item.ItemStackTemplate import net.minecraft.world.level.storage.TagValueInput @@ -70,7 +70,7 @@ open class ItemDropActionType : AbstractActionType() { val entity = world.getEntity(optionalUUID.get()) if (entity == null) { - val entity = ItemEntity(EntityType.ITEM, world) + val entity = ItemEntity(EntityTypes.ITEM, world) ProblemReporter.ScopedCollector({ "ledger:restore:item-drop@$pos" }, LOGGER).use { val readView = TagValueInput.create(it, world.registryAccess(), newEntity) entity.load(readView) diff --git a/src/main/kotlin/com/github/quiltservertools/ledger/actions/ItemPickUpActionType.kt b/src/main/kotlin/com/github/quiltservertools/ledger/actions/ItemPickUpActionType.kt index f4ba8dd4..d04c6404 100644 --- a/src/main/kotlin/com/github/quiltservertools/ledger/actions/ItemPickUpActionType.kt +++ b/src/main/kotlin/com/github/quiltservertools/ledger/actions/ItemPickUpActionType.kt @@ -14,7 +14,7 @@ import net.minecraft.network.chat.HoverEvent import net.minecraft.server.MinecraftServer import net.minecraft.util.ProblemReporter import net.minecraft.world.entity.Entity -import net.minecraft.world.entity.EntityType +import net.minecraft.world.entity.EntityTypes import net.minecraft.world.entity.item.ItemEntity import net.minecraft.world.item.ItemStackTemplate import net.minecraft.world.level.storage.TagValueInput @@ -54,7 +54,7 @@ open class ItemPickUpActionType : AbstractActionType() { val entity = world.getEntity(optionalUUID.get()) if (entity == null) { - val entity = ItemEntity(EntityType.ITEM, world) + val entity = ItemEntity(EntityTypes.ITEM, world) ProblemReporter.ScopedCollector({ "ledger:rollback:item-pick-up@$pos" }, LOGGER).use { val readView = TagValueInput.create(it, world.registryAccess(), oldEntity) entity.load(readView) diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 6ba5b304..91815902 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -28,7 +28,7 @@ "depends": { "fabricloader": ">=0.18.4", "fabric-language-kotlin": ">=${fabricKotlin}", - "minecraft": ">=${minecraft}", + "minecraft": "~26.2-", "fabric-api": ">=${fabricApi}" }, "breaks": { diff --git a/src/main/resources/ledger.mixins.json b/src/main/resources/ledger.mixins.json index 03232c9f..90fea326 100644 --- a/src/main/resources/ledger.mixins.json +++ b/src/main/resources/ledger.mixins.json @@ -60,7 +60,7 @@ "blocks.LeverBlockMixin", "blocks.LiquidBlockMixin", "blocks.NoteBlockMixin", - "blocks.PointedDripstoneBlockMixin", + "blocks.SpeleothemBlockMixin", "blocks.RepeaterBlockMixin", "blocks.RootedDirtBlockMixin", "blocks.ScaffoldingBlockMixin",