Skip to content

Commit

Permalink
Update to 1.20.6
Browse files Browse the repository at this point in the history
  • Loading branch information
TylerS1066 committed May 3, 2024
1 parent 44fe151 commit 4d87289
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 42 deletions.
28 changes: 14 additions & 14 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,21 +125,21 @@ jobs:
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.19.4 --remapped

# Build 1.20.5 NMS
# Build 1.20.6 NMS
v1_20_R4:
runs-on: ubuntu-latest
steps:
- name: Set up JDK 21 # 1.20.5 can only be built with Java 21
- 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.5 Maven package
- name: Cache 1.20.6 Maven package
id: cacheWild_r2
uses: actions/cache@v3
with:
path: |
~/.m2/repository/org/spigotmc/spigot/1.20.5-R0.1-SNAPSHOT/
~/.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_R4
Expand All @@ -154,18 +154,18 @@ jobs:

- 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.5 Spigot
- name: Check 1.20.6 Spigot
id: wild
run: test -f ~/.m2/repository/org/spigotmc/spigot/1.20.5-R0.1-SNAPSHOT/spigot-1.20.5-R0.1-SNAPSHOT.jar && echo "sucess=true" >> $GITHUB_OUTPUT || echo "sucess=false" >> $GITHUB_OUTPUT
- name: Check 1.20.5 Spigot (Mojang)
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.5-R0.1-SNAPSHOT/spigot-1.20.5-R0.1-SNAPSHOT-remapped-mojang.jar && echo "sucess=true" >> $GITHUB_OUTPUT || echo "sucess=false" >> $GITHUB_OUTPUT
- name: Check 1.20.5 Spigot (Obf)
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.5-R0.1-SNAPSHOT/spigot-1.20.5-R0.1-SNAPSHOT-remapped-obf.jar && echo "sucess=true" >> $GITHUB_OUTPUT || echo "sucess=false" >> $GITHUB_OUTPUT
- name: Build 1.20.5
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.5 --remapped
run: cd BuildTools && java -jar BuildTools.jar --rev 1.20.6 --remapped

# Build Movecraft
build:
Expand Down Expand Up @@ -210,11 +210,11 @@ jobs:
~/.m2/repository/org/spigotmc/minecraft-server/
key: ${{ runner.os }}-v1_19_R3
restore-keys: ${{ runner.os }}-v1_19_R3
- name: Cache 1.20.5 Maven package
- name: Cache 1.20.6 Maven package
uses: actions/cache@v3
with:
path: |
~/.m2/repository/org/spigotmc/spigot/1.20.5-R0.1-SNAPSHOT/
~/.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_R4
Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,21 +123,21 @@ jobs:
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.19.4 --remapped

# Build 1.20.5 NMS
# Build 1.20.6 NMS
v1_20_R4:
runs-on: ubuntu-latest
steps:
- name: Set up JDK 21 # 1.20.5 can only be built with Java 21
- 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.5 Maven package
- name: Cache 1.20.6 Maven package
id: cacheWild_r2
uses: actions/cache@v3
with:
path: |
~/.m2/repository/org/spigotmc/spigot/1.20.5-R0.1-SNAPSHOT/
~/.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_R4
Expand All @@ -152,18 +152,18 @@ jobs:

- 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.5 Spigot
- name: Check 1.20.6 Spigot
id: wild
run: test -f ~/.m2/repository/org/spigotmc/spigot/1.20.5-R0.1-SNAPSHOT/spigot-1.20.5-R0.1-SNAPSHOT.jar && echo "sucess=true" >> $GITHUB_OUTPUT || echo "sucess=false" >> $GITHUB_OUTPUT
- name: Check 1.20.5 Spigot (Mojang)
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.5-R0.1-SNAPSHOT/spigot-1.20.5-R0.1-SNAPSHOT-remapped-mojang.jar && echo "sucess=true" >> $GITHUB_OUTPUT || echo "sucess=false" >> $GITHUB_OUTPUT
- name: Check 1.20.5 Spigot (Obf)
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.5-R0.1-SNAPSHOT/spigot-1.20.5-R0.1-SNAPSHOT-remapped-obf.jar && echo "sucess=true" >> $GITHUB_OUTPUT || echo "sucess=false" >> $GITHUB_OUTPUT
- name: Build 1.20.5
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.5 --remapped
run: cd BuildTools && java -jar BuildTools.jar --rev 1.20.6 --remapped

