Skip to content
This repository was archived by the owner on May 14, 2024. It is now read-only.

Commit ce6e3ac

Browse files
author
Shynixn
committed
#114 Implemented 1.20.2 support.
1 parent 16fcccf commit ce6e3ac

File tree

12 files changed

+975
-5
lines changed

12 files changed

+975
-5
lines changed

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ RUN java -jar BuildTools.jar --rev 1.18.2 --remapped
2929
RUN java -jar BuildTools.jar --rev 1.19 --remapped
3030
RUN java -jar BuildTools.jar --rev 1.19.3 --remapped
3131
RUN java -jar BuildTools.jar --rev 1.19.4 --remapped
32-
RUN java -jar BuildTools.jar --rev 1.20 --remapped
32+
RUN java -jar BuildTools.jar --rev 1.20.1 --remapped
33+
RUN java -jar BuildTools.jar --rev 1.20.2 --remapped
3334

3435
# 3. Build plugin for 1.8 - 1.17 with jdk17
3536
FROM amazoncorretto:17 AS plugin-jdk17

settings.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,4 @@ include("structureblocklib-bukkit-core:bukkit-nms-119R1")
2020
include("structureblocklib-bukkit-core:bukkit-nms-119R2")
2121
include("structureblocklib-bukkit-core:bukkit-nms-119R3")
2222
include("structureblocklib-bukkit-core:bukkit-nms-120R1")
23+
include("structureblocklib-bukkit-core:bukkit-nms-120R2")

structureblocklib-api/src/main/java/com/github/shynixn/structureblocklib/api/enumeration/Version.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,14 @@ public enum Version {
8787
VERSION_1_19_R3("v1_19_R3", "1.19.4", 1.194),
8888

8989
/**
90-
* Version 1.20 - 1.20.
90+
* Version 1.20 - 1.20.1.
9191
*/
92-
VERSION_1_20_R1("v1_20_R1", "1.20.0", 1.20);
92+
VERSION_1_20_R1("v1_20_R1", "1.20.0", 1.20),
93+
94+
/**
95+
* Version 1.20.2 - 1.20.2.
96+
*/
97+
VERSION_1_20_R2("v1_20_R2", "1.20.2", 1.22);
9398

9499
private final String bukkitId;
95100
private final String id;

structureblocklib-bukkit-core/build.gradle.kts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,14 @@ tasks.register("pluginJar", Exec::class.java, ) {
140140
targetJarFile,
141141
targetJarFile
142142
)
143+
obsMapping = "$obsMapping && " + createCommand(
144+
"1.20.2-R0.1-SNAPSHOT",
145+
"com/github/shynixn/structureblocklib/bukkit/v1_20_R2",
146+
file,
147+
shadowJar,
148+
targetJarFile,
149+
targetJarFile
150+
)
143151

144152
if (System.getProperty("os.name").toLowerCase(Locale.ROOT).contains("windows")) {
145153
commandLine = listOf("cmd", "/c", obsMapping.replace("\$HOME", "%userprofile%"))
@@ -182,6 +190,7 @@ dependencies {
182190
implementation(project(":structureblocklib-bukkit-core:bukkit-nms-119R2"))
183191
implementation(project(":structureblocklib-bukkit-core:bukkit-nms-119R3"))
184192
implementation(project(":structureblocklib-bukkit-core:bukkit-nms-120R1"))
193+
implementation(project(":structureblocklib-bukkit-core:bukkit-nms-120R2"))
185194

186195
compileOnly("org.spigotmc:spigot:1.14.4-R0.1-SNAPSHOT")
187196
testCompile("org.spigotmc:spigot:1.12-R0.1-SNAPSHOT")

structureblocklib-bukkit-core/bukkit-nms-120R1/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ dependencies {
1919
implementation(project(":structureblocklib-api"))
2020
implementation(project(":structureblocklib-core"))
2121
implementation(project(":structureblocklib-bukkit-api"))
22-
compileOnly("org.spigotmc:spigot:1.20-R0.1-SNAPSHOT:remapped-mojang")
23-
testCompile("org.spigotmc:spigot:1.20-R0.1-SNAPSHOT:remapped-mojang")
22+
compileOnly("org.spigotmc:spigot:1.20.1-R0.1-SNAPSHOT:remapped-mojang")
23+
testCompile("org.spigotmc:spigot:1.20.1-R0.1-SNAPSHOT:remapped-mojang")
2424
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
repositories {
2+
maven(url = "https://libraries.minecraft.net")
3+
}
4+
5+
dependencies {
6+
// Dependencies of spigot mojang want to restrict usage to only Java 17. However, we do not care
7+
// what they want because the general compatibility of this plugin is Java 8. The plugin
8+
// guarantees that everything works during runtime. This error is a false positive.
9+
components {
10+
all {
11+
allVariants {
12+
attributes {
13+
attribute(TargetJvmVersion.TARGET_JVM_VERSION_ATTRIBUTE, 8)
14+
}
15+
}
16+
}
17+
}
18+
19+
implementation(project(":structureblocklib-api"))
20+
implementation(project(":structureblocklib-core"))
21+
implementation(project(":structureblocklib-bukkit-api"))
22+
compileOnly("org.spigotmc:spigot:1.20.2-R0.1-SNAPSHOT:remapped-mojang")
23+
testCompile("org.spigotmc:spigot:1.20.2-R0.1-SNAPSHOT:remapped-mojang")
24+
}

0 commit comments

Comments
 (0)