diff options
author | Jake Potrebic <[email protected]> | 2022-11-19 15:53:20 -0800 |
---|---|---|
committer | GitHub <[email protected]> | 2022-11-19 15:53:20 -0800 |
commit | b95d4b28b806ace2d61e9fe0bb13cede4a5e8847 (patch) | |
tree | dbc14a57020859299db21b2aa5154e44db96fab8 /CONTRIBUTING.md | |
parent | 76503f8887668fbefe805c8dd07e97a7bc095633 (diff) | |
download | Paper-b95d4b28b806ace2d61e9fe0bb13cede4a5e8847.tar.gz Paper-b95d4b28b806ace2d61e9fe0bb13cede4a5e8847.zip |
Moving ATs from the at file to individual patches (#8573)
Diffstat (limited to 'CONTRIBUTING.md')
-rw-r--r-- | CONTRIBUTING.md | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fe49361763..fb0ca036dd 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -236,6 +236,37 @@ There are exceptions, especially in Spigot-related files - When in doubt or the code around your change is in a clearly different style, use the same style as the surrounding code. +## Access Transformers +Sometimes, vanilla or CraftBukkit code already contains a field, method, or type you want to access +but the visibility is too low (e.g. a private field in an entity class). Paper can use access transformers +to change the visibility or remove the final modifier from fields, methods, and classes. Inside the `build-data/paper.at` +file, you can add ATs that are applied when you `./gradlew applyPatches`. You can read about the format of ATs +[here](https://mcforge.readthedocs.io/en/latest/advanced/accesstransformers/#access-modifiers). + +### Important +ATs should be included in the patch file which requires them within the commit message. Do not commit any changes to the +`build-data/paper.at` file, just use it to initially change the visibility of members until you have finalized what you +need. Then, in the commit message for the patch which requires the ATs, add a header at the bottom of the commit message +before any co-authors. It should look like the following after you `./gradlew rebuildPatches`. +``` +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jake Potrebic <[email protected]> +Date: Wed, 8 Jun 2022 22:20:16 -0700 +Subject: [PATCH] Paper config files + +This patch adds Paper configuration files. +Access transformers for this patch are below, but before the co-authors. + +== AT == +public org.spigotmc.SpigotWorldConfig getBoolean(Ljava/lang/String;Z)Z +public net.minecraft.world.level.NaturalSpawner SPAWNING_CATEGORIES + +Co-authored-by: Jason Penilla <[email protected]> + +diff --git a/build.gradle.kts b/build.gradle.kts +... +``` + ## Patch Notes When submitting patches to Paper, we may ask you to add notes to the patch |