diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 6c4849c68..9c2592a0d 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -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 @@ -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 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 2109b4716..2f640a530 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -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 @@ -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 diff --git a/README.md b/README.md index 55732a2b1..49a21d9e8 100644 --- a/README.md +++ b/README.md @@ -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`. diff --git a/modules/Movecraft/pom.xml b/modules/Movecraft/pom.xml index c961c2da4..be708f42e 100644 --- a/modules/Movecraft/pom.xml +++ b/modules/Movecraft/pom.xml @@ -50,7 +50,7 @@ net.countercraft - movecraft-v1_20_R3 + movecraft-v1_20_R4 ${revision} jar @@ -190,7 +190,7 @@ - net.countercraft:movecraft-v1_20_R3 + net.countercraft:movecraft-v1_20_R4 ** diff --git a/modules/v1_20_R3/pom.xml b/modules/v1_20_R4/pom.xml similarity index 87% rename from modules/v1_20_R3/pom.xml rename to modules/v1_20_R4/pom.xml index b49c6aa12..f514612e2 100644 --- a/modules/v1_20_R3/pom.xml +++ b/modules/v1_20_R4/pom.xml @@ -10,17 +10,17 @@ 4.0.0 - movecraft-v1_20_R3 - Movecraft-v1_20_R3 + movecraft-v1_20_R4 + Movecraft-v1_20_R4 jar org.spigotmc spigot - 1.20.3-R0.1-SNAPSHOT + 1.20.4-R0.1-SNAPSHOT remapped-mojang provided - + net.countercraft @@ -38,8 +38,8 @@ 3.8.1 - net/countercraft/movecraft/compat/v1_20_R3/** - net/countercraft/movecraft/support/v1_20_R3/** + net/countercraft/movecraft/compat/v1_20_R4/** + net/countercraft/movecraft/support/v1_20_R4/** 13 13 @@ -51,8 +51,8 @@ 2.4 - net/countercraft/movecraft/compat/v1_20_R3/** - net/countercraft/movecraft/support/v1_20_R3/** + net/countercraft/movecraft/compat/v1_20_R4/** + net/countercraft/movecraft/support/v1_20_R4/** @@ -68,9 +68,9 @@ remap-obf - org.spigotmc:minecraft-server:1.20.3-R0.1-SNAPSHOT:txt:maps-mojang + org.spigotmc:minecraft-server:1.20.4-R0.1-SNAPSHOT:txt:maps-mojang true - org.spigotmc:spigot:1.20.3-R0.1-SNAPSHOT:jar:remapped-mojang + org.spigotmc:spigot:1.20.4-R0.1-SNAPSHOT:jar:remapped-mojang true remapped-obf @@ -83,8 +83,8 @@ remap-spigot ${project.build.directory}/${project.artifactId}-${project.version}-remapped-obf.jar - org.spigotmc:minecraft-server:1.20.3-R0.1-SNAPSHOT:csrg:maps-spigot - org.spigotmc:spigot:1.20.3-R0.1-SNAPSHOT:jar:remapped-obf + org.spigotmc:minecraft-server:1.20.4-R0.1-SNAPSHOT:csrg:maps-spigot + org.spigotmc:spigot:1.20.4-R0.1-SNAPSHOT:jar:remapped-obf diff --git a/modules/v1_20_R3/src/main/java/net/countercraft/movecraft/compat/v1_20_R2/IWorldHandler.java b/modules/v1_20_R4/src/main/java/net/countercraft/movecraft/compat/v1_20_R2/IWorldHandler.java similarity index 98% rename from modules/v1_20_R3/src/main/java/net/countercraft/movecraft/compat/v1_20_R2/IWorldHandler.java rename to modules/v1_20_R4/src/main/java/net/countercraft/movecraft/compat/v1_20_R2/IWorldHandler.java index ed85f1b68..12882ba01 100644 --- a/modules/v1_20_R3/src/main/java/net/countercraft/movecraft/compat/v1_20_R2/IWorldHandler.java +++ b/modules/v1_20_R4/src/main/java/net/countercraft/movecraft/compat/v1_20_R2/IWorldHandler.java @@ -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; @@ -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; diff --git a/modules/v1_20_R3/src/main/java/net/countercraft/movecraft/compat/v1_20_R2/NextTickProvider.java b/modules/v1_20_R4/src/main/java/net/countercraft/movecraft/compat/v1_20_R2/NextTickProvider.java similarity index 96% rename from modules/v1_20_R3/src/main/java/net/countercraft/movecraft/compat/v1_20_R2/NextTickProvider.java rename to modules/v1_20_R4/src/main/java/net/countercraft/movecraft/compat/v1_20_R2/NextTickProvider.java index eb552fcbb..307d6f2c7 100644 --- a/modules/v1_20_R3/src/main/java/net/countercraft/movecraft/compat/v1_20_R2/NextTickProvider.java +++ b/modules/v1_20_R4/src/main/java/net/countercraft/movecraft/compat/v1_20_R2/NextTickProvider.java @@ -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; diff --git a/modules/v1_20_R3/src/main/java/net/countercraft/movecraft/support/v1_20_R2/IAsyncChunk.java b/modules/v1_20_R4/src/main/java/net/countercraft/movecraft/support/v1_20_R2/IAsyncChunk.java similarity index 92% rename from modules/v1_20_R3/src/main/java/net/countercraft/movecraft/support/v1_20_R2/IAsyncChunk.java rename to modules/v1_20_R4/src/main/java/net/countercraft/movecraft/support/v1_20_R2/IAsyncChunk.java index a94a279e2..abde05d97 100644 --- a/modules/v1_20_R3/src/main/java/net/countercraft/movecraft/support/v1_20_R2/IAsyncChunk.java +++ b/modules/v1_20_R4/src/main/java/net/countercraft/movecraft/support/v1_20_R2/IAsyncChunk.java @@ -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; @@ -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") diff --git a/modules/v1_20_R3/src/main/java/net/countercraft/movecraft/support/v1_20_R2/ISmoothTeleport.java b/modules/v1_20_R4/src/main/java/net/countercraft/movecraft/support/v1_20_R2/ISmoothTeleport.java similarity index 97% rename from modules/v1_20_R3/src/main/java/net/countercraft/movecraft/support/v1_20_R2/ISmoothTeleport.java rename to modules/v1_20_R4/src/main/java/net/countercraft/movecraft/support/v1_20_R2/ISmoothTeleport.java index ba6b40d75..875c6907a 100644 --- a/modules/v1_20_R3/src/main/java/net/countercraft/movecraft/support/v1_20_R2/ISmoothTeleport.java +++ b/modules/v1_20_R4/src/main/java/net/countercraft/movecraft/support/v1_20_R2/ISmoothTeleport.java @@ -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; @@ -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; diff --git a/pom.xml b/pom.xml index 7f3fd16d2..bcba5fef1 100644 --- a/pom.xml +++ b/pom.xml @@ -17,7 +17,7 @@ modules/v1_16_R3 modules/v1_18_R2 modules/v1_19_R3 - modules/v1_20_R3 + modules/v1_20_R4 modules/datapack modules/Movecraft diff --git a/setup.sh b/setup.sh index 3bc37ae3b..bee3e7416 100755 --- a/setup.sh +++ b/setup.sh @@ -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