diff --git a/build.gradle.kts b/build.gradle.kts index 6025af1f..30217cc1 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -9,7 +9,7 @@ repositories { allprojects { group = "net.silkmc" - version = "1.10.2" + version = "1.10.3" if (this.name.startsWith("silk")) { description = "Silk is a Minecraft API for Kotlin" } diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index ae927836..a8dde953 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -14,27 +14,26 @@ repositories { dependencies { fun pluginDep(id: String, version: String) = "${id}:${id}.gradle.plugin:${version}" - val kotlinVersion = "1.9.10" + val kotlinVersion = "1.9.21" compileOnly(kotlin("gradle-plugin", embeddedKotlinVersion)) runtimeOnly(kotlin("gradle-plugin", kotlinVersion)) compileOnly(pluginDep("org.jetbrains.kotlin.plugin.serialization", embeddedKotlinVersion)) runtimeOnly(pluginDep("org.jetbrains.kotlin.plugin.serialization", kotlinVersion)) - implementation(pluginDep("fabric-loom", "1.3-SNAPSHOT")) - implementation(pluginDep("io.github.juuxel.loom-vineflower", "1.11.0")) - implementation(pluginDep("com.modrinth.minotaur", "2.8.4")) + implementation(pluginDep("fabric-loom", "1.4-SNAPSHOT")) + implementation(pluginDep("com.modrinth.minotaur", "2.8.7")) - implementation(pluginDep("io.papermc.paperweight.userdev", "1.5.5")) - implementation(pluginDep("xyz.jpenilla.run-paper", "2.1.0")) + implementation(pluginDep("io.papermc.paperweight.userdev", "1.5.11")) + implementation(pluginDep("xyz.jpenilla.run-paper", "2.2.2")) val compileDokkaVersion = "1.9.0" - val dokkaVersion = "1.9.0" + val dokkaVersion = "1.9.10" compileOnly("org.jetbrains.dokka:dokka-gradle-plugin:$compileDokkaVersion") runtimeOnly("org.jetbrains.dokka:dokka-gradle-plugin:$dokkaVersion") compileOnly("org.jetbrains.dokka:dokka-base:$compileDokkaVersion") runtimeOnly("org.jetbrains.dokka:dokka-base:$dokkaVersion") - implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.0") + implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.2") } diff --git a/buildSrc/src/main/kotlin/BuildConstants.kt b/buildSrc/src/main/kotlin/BuildConstants.kt index e11b0343..c63a25d7 100644 --- a/buildSrc/src/main/kotlin/BuildConstants.kt +++ b/buildSrc/src/main/kotlin/BuildConstants.kt @@ -15,12 +15,12 @@ object BuildConstants { const val majorMinecraftVersion = "1.20" // check these values here: https://jakobk.net/mcdev - const val minecraftVersion = "1.20.2-rc1" - const val fabricLoaderVersion = "0.14.22" - const val fabricLanguageKotlinVersion = "1.10.10+kotlin.1.9.10" + const val minecraftVersion = "1.20.4" + const val fabricLoaderVersion = "0.15.1" + const val fabricLanguageKotlinVersion = "1.10.16+kotlin.1.9.21" - const val kotestVersion = "5.7.1" - const val mockkVersion = "1.13.7" + const val kotestVersion = "5.8.0" + const val mockkVersion = "1.13.8" val uploadModules = listOf( "commands", diff --git a/buildSrc/src/main/kotlin/mod-build-script.gradle.kts b/buildSrc/src/main/kotlin/mod-build-script.gradle.kts index 66abdd7c..c58bdc4b 100644 --- a/buildSrc/src/main/kotlin/mod-build-script.gradle.kts +++ b/buildSrc/src/main/kotlin/mod-build-script.gradle.kts @@ -11,7 +11,6 @@ import kotlinx.serialization.json.Json plugins { kotlin("jvm") id("fabric-loom") - id("io.github.juuxel.loom-vineflower") } repositories { diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index db9a6b82..a5952066 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/silk-game/src/main/kotlin/net/silkmc/silk/game/sideboard/internal/SideboardScoreboard.kt b/silk-game/src/main/kotlin/net/silkmc/silk/game/sideboard/internal/SideboardScoreboard.kt index b5f87352..a35d313b 100644 --- a/silk-game/src/main/kotlin/net/silkmc/silk/game/sideboard/internal/SideboardScoreboard.kt +++ b/silk-game/src/main/kotlin/net/silkmc/silk/game/sideboard/internal/SideboardScoreboard.kt @@ -3,23 +3,24 @@ package net.silkmc.silk.game.sideboard.internal import kotlinx.coroutines.* import kotlinx.coroutines.flow.MutableSharedFlow import net.minecraft.network.chat.Component +import net.minecraft.network.chat.numbers.BlankFormat import net.minecraft.network.protocol.Packet +import net.minecraft.network.protocol.game.ClientboundResetScorePacket import net.minecraft.network.protocol.game.ClientboundSetDisplayObjectivePacket import net.minecraft.network.protocol.game.ClientboundSetObjectivePacket import net.minecraft.network.protocol.game.ClientboundSetPlayerTeamPacket import net.minecraft.network.protocol.game.ClientboundSetScorePacket -import net.minecraft.server.ServerScoreboard import net.minecraft.server.level.ServerPlayer import net.minecraft.world.scores.DisplaySlot import net.minecraft.world.scores.Objective import net.minecraft.world.scores.PlayerTeam -import net.minecraft.world.scores.Scoreboard import net.minecraft.world.scores.criteria.ObjectiveCriteria import net.silkmc.silk.core.annotations.InternalSilkApi import net.silkmc.silk.core.event.Events import net.silkmc.silk.core.event.Player import net.silkmc.silk.core.kotlin.LimitedAccessWrapper import net.silkmc.silk.core.task.silkCoroutineScope +import net.silkmc.silk.core.text.literal import java.util.* import java.util.concurrent.ConcurrentHashMap @@ -51,7 +52,7 @@ class SideboardScoreboard( } } - private val dummyObjective = Objective(NoopScoreboard, name, ObjectiveCriteria.DUMMY, displayName, ObjectiveCriteria.RenderType.INTEGER) + private val dummyObjective = Objective(NoopScoreboard, name, ObjectiveCriteria.DUMMY, displayName, ObjectiveCriteria.RenderType.INTEGER, false, BlankFormat.INSTANCE) // scoreboard state private val lines = LimitedAccessWrapper(ArrayList()) @@ -141,7 +142,7 @@ class SideboardScoreboard( suspend fun createInitPackets(score: Int): List> { return buildList { - add(ClientboundSetScorePacket(ServerScoreboard.Method.CHANGE, dummyObjective.name, fakePlayerName, score)) + add(ClientboundSetScorePacket(fakePlayerName, dummyObjective.name, score, fakePlayerName.literal, BlankFormat.INSTANCE)) wrappedTeam.access { team -> add(ClientboundSetPlayerTeamPacket.createAddOrModifyPacket(team, true)) } @@ -151,7 +152,7 @@ class SideboardScoreboard( fun createRemovePackets(): List> { return buildList { - add(ClientboundSetScorePacket(ServerScoreboard.Method.REMOVE, dummyObjective.name, fakePlayerName, 0)) + add(ClientboundResetScorePacket(fakePlayerName, dummyObjective.name)) add(ClientboundSetPlayerTeamPacket.createRemovePacket(unsafeTeam)) } }