Skip to content

Commit

Permalink
Update from 1.20.3 to 1.20.4
Browse files Browse the repository at this point in the history
  • Loading branch information
TylerS1066 committed Dec 10, 2023
1 parent 6ec8875 commit 896bcc1
Show file tree
Hide file tree
Showing 11 changed files with 76 additions and 76 deletions.
44 changes: 22 additions & 22 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,52 +125,52 @@ 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.3 NMS
v1_20_R3:
# Build 1.20.4 NMS
v1_20_R4:
runs-on: ubuntu-latest
steps:
- name: Set up JDK 17 # 1.20.3 can only be built with Java 17
- name: Set up JDK 17 # 1.20.4 can only be built with Java 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Cache 1.20.3 Maven package
- name: Cache 1.20.4 Maven package
id: cacheWild_r2
uses: actions/cache@v3
with:
path: |
~/.m2/repository/org/spigotmc/spigot/1.20.3-R0.1-SNAPSHOT/
~/.m2/repository/org/spigotmc/spigot/1.20.4-R0.1-SNAPSHOT/
~/.m2/repository/org/spigotmc/spigot-parent/
~/.m2/repository/org/spigotmc/minecraft-server/
key: ${{ runner.os }}-v1_20_R3
restore-keys: ${{ runner.os }}-v1_20_R3
key: ${{ runner.os }}-v1_20_R4
restore-keys: ${{ runner.os }}-v1_20_R4
- name: Cache Maven packages
id: cacheMain
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-v1_20_R3
restore-keys: ${{ runner.os }}-m2-v1_20_R3
key: ${{ runner.os }}-m2-v1_20_R4
restore-keys: ${{ runner.os }}-m2-v1_20_R4

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

# Build Movecraft
build:
runs-on: ubuntu-latest
needs: [v1_16_R3, v1_18_R2, v1_19_R3, v1_20_R3]
needs: [v1_16_R3, v1_18_R2, v1_19_R3, v1_20_R4]

steps:
- name: Checkout Movecraft
Expand Down Expand Up @@ -210,15 +210,15 @@ jobs:
~/.m2/repository/org/spigotmc/minecraft-server/
key: ${{ runner.os }}-v1_19_R3
restore-keys: ${{ runner.os }}-v1_19_R3
- name: Cache 1.20.3 Maven package
- name: Cache 1.20.4 Maven package
uses: actions/cache@v3
with:
path: |
~/.m2/repository/org/spigotmc/spigot/1.20.3-R0.1-SNAPSHOT/
~/.m2/repository/org/spigotmc/spigot/1.20.4-R0.1-SNAPSHOT/
~/.m2/repository/org/spigotmc/spigot-parent/
~/.m2/repository/org/spigotmc/minecraft-server/
key: ${{ runner.os }}-v1_20_R3
restore-keys: ${{ runner.os }}-v1_20_R3
key: ${{ runner.os }}-v1_20_R4
restore-keys: ${{ runner.os }}-v1_20_R4

- name: Build with Maven
run: mvn -T 1C -B package --file pom.xml
Expand Down
44 changes: 22 additions & 22 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,52 +123,52 @@ 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.3 NMS
v1_20_R3:
# Build 1.20.4 NMS
v1_20_R4:
runs-on: ubuntu-latest
steps:
- name: Set up JDK 17 # 1.20.3 can only be built with Java 17
- name: Set up JDK 17 # 1.20.4 can only be built with Java 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Cache 1.20.3 Maven package
- name: Cache 1.20.4 Maven package
id: cacheWild_r2
uses: actions/cache@v3
with:
path: |
~/.m2/repository/org/spigotmc/spigot/1.20.3-R0.1-SNAPSHOT/
~/.m2/repository/org/spigotmc/spigot/1.20.4-R0.1-SNAPSHOT/
~/.m2/repository/org/spigotmc/spigot-parent/
~/.m2/repository/org/spigotmc/minecraft-server/
key: ${{ runner.os }}-v1_20_R3
restore-keys: ${{ runner.os }}-v1_20_R3
key: ${{ runner.os }}-v1_20_R4
restore-keys: ${{ runner.os }}-v1_20_R4
- name: Cache Maven packages
id: cacheMain
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-v1_20_R3
restore-keys: ${{ runner.os }}-m2-v1_20_R3
key: ${{ runner.os }}-m2-v1_20_R4
restore-keys: ${{ runner.os }}-m2-v1_20_R4

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

