diff --git a/api/build.gradle.kts b/api/build.gradle.kts index 946bfde..4faea91 100644 --- a/api/build.gradle.kts +++ b/api/build.gradle.kts @@ -1,7 +1,6 @@ import org.jetbrains.dokka.base.DokkaBase import org.jetbrains.dokka.base.DokkaBaseConfiguration import org.jetbrains.dokka.gradle.DokkaTask -import org.jetbrains.kotlin.gradle.plugin.mpp.pm20.util.archivesName import java.net.URL plugins { @@ -21,8 +20,8 @@ buildscript { apply(plugin = "kotlinx-atomicfu") tasks { - java { - archivesName = "sheeplib" + jar { + archiveBaseName = "sheeplib" } withType().configureEach { pluginConfiguration { diff --git a/api/src/main/kotlin/com/noxcrew/sheeplib/DialogContainer.kt b/api/src/main/kotlin/com/noxcrew/sheeplib/DialogContainer.kt index 6e2ae37..7cdb482 100644 --- a/api/src/main/kotlin/com/noxcrew/sheeplib/DialogContainer.kt +++ b/api/src/main/kotlin/com/noxcrew/sheeplib/DialogContainer.kt @@ -4,6 +4,7 @@ import com.noxcrew.sheeplib.dialog.Dialog import kotlinx.atomicfu.atomic import kotlinx.atomicfu.update import net.minecraft.ChatFormatting +import net.minecraft.client.DeltaTracker import net.minecraft.client.Minecraft import net.minecraft.client.gui.GuiGraphics import net.minecraft.client.gui.LayeredDraw @@ -34,7 +35,7 @@ public object DialogContainer : LayeredDraw.Layer, ContainerEventHandler, Narrat /** Whether the container is currently being dragged. */ private var isDragging: Boolean = false - override fun render(guiGraphics: GuiGraphics, f: Float) { + override fun render(guiGraphics: GuiGraphics, deltaTracker: DeltaTracker) { val cursorIsActive = minecraft?.screen is ChatScreen val childX = if (cursorIsActive) minecraft.mouseHandler.xpos() / minecraft.window.guiScale else -1 @@ -47,7 +48,7 @@ public object DialogContainer : LayeredDraw.Layer, ContainerEventHandler, Narrat guiGraphics.pose().pushPose() children.forEach { - (it as Renderable).render(guiGraphics, childX.toInt(), childY.toInt(), f) + (it as Renderable).render(guiGraphics, childX.toInt(), childY.toInt(), deltaTracker.gameTimeDeltaTicks) guiGraphics.pose().translate(0f, 0f, zOffsetPerDialog) } guiGraphics.pose().popPose() diff --git a/api/src/main/kotlin/com/noxcrew/sheeplib/theme/DefaultTheme.kt b/api/src/main/kotlin/com/noxcrew/sheeplib/theme/DefaultTheme.kt index 84fe2a8..1819ad2 100644 --- a/api/src/main/kotlin/com/noxcrew/sheeplib/theme/DefaultTheme.kt +++ b/api/src/main/kotlin/com/noxcrew/sheeplib/theme/DefaultTheme.kt @@ -58,12 +58,12 @@ public val DefaultTheme: ThemeImpl = ThemeImpl( ), ), IconsImpl( - dropdown = Icon(ResourceLocation("sheeplib", "textures/dropdown.png"), 4, 7), + dropdown = Icon(ResourceLocation.fromNamespaceAndPath("sheeplib", "textures/dropdown.png"), 4, 7), close = Icon( - ResourceLocation("sheeplib", "textures/close.png"), + ResourceLocation.fromNamespaceAndPath("sheeplib", "textures/close.png"), 5, 5, - ResourceLocation("sheeplib", "textures/close_hover.png"), + ResourceLocation.fromNamespaceAndPath("sheeplib", "textures/close_hover.png"), ) ), true, diff --git a/api/src/main/resources/fabric.mod.json b/api/src/main/resources/fabric.mod.json index 9038250..93e1486 100644 --- a/api/src/main/resources/fabric.mod.json +++ b/api/src/main/resources/fabric.mod.json @@ -24,7 +24,7 @@ "environment": "client", "accessWidener": "sheeplib.accessWidener", "depends": { - "fabric-language-kotlin": ">=1.9.4+kotlin.1.8.21" + "fabric-language-kotlin": ">=1.12.0+kotlin.2.0.10" }, "custom": { "modmenu": { diff --git a/build.gradle.kts b/build.gradle.kts index 3e972a1..889b163 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,6 +1,6 @@ import org.gradle.accessors.dm.LibrariesForLibs -val VERSION = "1.3.4" +val VERSION = "1.3.5" allprojects { group = "com.noxcrew.sheeplib" diff --git a/coroutines/build.gradle.kts b/coroutines/build.gradle.kts index b06556e..b65f570 100644 --- a/coroutines/build.gradle.kts +++ b/coroutines/build.gradle.kts @@ -1,5 +1,4 @@ -import org.jetbrains.kotlin.gradle.plugin.mpp.pm20.util.archivesName plugins { id("sheeplib.fabric") @@ -13,7 +12,7 @@ dependencies { } tasks { - java { - archivesName = "sheeplib-coroutines" + jar { + archiveBaseName = "sheeplib-coroutines" } } diff --git a/coroutines/src/main/resources/fabric.mod.json b/coroutines/src/main/resources/fabric.mod.json index c30cb9c..65aae21 100644 --- a/coroutines/src/main/resources/fabric.mod.json +++ b/coroutines/src/main/resources/fabric.mod.json @@ -22,7 +22,7 @@ ], "environment": "client", "depends": { - "fabric-language-kotlin": ">=1.9.4+kotlin.1.8.21", + "fabric-language-kotlin": ">=1.12.0+kotlin.2.0.10", "sheeplib": "^$version" }, "custom": { diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index f61b5fd..ab22afd 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,12 +1,12 @@ [versions] -minecraft = "1.20.6" -fabric-loader = "0.15.10" -fabric-api = "0.98.0+1.20.6" # for the test mod only -fabric-loom = "1.6-SNAPSHOT" +minecraft = "1.21.1" +fabric-loader = "0.15.11" +fabric-api = "0.102.1+1.21.1" # for the test mod only +fabric-loom = "1.7-SNAPSHOT" -kotlin = "1.9.23" -fabric-kotlin = "1.10.19+kotlin.1.9.23" -coroutines = "1.7.3" +kotlin = "2.0.10" +fabric-kotlin = "1.12.0+kotlin.2.0.10" +coroutines = "1.9.0-RC.2" jb-annotations = "24.0.1" diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index b82aa23..9355b41 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.7-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME