Skip to content

Commit d0dea3a

Browse files
committed
Update Kotlin dependencies and modify main menu quit behavior for Minecraft 1.21.5
1 parent 5b11436 commit d0dea3a

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ dependencies {
3434

3535
implementation include ("gg.essential:elementa:${project.elementa_version}")
3636
modImplementation include ("gg.essential:universalcraft-1.21.5-fabric:${project.universalcraft_version}")
37-
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
37+
modImplementation("net.fabricmc:fabric-language-kotlin:1.13.3+kotlin.2.1.21")
3838
}
3939

4040
processResources {

src/main/java/com/kd_gaming1/screen/SEMainMenu.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ class SEMainMenu : WindowScreen(ElementaVersion.V7) {
102102

103103
CreateMenuButton("Quit Game") {
104104
// Updated for Minecraft 1.21.5 - use close instead of shutdown
105-
UMinecraft.getMinecraft().close()
105+
UMinecraft.getMinecraft().scheduleStop()
106106
} childOf buttonContainer4
107107

108108
// Container for the social/websites buttons

src/main/resources/fabric.mod.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@
1616
"environment": "*",
1717
"entrypoints": {
1818
"main": [
19-
"com.kd_gaming1.PackCore"
19+
"com.kd_gaming1.PackCore",
20+
{
21+
"adapter": "kotlin",
22+
"value": "com.kd_gaming1.PackCore"
23+
}
2024
]
2125
},
2226
"mixins": [
@@ -36,7 +40,8 @@
3640
"fabricloader": ">=0.16.14",
3741
"minecraft": "~1.21.5",
3842
"java": ">=21",
39-
"fabric-api": "*"
43+
"fabric-api": "*",
44+
"fabric-language-kotlin": ">=1.13.3+kotlin.2.1.21"
4045
},
4146
"suggests": {
4247
"another-mod": "*"

0 commit comments

Comments
 (0)