# Build Movecraft
build:
Expand Down Expand Up @@ -208,11 +208,11 @@ jobs:
~/.m2/repository/org/spigotmc/minecraft-server/
key: ${{ runner.os }}-v1_19_R3
restore-keys: ${{ runner.os }}-v1_19_R3
- name: Cache 1.20.5 Maven package
- name: Cache 1.20.6 Maven package
uses: actions/cache@v3
with:
path: |
~/.m2/repository/org/spigotmc/spigot/1.20.5-R0.1-SNAPSHOT/
~/.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_R4
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ Please check the [Wiki](https://github.com/APDevTeam/Movecraft/wiki) and [FAQ](h
[Discord](http://bit.ly/JoinAP-Dev)

## Development Environment
Movecraft uses multiple versions of the Spigot server software for legacy support. As such, you need to run [BuildTools](https://www.spigotmc.org/wiki/buildtools/) for several versions before building the plugin. It doesn't matter where you do this, but inside the Movecraft directory is probably a bad place. We recommend building Spigot 1.16.5 with Java 13, 1.18.2 and 1.19.4 with Java 17, and 1.20.5 with Java 21.
Movecraft uses multiple versions of the Spigot server software for legacy support. As such, you need to run [BuildTools](https://www.spigotmc.org/wiki/buildtools/) for several versions before building the plugin. It doesn't matter where you do this, but inside the Movecraft directory is probably a bad place. We recommend building Spigot 1.16.5 with Java 13, 1.18.2 and 1.19.4 with Java 17, and 1.20.6 with Java 21.

```
java -jar BuildTools.jar --rev 1.16.5 --compile craftbukkit
java -jar BuildTools.jar --rev 1.18.2 --remapped
java -jar BuildTools.jar --rev 1.19.4 --remapped
java -jar BuildTools.jar --rev 1.20.5 --remapped
java -jar BuildTools.jar --rev 1.20.6 --remapped
```

Once you have compiled CraftBukkit, it should continue to exist in your local maven repository, and thus you should need to compile each version at most one time. Once complete, run the following to build Movecraft through `maven`.
Expand Down
12 changes: 6 additions & 6 deletions modules/v1_20_R4/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.20.5-R0.1-SNAPSHOT</version>
<version>1.20.6-R0.1-SNAPSHOT</version>
<classifier>remapped-mojang</classifier>
<scope>provided</scope>
<!-- Mappings: https://piston-data.mojang.com/v1/objects/14be97974a77b09eb8bca88ed9268445f0fde3e7/server.txt -->
<!-- Mappings: https://piston-data.mojang.com/v1/objects/9e96100f573a46ef44caab3e716d5eb974594bb7/server.txt -->
</dependency>
<dependency>
<groupId>net.countercraft</groupId>
Expand Down Expand Up @@ -68,9 +68,9 @@
</goals>
<id>remap-obf</id>
<configuration>
<srgIn>org.spigotmc:minecraft-server:1.20.5-R0.1-SNAPSHOT:txt:maps-mojang</srgIn>
<srgIn>org.spigotmc:minecraft-server:1.20.6-R0.1-SNAPSHOT:txt:maps-mojang</srgIn>
<reverse>true</reverse>
<remappedDependencies>org.spigotmc:spigot:1.20.5-R0.1-SNAPSHOT:jar:remapped-mojang</remappedDependencies>
<remappedDependencies>org.spigotmc:spigot:1.20.6-R0.1-SNAPSHOT:jar:remapped-mojang</remappedDependencies>
<remappedArtifactAttached>true</remappedArtifactAttached>
<remappedClassifierName>remapped-obf</remappedClassifierName>
</configuration>
Expand All @@ -83,8 +83,8 @@
<id>remap-spigot</id>
<configuration>
<inputFile>${project.build.directory}/${project.artifactId}-${project.version}-remapped-obf.jar</inputFile>
<srgIn>org.spigotmc:minecraft-server:1.20.5-R0.1-SNAPSHOT:csrg:maps-spigot</srgIn>
<remappedDependencies>org.spigotmc:spigot:1.20.5-R0.1-SNAPSHOT:jar:remapped-obf</remappedDependencies>
<srgIn>org.spigotmc:minecraft-server:1.20.6-R0.1-SNAPSHOT:csrg:maps-spigot</srgIn>
<remappedDependencies>org.spigotmc:spigot:1.20.6-R0.1-SNAPSHOT:jar:remapped-obf</remappedDependencies>
</configuration>
</execution>
</executions>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public class IWorldHandler extends WorldHandler {

public IWorldHandler() {
String mappings = ((CraftMagicNumbers) CraftMagicNumbers.INSTANCE).getMappingsVersion();
if (!mappings.equals("ad1a88fd7eaf2277f2507bf34d7b994c"))
if (!mappings.equals("ee13f98a43b9c5abffdcc0bb24154460"))
throw new IllegalStateException("Movecraft is not compatible with this version of Minecraft 1.20: " + mappings);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
/**
* Code derived from code taken with permission from MicleBrick
* https://www.spigotmc.org/threads/teleport-player-smoothly.317416/
* Used for 1.20.5
* Used for 1.20.6
*/
public class ISmoothTeleport extends SmoothTeleport {
private final Field teleportPosField;
Expand Down
8 changes: 4 additions & 4 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ else
java -jar BuildTools.jar --rev 1.19.4 --remapped
fi

# Build 1.20.5
if [ -f ~/.m2/repository/org/spigotmc/spigot/1.20.5-R0.1-SNAPSHOT/spigot-1.20.5-R0.1-SNAPSHOT.jar ]; then
echo "1.20.5 already exists, skipping build"
# Build 1.20.6
if [ -f ~/.m2/repository/org/spigotmc/spigot/1.20.6-R0.1-SNAPSHOT/spigot-1.20.6-R0.1-SNAPSHOT.jar ]; then
echo "1.20.6 already exists, skipping build"
else
java -jar BuildTools.jar --rev 1.20.5 --remapped
java -jar BuildTools.jar --rev 1.20.6 --remapped
fi

# Restore git information
Expand Down

0 comments on commit 4d87289

Please sign in to comment.