diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e6c93842..bc3588aa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,7 +29,7 @@ jobs: - uses: actions/setup-java@v3 with: distribution: 'temurin' - java-version: '17' + java-version: '21' - name: Setup Gradle uses: gradle/gradle-build-action@v2 diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index d64cd491..e6441136 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 a80b22ce..b82aa23a 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.6-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/spark-fabric/build.gradle b/spark-fabric/build.gradle index 6ebb4733..5ab88ee0 100644 --- a/spark-fabric/build.gradle +++ b/spark-fabric/build.gradle @@ -6,8 +6,8 @@ plugins { } tasks.withType(JavaCompile) { - // override, compile targeting J17 - options.release = 17 + // override, compile targeting J21 + options.release = 21 } repositories { @@ -28,9 +28,9 @@ configurations { dependencies { // https://modmuss50.me/fabric.html - minecraft 'com.mojang:minecraft:1.20.4' - mappings 'net.fabricmc:yarn:1.20.4+build.1:v2' - modImplementation 'net.fabricmc:fabric-loader:0.15.1' + minecraft 'com.mojang:minecraft:1.20.5' + mappings 'net.fabricmc:yarn:1.20.5+build.1:v2' + modImplementation 'net.fabricmc:fabric-loader:0.15.10' Set apiModules = [ "fabric-api-base", @@ -40,12 +40,12 @@ dependencies { // Add each module as a dependency apiModules.forEach { - modImplementation(fabricApi.module(it, '0.91.2+1.20.4')) + modImplementation(fabricApi.module(it, '0.97.5+1.20.5')) } include(modImplementation('me.lucko:fabric-permissions-api:0.3.1')) - modImplementation('eu.pb4:placeholder-api:2.0.0-beta.4+1.19') + modImplementation('eu.pb4:placeholder-api:2.4.0-pre.1+1.20.5') shade project(':spark-common') } diff --git a/spark-fabric/src/main/java/me/lucko/spark/fabric/FabricCommandSender.java b/spark-fabric/src/main/java/me/lucko/spark/fabric/FabricCommandSender.java index ca7b8939..7da89966 100644 --- a/spark-fabric/src/main/java/me/lucko/spark/fabric/FabricCommandSender.java +++ b/spark-fabric/src/main/java/me/lucko/spark/fabric/FabricCommandSender.java @@ -26,6 +26,7 @@ import net.kyori.adventure.text.Component; import net.kyori.adventure.text.serializer.gson.GsonComponentSerializer; import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.registry.DynamicRegistryManager; import net.minecraft.server.MinecraftServer; import net.minecraft.server.command.CommandOutput; import net.minecraft.server.rcon.RconCommandOutput; @@ -64,7 +65,7 @@ public UUID getUniqueId() { @Override public void sendMessage(Component message) { - Text component = Text.Serialization.fromJsonTree(GsonComponentSerializer.gson().serializeToTree(message)); + Text component = Text.Serialization.fromJsonTree(GsonComponentSerializer.gson().serializeToTree(message), DynamicRegistryManager.EMPTY); super.delegate.sendMessage(component); } diff --git a/spark-fabric/src/main/java/me/lucko/spark/fabric/FabricExtraMetadataProvider.java b/spark-fabric/src/main/java/me/lucko/spark/fabric/FabricExtraMetadataProvider.java index 22794c27..91797bb4 100644 --- a/spark-fabric/src/main/java/me/lucko/spark/fabric/FabricExtraMetadataProvider.java +++ b/spark-fabric/src/main/java/me/lucko/spark/fabric/FabricExtraMetadataProvider.java @@ -54,7 +54,7 @@ private JsonElement datapackMetadata() { obj.addProperty("name", profile.getDisplayName().getString()); obj.addProperty("description", profile.getDescription().getString()); obj.addProperty("source", resourcePackSource(profile.getSource())); - datapacks.add(profile.getName(), obj); + datapacks.add(profile.getId(), obj); } return datapacks; } diff --git a/spark-fabric/src/main/java/me/lucko/spark/fabric/placeholder/SparkFabricPlaceholderApi.java b/spark-fabric/src/main/java/me/lucko/spark/fabric/placeholder/SparkFabricPlaceholderApi.java index dc95bf41..dc4321da 100644 --- a/spark-fabric/src/main/java/me/lucko/spark/fabric/placeholder/SparkFabricPlaceholderApi.java +++ b/spark-fabric/src/main/java/me/lucko/spark/fabric/placeholder/SparkFabricPlaceholderApi.java @@ -30,6 +30,7 @@ import net.kyori.adventure.text.Component; import net.kyori.adventure.text.serializer.gson.GsonComponentSerializer; +import net.minecraft.registry.DynamicRegistryManager; import net.minecraft.text.Text; import net.minecraft.util.Identifier; @@ -60,7 +61,7 @@ private static PlaceholderResult toResult(Component component) { } private static Text toText(Component component) { - return Text.Serialization.fromJsonTree(GsonComponentSerializer.gson().serializeToTree(component)); + return Text.Serialization.fromJsonTree(GsonComponentSerializer.gson().serializeToTree(component), DynamicRegistryManager.EMPTY); } } diff --git a/spark-fabric/src/main/resources/spark.mixins.json b/spark-fabric/src/main/resources/spark.mixins.json index beaca2f5..27676a64 100644 --- a/spark-fabric/src/main/resources/spark.mixins.json +++ b/spark-fabric/src/main/resources/spark.mixins.json @@ -1,7 +1,6 @@ { "required": true, "package": "me.lucko.spark.fabric.mixin", - "compatibilityLevel": "JAVA_17", "client": [ "ClientEntityManagerAccessor", "ClientWorldAccessor",