# Build Movecraft
build:
runs-on: ubuntu-latest
needs: [v1_16_R3, v1_18_R2, v1_19_R3, v1_20_R3]
needs: [v1_16_R3, v1_18_R2, v1_19_R3, v1_20_R4]

steps:
- name: Checkout Movecraft
Expand Down Expand Up @@ -208,15 +208,15 @@ jobs:
~/.m2/repository/org/spigotmc/minecraft-server/
key: ${{ runner.os }}-v1_19_R3
restore-keys: ${{ runner.os }}-v1_19_R3
- name: Cache 1.20.3 Maven package
- name: Cache 1.20.4 Maven package
uses: actions/cache@v3
with:
path: |
~/.m2/repository/org/spigotmc/spigot/1.20.3-R0.1-SNAPSHOT/
~/.m2/repository/org/spigotmc/spigot/1.20.4-R0.1-SNAPSHOT/
~/.m2/repository/org/spigotmc/spigot-parent/
~/.m2/repository/org/spigotmc/minecraft-server/
key: ${{ runner.os }}-v1_20_R3
restore-keys: ${{ runner.os }}-v1_20_R3
key: ${{ runner.os }}-v1_20_R4
restore-keys: ${{ runner.os }}-v1_20_R4

- name: Build with Maven
run: mvn -T 1C -B package --file pom.xml
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 and Java 17 to build 1.18.2, 1.19.4 & 1.20.3. Alternatively, you can use GitHub codespaces and run the `setup.sh` script to build all the needed versions automatically.
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 and Java 17 to build 1.18.2, 1.19.4 & 1.20.4. Alternatively, you can use GitHub codespaces and run the `setup.sh` script to build all the needed versions automatically.

