diff --git a/.github/workflows/pr-build.yml b/.github/workflows/pr-build.yml index f667c61..1b10310 100644 --- a/.github/workflows/pr-build.yml +++ b/.github/workflows/pr-build.yml @@ -9,7 +9,8 @@ jobs: strategy: matrix: - java: [15] + java: [16] + fail-fast: true steps: - uses: actions/checkout@v2 @@ -18,19 +19,25 @@ jobs: uses: actions/setup-java@v1 with: java-version: ${{ matrix.java }} + distribution: 'adopt' - - uses: actions/cache@v2 + - name: Cache gradle + uses: actions/cache@v2 with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: ${{ runner.os }}-maven- + path: | + ~/.gradle/caches + ~/.gradle/jdks + ~/.gradle/native + ~/.gradle/wrapper + key: ${{ runner.os }}-parchment-2-${{ hashFiles('**/*.gradle*', 'gradle/**', 'gradle.properties') }} + restore-keys: ${{ runner.os }}-parchment-2 - name: Patch Parchment run: | - git config --global user.email "you@example.com" - git config --global user.name "Your Name" - git submodule update --init --recursive - ./parchment ghjar + git config --global user.email "no-reply@github.com" + git config --global user.name "GitHub Actions" + ./gradlew applyPatches + ./gradlew reobfJar - uses: actions/upload-artifact@v2 with: diff --git a/README.md b/README.md index d766905..3a124dc 100644 --- a/README.md +++ b/README.md @@ -6,34 +6,33 @@ It contains changes to the API to make development of our plugin [Nexus](https:/ ## Building Requirements: -- You need `git` installed, with a configured user name and email. +- You need `git` installed, with a configured username and email. On Windows you need to run from git bash. -- You need `maven` installed. -- You need `jdk` 8+ installed to compile (and `jre` 8+ to run). -- Anything else that `paper` requires to build. +- You need `jdk` 16+ installed to compile (and `jre` 16+ to run). -If all you want is a paperclip server jar, just run `./parchment jar`. +If all you want is a paperclip server jar, just run `./gradlew reobfJar`. -Otherwise, to setup the `Parchment-API` and `Parchment-Server` repo, just run `./parchment patch` -in your project root. Afterwards you can run `./parchment build` to build the -respective API and server jars. +Otherwise, to setup the `Parchment-API` and `Parchment-Server` repo, just run +`./gradlew applyPatches` in your project root. Afterwards you can run `./gradlew build` +to build the respective API and server jars. -`./parchment patch` should initialize the repo such that you can now start modifying and creating -patches. The folder `Parchment-API` is the API repository and the `Parchment-Server` folder -is the server repository. These contain the source files you will modify. + +`./gradlew applyPatches` should initialize the repo such that you can now start modifying and +creating patches. The folder `Parchment-API` is the API repository and the `Parchment-Server` +folder is the server repository. These contain the source files you will modify. ### Creating a patch Patches are effectively just commits in either `Parchment-API` or `Parchment-Server`. -To create one, just add a commit to either repo and run `./parchment rb` and a +To create one, just add a commit to either repo and run `./gradlew rebuildPatches` and a patch will be placed in the patches folder. Modifying commits will also modify its corresponding patch file. ## License -See https://github.com/starlis/empirecraft, https://github.com/electronicboy/byof, and https://github.com/Spottedleaf/Tuinity -for the license of material used/modified by this project. +See https://github.com/PaperMC/paperweight-examples for the license of material used/modified by +this project. ### Note -The fork is based off of [Tuinity](https://github.com/Spottedleaf/Tuinity). \ No newline at end of file +The fork is based off of [paperweight-example](https://github.com/PaperMC/paperweight-examples). \ No newline at end of file diff --git a/patches/server/0006-Temporary-Access-Transformers.patch b/patches/server/0006-Temporary-Access-Transformers.patch new file mode 100644 index 0000000..3f291e5 --- /dev/null +++ b/patches/server/0006-Temporary-Access-Transformers.patch @@ -0,0 +1,19 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: lexikiq +Date: Sat, 19 Jun 2021 18:03:59 -0400 +Subject: [PATCH] Temporary Access Transformers + + +diff --git a/src/main/java/net/minecraft/world/item/BlockItem.java b/src/main/java/net/minecraft/world/item/BlockItem.java +index 44b28773fe8e79931e738d493bd9405e0ee3dca9..47ea90bc41998296d03f0039f769d43b2088d2a4 100644 +--- a/src/main/java/net/minecraft/world/item/BlockItem.java ++++ b/src/main/java/net/minecraft/world/item/BlockItem.java +@@ -187,7 +187,7 @@ public class BlockItem extends Item { + }).orElse(state); + } + +- protected boolean canPlace(BlockPlaceContext context, BlockState state) { ++ public boolean canPlace(BlockPlaceContext context, BlockState state) { // Parchment + Player entityhuman = context.getPlayer(); + CollisionContext voxelshapecollision = entityhuman == null ? CollisionContext.empty() : CollisionContext.of((Entity) entityhuman); + // CraftBukkit start - store default return