Skip to content

Commit

Permalink
Add 1.21 worldhandler as copy of 1.20.6
Browse files Browse the repository at this point in the history
  • Loading branch information
TylerS1066 committed Jun 20, 2024
1 parent 077b7c9 commit 3541d14
Show file tree
Hide file tree
Showing 8 changed files with 505 additions and 103 deletions.
103 changes: 0 additions & 103 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,94 +6,9 @@ on:
types: [created, prereleased]

jobs:
# Build 1.18.2 NMS
v1_18:
runs-on: ubuntu-latest
steps:
- name: Set up JDK 17 # 1.18.2 can only be built with Java 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Cache 1.18.2 Maven package
id: cacheCaves
uses: actions/cache@v3
with:
path: |
~/.m2/repository/org/spigotmc/spigot/1.18.2-R0.1-SNAPSHOT/
~/.m2/repository/org/spigotmc/spigot-parent/
~/.m2/repository/org/spigotmc/minecraft-server/
key: ${{ runner.os }}-v1_18
restore-keys: ${{ runner.os }}-v1_18
- name: Cache Maven packages
id: cacheMain
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-v1_18
restore-keys: ${{ runner.os }}-m2-v1_18

- name: Setup BuildTools
run: mkdir BuildTools && wget -O BuildTools/BuildTools.jar https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar
- name: Check 1.18.2 Spigot
id: caves
run: test -f ~/.m2/repository/org/spigotmc/spigot/1.18.2-R0.1-SNAPSHOT/spigot-1.18.2-R0.1-SNAPSHOT.jar && echo "sucess=true" >> $GITHUB_OUTPUT || echo "sucess=false" >> $GITHUB_OUTPUT
- name: Check 1.18.2 Spigot (Mojang)
id: cavesMojang
run: test -f ~/.m2/repository/org/spigotmc/spigot/1.18.2-R0.1-SNAPSHOT/spigot-1.18.2-R0.1-SNAPSHOT-remapped-mojang.jar && echo "sucess=true" >> $GITHUB_OUTPUT || echo "sucess=false" >> $GITHUB_OUTPUT
- name: Check 1.18.2 Spigot (Obf)
id: cavesObf
run: test -f ~/.m2/repository/org/spigotmc/spigot/1.18.2-R0.1-SNAPSHOT/spigot-1.18.2-R0.1-SNAPSHOT-remapped-obf.jar && echo "sucess=true" >> $GITHUB_OUTPUT || echo "sucess=false" >> $GITHUB_OUTPUT
- name: Build 1.18.2
if: steps.caves.outputs.sucess != 'true' || steps.cavesMojang.outputs.sucess != 'true' || steps.cavesObf.outputs.sucess != 'true'
run: cd BuildTools && java -jar BuildTools.jar --rev 1.18.2 --remapped

# Build 1.20.6 NMS
v1_20:
runs-on: ubuntu-latest
steps:
- name: Set up JDK 21 # 1.20.6 can only be built with Java 21
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '21'
- name: Cache 1.20.6 Maven package
id: cacheWild_r2
uses: actions/cache@v3
with:
path: |
~/.m2/repository/org/spigotmc/spigot/1.20.6-R0.1-SNAPSHOT/
~/.m2/repository/org/spigotmc/spigot-parent/
~/.m2/repository/org/spigotmc/minecraft-server/
key: ${{ runner.os }}-v1_20
restore-keys: ${{ runner.os }}-v1_20
- name: Cache Maven packages
id: cacheMain
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-v1_20
restore-keys: ${{ runner.os }}-m2-v1_20

