Skip to content

Commit dfe9a8d

Browse files
committed
Add support for fabric 1.21.7+
1 parent 6e21e79 commit dfe9a8d

22 files changed

Lines changed: 727 additions & 34 deletions

File tree

build.gradle.kts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,8 @@ allprojects {
1717
repositories {
1818
// mavenLocal()
1919
mavenCentral()
20-
maven { url = uri("https://repo.azisaba.net/repository/maven-public/") }
2120
maven { url = uri("https://libraries.minecraft.net/") }
22-
maven { url = uri("https://repo.blueberrymc.net/repository/maven-public/") }
21+
maven { url = uri("https://repo.azisaba.net/repository/maven-public/") }
2322
}
2423

2524
tasks {

fabric-1.16/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
plugins {
2-
id("fabric-loom") version "1.8-SNAPSHOT"
2+
id("fabric-loom") version "1.11-SNAPSHOT"
33
}
44

55
java.toolchain.languageVersion.set(JavaLanguageVersion.of(8))

fabric-1.17/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
plugins {
2-
id("fabric-loom") version "1.8-SNAPSHOT"
2+
id("fabric-loom") version "1.11-SNAPSHOT"
33
}
44

55
java.toolchain.languageVersion.set(JavaLanguageVersion.of(16))

fabric-1.18/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
plugins {
2-
id("fabric-loom") version "1.8-SNAPSHOT"
2+
id("fabric-loom") version "1.11-SNAPSHOT"
33
}
44

55
java.toolchain.languageVersion.set(JavaLanguageVersion.of(17))

fabric-1.19/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
plugins {
2-
id("fabric-loom") version "1.8-SNAPSHOT"
2+
id("fabric-loom") version "1.11-SNAPSHOT"
33
}
44

55
java.toolchain.languageVersion.set(JavaLanguageVersion.of(17))

fabric-1.20/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
plugins {
2-
id("fabric-loom") version "1.8-SNAPSHOT"
2+
id("fabric-loom") version "1.11-SNAPSHOT"
33
}
44

55
java.toolchain.languageVersion.set(JavaLanguageVersion.of(17))

fabric-1.21.8/build.gradle.kts

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
plugins {
2+
id("fabric-loom") version "1.11-SNAPSHOT"
3+
}
4+
5+
java.toolchain.languageVersion.set(JavaLanguageVersion.of(21))
6+
7+
val minecraftVersion = "1.21.8"
8+
val yarnMappings = "1.21.8+build.1"
9+
val loaderVersion = "0.16.14"
10+
val fabricVersion = "0.130.0+1.21.8"
11+
val archivesBaseName = "InterChatMod-${project.name}"
12+
val adventureVersion by project.properties
13+
14+
repositories {
15+
// Add repositories to retrieve artifacts from in here.
16+
// You should only use this when depending on other mods because
17+
// Loom adds the essential maven repositories to download Minecraft and libraries from automatically.
18+
// See https://docs.gradle.org/current/userguide/declaring_repositories.html
19+
// for more information about repositories.
20+
maven { url = uri("https://maven.wispforest.io") }
21+
}
22+
23+
dependencies {
24+
// To change the versions see the gradle.properties file
25+
minecraft("com.mojang:minecraft:$minecraftVersion")
26+
mappings("net.fabricmc:yarn:$yarnMappings:v2")
27+
modImplementation("net.fabricmc:fabric-loader:$loaderVersion")
28+
29+
// Fabric API. This is technically optional, but you probably want it anyway.
30+
modImplementation("net.fabricmc.fabric-api:fabric-api:$fabricVersion")
31+
32+
modImplementation("io.wispforest:owo-lib:0.12.21+1.21.6")
33+
annotationProcessor("io.wispforest:owo-lib:0.12.21+1.21.6")
34+
35+
// Uncomment the following line to enable the deprecated Fabric API modules.
36+
// These are included in the Fabric API production distribution and allow you to update your mod to the latest modules at a later more convenient time.
37+
38+
// modImplementation "net.fabricmc.fabric-api:fabric-api-deprecated:${project.fabric_version}"
39+
implementation(project(":common"))
40+
include(project(":common"))
41+
include("net.kyori:adventure-api:$adventureVersion")
42+
include("net.kyori:adventure-key:$adventureVersion")
43+
include("net.kyori:examination-api:1.3.0")
44+
include("net.kyori:examination-string:1.3.0")
45+
include("net.kyori:adventure-text-serializer-legacy:$adventureVersion")
46+
include("net.kyori:adventure-text-serializer-json:$adventureVersion")
47+
include("net.kyori:adventure-text-serializer-gson:$adventureVersion")
48+
include("org.java-websocket:Java-WebSocket:1.5.4")
49+
}
50+
51+
tasks {
52+
processResources {
53+
inputs.property("version", project.version)
54+
55+
filesMatching("fabric.mod.json") {
56+
expand(mapOf("version" to project.version))
57+
}
58+
}
59+
60+
compileJava {
61+
options.encoding = "UTF-8"
62+
}
63+
64+
remapJar {
65+
archiveFileName.set("$archivesBaseName-${project.version}.jar")
66+
from("LICENSE") {
67+
rename { "${it}_${archivesBaseName}"}
68+
}
69+
}
70+
71+
remapSourcesJar {
72+
archiveFileName.set("$archivesBaseName-${project.version}-sources.jar")
73+
from("LICENSE") {
74+
rename { "${it}_${archivesBaseName}"}
75+
}
76+
}
77+
78+
shadowJar {
79+
archiveBaseName.set("$archivesBaseName-DO-NOT-USE")
80+
}
81+
}
82+
83+
java {
84+
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
85+
// if it is present.
86+
// If you remove this line, sources will not be generated.
87+
withSourcesJar()
88+
}

0 commit comments

Comments
 (0)