Skip to content

Commit 579d6c8

Browse files
authored
Merge pull request #82 from QUT-MC-Club/2.2.0
Add Fabric 1.21.4 support
2 parents bf3242b + b67a137 commit 579d6c8

31 files changed

+1868
-1
lines changed

build.gradle.kts

+11
Original file line numberDiff line numberDiff line change
@@ -91,4 +91,15 @@ fabric1211Project.configure<JavaPluginExtension> {
9191
}
9292
}
9393
}
94+
}
95+
96+
val fabric1214Project = project(":fabric-1.21.4")
97+
fabric1214Project.configure<JavaPluginExtension> {
98+
sourceSets {
99+
getByName("main") {
100+
java {
101+
srcDir("src/main/kotlin")
102+
}
103+
}
104+
}
94105
}

build.sh

+1
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@ mv bungeecord/build/libs/tebex*.jar build/libs/
1212
mv fabric-1.20.1/build/libs/tebex*.jar build/libs/
1313
mv fabric-1.20.4/build/libs/tebex*.jar build/libs/
1414
mv fabric-1.21.1/build/libs/tebex*.jar build/libs/
15+
mv fabric-1.21.4/build/libs/tebex*.jar build/libs/
1516
mv velocity/build/libs/tebex*.jar build/libs/
1617
mv sdk/build/libs/tebex*.jar build/libs/

fabric-1.21.4/.gitignore

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
.gradle
2+
build/
3+
!gradle/wrapper/gradle-wrapper.jar
4+
!**/src/main/**/build/
5+
!**/src/test/**/build/
6+
7+
### IntelliJ IDEA ###
8+
.idea/modules.xml
9+
.idea/jarRepositories.xml
10+
.idea/compiler.xml
11+
.idea/libraries/
12+
*.iws
13+
*.iml
14+
*.ipr
15+
out/
16+
!**/src/main/**/out/
17+
!**/src/test/**/out/
18+
19+
### Eclipse ###
20+
.apt_generated
21+
.classpath
22+
.factorypath
23+
.project
24+
.settings
25+
.springBeans
26+
.sts4-cache
27+
bin/
28+
!**/src/main/**/bin/
29+
!**/src/test/**/bin/
30+
31+
### NetBeans ###
32+
/nbproject/private/
33+
/nbbuild/
34+
/dist/
35+
/nbdist/
36+
/.nb-gradle/
37+
38+
### VS Code ###
39+
.vscode/
40+
41+
### Mac OS ###
42+
.DS_Store

fabric-1.21.4/build.gradle.kts

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
2+
3+
group = rootProject.group
4+
version = rootProject.version
5+
6+
plugins {
7+
java
8+
id("com.gradleup.shadow")
9+
id("fabric-loom") version "1.7-SNAPSHOT" apply(true)
10+
}
11+
12+
var minecraftVersion = properties["minecraft_version"] as String
13+
var yarnMappings = properties["yarn_mappings"] as String
14+
var loaderVersion = properties["loader_version"] as String
15+
var fabricVersion = properties["fabric_version"] as String
16+
17+
java {
18+
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
19+
sourceCompatibility = JavaVersion.VERSION_21
20+
targetCompatibility = JavaVersion.VERSION_21
21+
}
22+
23+
dependencies {
24+
shadow(project(":sdk"))
25+
26+
shadow("com.github.cryptomorin:XSeries:9.3.1") {
27+
isTransitive = false
28+
}
29+
30+
minecraft("com.mojang:minecraft:${minecraftVersion}")
31+
mappings("net.fabricmc:yarn:${yarnMappings}:v2")
32+
33+
modImplementation("net.fabricmc:fabric-loader:${loaderVersion}")
34+
modImplementation("net.fabricmc.fabric-api:fabric-api:${fabricVersion}")
35+
36+
compileOnly("dev.dejvokep:boosted-yaml:1.3")
37+
38+
modImplementation("me.lucko:fabric-permissions-api:0.3.1")
39+
include("me.lucko:fabric-permissions-api:0.3.1")
40+
}
41+
42+
43+
tasks.named("shadowJar", ShadowJar::class.java) {
44+
configurations = listOf(project.configurations.shadow.get())
45+
46+
relocate("okhttp3", "io.tebex.plugin.libs.okhttp3")
47+
relocate("okio", "io.tebex.plugin.libs.okio")
48+
relocate("dev.dejvokep.boostedyaml", "io.tebex.plugin.libs.boostedyaml")
49+
relocate("org.jetbrains.annotations", "io.tebex.plugin.libs.jetbrains")
50+
relocate("kotlin", "io.tebex.plugin.libs.kotlin")
51+
relocate("com.google.gson", "io.tebex.plugin.libs.gson")
52+
minimize()
53+
54+
archiveFileName.set("${project.name}-${project.version}-shadow.jar")
55+
56+
finalizedBy("remapJar")
57+
}
58+
59+
tasks.remapJar {
60+
dependsOn("shadowJar")
61+
val shadowJar = tasks.shadowJar.get()
62+
63+
inputFile.set(shadowJar.archiveFile)
64+
archiveFileName.set("tebex-${project.name}-${project.version}.jar")
65+
archiveClassifier.set(shadowJar.archiveClassifier)
66+
delete(shadowJar.archiveFile)
67+
}

fabric-1.21.4/gradle.properties

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Fabric Properties
2+
# check these on https://fabricmc.net/develop
3+
minecraft_version=1.21.4
4+
yarn_mappings=1.21.4+build.8
5+
loader_version=0.16.10
6+
7+
#Fabric api
8+
fabric_version=0.118.5+1.21.4
9+
10+
# Mod Properties
11+
mod_version=2.1.0-hotfix.1
12+
maven_group=io.tebex.plugin
13+
archives_base_name=tebexplugin
14+

0 commit comments

Comments
 (0)