- name: Setup BuildTools
run: mkdir BuildTools && wget -O BuildTools/BuildTools.jar https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar
- name: Check 1.20.6 Spigot
id: wild
run: test -f ~/.m2/repository/org/spigotmc/spigot/1.20.6-R0.1-SNAPSHOT/spigot-1.20.6-R0.1-SNAPSHOT.jar && echo "sucess=true" >> $GITHUB_OUTPUT || echo "sucess=false" >> $GITHUB_OUTPUT
- name: Check 1.20.6 Spigot (Mojang)
id: wildMojang
run: test -f ~/.m2/repository/org/spigotmc/spigot/1.20.6-R0.1-SNAPSHOT/spigot-1.20.6-R0.1-SNAPSHOT-remapped-mojang.jar && echo "sucess=true" >> $GITHUB_OUTPUT || echo "sucess=false" >> $GITHUB_OUTPUT
- name: Check 1.20.6 Spigot (Obf)
id: wildObf
run: test -f ~/.m2/repository/org/spigotmc/spigot/1.20.6-R0.1-SNAPSHOT/spigot-1.20.6-R0.1-SNAPSHOT-remapped-obf.jar && echo "sucess=true" >> $GITHUB_OUTPUT || echo "sucess=false" >> $GITHUB_OUTPUT
- name: Build 1.20.6
if: steps.wild.outputs.sucess != 'true' || steps.wildMojang.outputs.sucess != 'true' || steps.wildObf.outputs.sucess != 'true'
run: cd BuildTools && java -jar BuildTools.jar --rev 1.20.6 --remapped

# Build Movecraft
build:
runs-on: ubuntu-latest
needs: [v1_18, v1_20]

steps:
- name: Checkout Movecraft
Expand All @@ -109,24 +24,6 @@ jobs:
path: ~/.m2
key: ${{ runner.os }}-m2
restore-keys: ${{ runner.os }}-m2
- name: Cache 1.18.2 Maven package
uses: actions/cache@v3
with:
path: |
~/.m2/repository/org/spigotmc/spigot/1.18.2-R0.1-SNAPSHOT/
~/.m2/repository/org/spigotmc/spigot-parent/
~/.m2/repository/org/spigotmc/minecraft-server/
key: ${{ runner.os }}-v1_18
restore-keys: ${{ runner.os }}-v1_18
- name: Cache 1.20.6 Maven package
uses: actions/cache@v3
with:
path: |
~/.m2/repository/org/spigotmc/spigot/1.20.6-R0.1-SNAPSHOT/
~/.m2/repository/org/spigotmc/spigot-parent/
~/.m2/repository/org/spigotmc/minecraft-server/
key: ${{ runner.os }}-v1_20
restore-keys: ${{ runner.os }}-v1_20

- name: Build with Maven
run: mvn -T 1C -B package --file pom.xml
Expand Down
2 changes: 2 additions & 0 deletions Movecraft/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ java.toolchain.languageVersion = JavaLanguageVersion.of(17)
dependencies {
runtimeOnly(project(":movecraft-v1_18", "reobf"))
runtimeOnly(project(":movecraft-v1_20", "reobf"))
runtimeOnly(project(":movecraft-v1_21", "reobf"))
implementation(project(":movecraft-api"))
compileOnly("org.yaml:snakeyaml:2.0")
}
Expand All @@ -21,6 +22,7 @@ tasks.shadowJar {
include(project(":movecraft-api"))
include(project(":movecraft-v1_18"))
include(project(":movecraft-v1_20"))
include(project(":movecraft-v1_21"))
}
}

Expand Down
2 changes: 2 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@
rootProject.name = "movecraft-parent"
include(":movecraft-v1_18")
include(":movecraft-v1_20")
include(":movecraft-v1_21")
include(":movecraft-api")
include(":movecraft-datapack")
include(":movecraft")
project(":movecraft-v1_18").projectDir = file("v1_18")
project(":movecraft-v1_20").projectDir = file("v1_20")
project(":movecraft-v1_21").projectDir = file("v1_21")
project(":movecraft-api").projectDir = file("api")
project(":movecraft-datapack").projectDir = file("datapack")
project(":movecraft").projectDir = file("Movecraft")
14 changes: 14 additions & 0 deletions v1_21/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
plugins {
id("buildlogic.java-conventions")
id("io.papermc.paperweight.userdev")
}

java.toolchain.languageVersion = JavaLanguageVersion.of(21)

dependencies {
api(project(":movecraft-api"))
paperweight.paperDevBundle("1.21-R0.1-SNAPSHOT")
}

description = "Movecraft-v1_21"
paperweight.reobfArtifactConfiguration = io.papermc.paperweight.userdev.ReobfArtifactConfiguration.MOJANG_PRODUCTION
Loading

0 comments on commit 3541d14

Please sign in to comment.