```
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.3 --remapped
java -jar BuildTools.jar --rev 1.20.4 --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
4 changes: 2 additions & 2 deletions modules/Movecraft/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
</dependency>
<dependency>
<groupId>net.countercraft</groupId>
<artifactId>movecraft-v1_20_R3</artifactId>
<artifactId>movecraft-v1_20_R4</artifactId>
<version>${revision}</version>
<type>jar</type>
</dependency>
Expand Down Expand Up @@ -190,7 +190,7 @@
</includes>
</filter>
<filter>
<artifact>net.countercraft:movecraft-v1_20_R3</artifact>
<artifact>net.countercraft:movecraft-v1_20_R4</artifact>
<includes>
<include>**</include>
</includes>
Expand Down
24 changes: 12 additions & 12 deletions modules/v1_20_R3/pom.xml → modules/v1_20_R4/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>movecraft-v1_20_R3</artifactId>
<name>Movecraft-v1_20_R3</name>
<artifactId>movecraft-v1_20_R4</artifactId>
<name>Movecraft-v1_20_R4</name>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.20.3-R0.1-SNAPSHOT</version>
<version>1.20.4-R0.1-SNAPSHOT</version>
<classifier>remapped-mojang</classifier>
<scope>provided</scope>
<!-- Mappings: https://piston-data.mojang.com/v1/objects/dced504a9b5df367ddd3477adac084cea8024ba4/server.txt -->
<!-- Mappings: https://piston-data.mojang.com/v1/objects/c1cafe916dd8b58ed1fe0564fc8f786885224e62/server.txt -->
</dependency>
<dependency>
<groupId>net.countercraft</groupId>
Expand All @@ -38,8 +38,8 @@
<version>3.8.1</version>
<configuration>
<includes>
<include>net/countercraft/movecraft/compat/v1_20_R3/**</include>
<include>net/countercraft/movecraft/support/v1_20_R3/**</include>
<include>net/countercraft/movecraft/compat/v1_20_R4/**</include>
<include>net/countercraft/movecraft/support/v1_20_R4/**</include>
</includes>
<source>13</source>
<target>13</target>
Expand All @@ -51,8 +51,8 @@
<version>2.4</version>
<configuration>
<includes>
<include>net/countercraft/movecraft/compat/v1_20_R3/**</include>
<include>net/countercraft/movecraft/support/v1_20_R3/**</include>
<include>net/countercraft/movecraft/compat/v1_20_R4/**</include>
<include>net/countercraft/movecraft/support/v1_20_R4/**</include>
</includes>
</configuration>
</plugin>
Expand All @@ -68,9 +68,9 @@
</goals>
<id>remap-obf</id>
<configuration>
<srgIn>org.spigotmc:minecraft-server:1.20.3-R0.1-SNAPSHOT:txt:maps-mojang</srgIn>
<srgIn>org.spigotmc:minecraft-server:1.20.4-R0.1-SNAPSHOT:txt:maps-mojang</srgIn>
<reverse>true</reverse>
<remappedDependencies>org.spigotmc:spigot:1.20.3-R0.1-SNAPSHOT:jar:remapped-mojang</remappedDependencies>
<remappedDependencies>org.spigotmc:spigot:1.20.4-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.3-R0.1-SNAPSHOT:csrg:maps-spigot</srgIn>
<remappedDependencies>org.spigotmc:spigot:1.20.3-R0.1-SNAPSHOT:jar:remapped-obf</remappedDependencies>
<srgIn>org.spigotmc:minecraft-server:1.20.4-R0.1-SNAPSHOT:csrg:maps-spigot</srgIn>
<remappedDependencies>org.spigotmc:spigot:1.20.4-R0.1-SNAPSHOT:jar:remapped-obf</remappedDependencies>
</configuration>
</execution>
</executions>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.countercraft.movecraft.compat.v1_20_R3;
package net.countercraft.movecraft.compat.v1_20_R4;

import net.countercraft.movecraft.MovecraftLocation;
import net.countercraft.movecraft.MovecraftRotation;
Expand All @@ -24,10 +24,10 @@
import org.bukkit.Material;
import org.bukkit.block.Sign;
import org.bukkit.block.data.BlockData;
import org.bukkit.craftbukkit.v1_20_R3.CraftWorld;
import org.bukkit.craftbukkit.v1_20_R3.block.data.CraftBlockData;
import org.bukkit.craftbukkit.v1_20_R3.inventory.CraftInventoryView;
import org.bukkit.craftbukkit.v1_20_R3.util.CraftMagicNumbers;
import org.bukkit.craftbukkit.v1_20_R4.CraftWorld;
import org.bukkit.craftbukkit.v1_20_R4.block.data.CraftBlockData;
import org.bukkit.craftbukkit.v1_20_R4.inventory.CraftInventoryView;
import org.bukkit.craftbukkit.v1_20_R4.util.CraftMagicNumbers;
import org.bukkit.inventory.InventoryView;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.countercraft.movecraft.compat.v1_20_R3;
package net.countercraft.movecraft.compat.v1_20_R4;

import net.minecraft.core.BlockPos;
import net.minecraft.server.level.ServerLevel;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.countercraft.movecraft.support.v1_20_R3;
package net.countercraft.movecraft.support.v1_20_R4;

import com.google.common.cache.CacheBuilder;
import com.google.common.cache.CacheLoader;
Expand All @@ -13,8 +13,8 @@
import org.bukkit.Material;
import org.bukkit.block.BlockState;
import org.bukkit.block.data.BlockData;
import org.bukkit.craftbukkit.v1_20_R3.CraftChunk;
import org.bukkit.craftbukkit.v1_20_R3.block.data.CraftBlockData;
import org.bukkit.craftbukkit.v1_20_R4.CraftChunk;
import org.bukkit.craftbukkit.v1_20_R4.block.data.CraftBlockData;
import org.jetbrains.annotations.NotNull;

@SuppressWarnings("unused")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.countercraft.movecraft.support.v1_20_R3;
package net.countercraft.movecraft.support.v1_20_R4;

import net.countercraft.movecraft.SmoothTeleport;
import net.countercraft.movecraft.util.ReflectUtils;
Expand All @@ -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.3
* Used for 1.20.4
*/
public class ISmoothTeleport extends SmoothTeleport {
private final Field teleportPosField;
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<module>modules/v1_16_R3</module>
<module>modules/v1_18_R2</module>
<module>modules/v1_19_R3</module>
<module>modules/v1_20_R3</module>
<module>modules/v1_20_R4</module>
<module>modules/datapack</module>
<module>modules/Movecraft</module>
</modules>
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.3
if [ -f ~/.m2/repository/org/spigotmc/spigot/1.20.3-R0.1-SNAPSHOT/spigot-1.20.3-R0.1-SNAPSHOT.jar ]; then
echo "1.20.3 already exists, skipping build"
# Build 1.20.4
if [ -f ~/.m2/repository/org/spigotmc/spigot/1.20.4-R0.1-SNAPSHOT/spigot-1.20.4-R0.1-SNAPSHOT.jar ]; then
echo "1.20.4 already exists, skipping build"
else
java -jar BuildTools.jar --rev 1.20.3 --remapped
java -jar BuildTools.jar --rev 1.20.4 --remapped
fi

# Restore git information
Expand Down

0 comments on commit 896bcc1

Please sign in to comment.