Skip to content

Commit

Permalink
update: Minecraft 1.21.1 (#26)
Browse files Browse the repository at this point in the history
* update: Minecraft 1.21.1

* Update version to 1.3.5
  • Loading branch information
lucyydotp committed Aug 24, 2024
1 parent dc0ba52 commit d27cb28
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 22 deletions.
5 changes: 2 additions & 3 deletions api/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -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 {
Expand All @@ -21,8 +20,8 @@ buildscript {
apply(plugin = "kotlinx-atomicfu")

tasks {
java {
archivesName = "sheeplib"
jar {
archiveBaseName = "sheeplib"
}
withType<DokkaTask>().configureEach {
pluginConfiguration<DokkaBase, DokkaBaseConfiguration> {
Expand Down
5 changes: 3 additions & 2 deletions api/src/main/kotlin/com/noxcrew/sheeplib/DialogContainer.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion api/src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
5 changes: 2 additions & 3 deletions coroutines/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

import org.jetbrains.kotlin.gradle.plugin.mpp.pm20.util.archivesName

plugins {
id("sheeplib.fabric")
Expand All @@ -13,7 +12,7 @@ dependencies {
}

tasks {
java {
archivesName = "sheeplib-coroutines"
jar {
archiveBaseName = "sheeplib-coroutines"
}
}
2 changes: 1 addition & 1 deletion coroutines/src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
14 changes: 7 additions & 7 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -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"

Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit d27cb28

Please sign in to comment.