diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fa85615bba..24c276e115 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,8 +17,7 @@ jobs: distribution: temurin java-version: 21 cache: 'gradle' - - uses: gradle/wrapper-validation-action@v2 - - uses: gradle/actions/setup-gradle@v3 + - uses: gradle/actions/setup-gradle@v4 - name: Configure Git run: git config --global user.email "no-reply@github.com" && git config --global user.name "Github Actions" - name: Apply Patches diff --git a/build.gradle.kts b/build.gradle.kts index e37701179c..d472edfdd7 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -4,7 +4,7 @@ import org.gradle.api.tasks.testing.logging.TestLogEvent plugins { java `maven-publish` - id("io.papermc.paperweight.patcher") version "1.7.6" + id("io.papermc.paperweight.patcher") version "1.7.7" } allprojects { diff --git a/gradle.properties b/gradle.properties index 523fff11cb..532df5a571 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,7 +2,7 @@ group = org.purpurmc.purpur version = 1.21.4-R0.1-SNAPSHOT mcVersion = 1.21.4 -paperCommit = 416a73304809d94c11a2bf22bbb2ad438a0dd68c +paperCommit = d4630f1223ba8cef0f9767d22f70999f1292cbcf org.gradle.caching = true org.gradle.parallel = true diff --git a/patches/api/0001-Pufferfish-API-Changes.patch b/patches/api/0001-Pufferfish-API-Changes.patch index ac432b1ef8..1259ec0fb0 100644 --- a/patches/api/0001-Pufferfish-API-Changes.patch +++ b/patches/api/0001-Pufferfish-API-Changes.patch @@ -20,10 +20,10 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . diff --git a/build.gradle.kts b/build.gradle.kts -index 8d76f0a8b6b67f0cae0b2fa23f0f79fc9fe97f30..ed46baad9fad925201cf2aeaea884a796af5dd9c 100644 +index 571534b42cd9c33d6a7bb6fe3bf3a28e33f8e5de..5ceaca1bd75335f85b4876a394ea8c2643cda694 100644 --- a/build.gradle.kts +++ b/build.gradle.kts -@@ -64,6 +64,7 @@ dependencies { +@@ -66,6 +66,7 @@ dependencies { apiAndDocs("net.kyori:adventure-text-logger-slf4j") api("org.apache.logging.log4j:log4j-api:$log4jVersion") api("org.slf4j:slf4j-api:$slf4jVersion") @@ -31,7 +31,7 @@ index 8d76f0a8b6b67f0cae0b2fa23f0f79fc9fe97f30..ed46baad9fad925201cf2aeaea884a79 implementation("org.ow2.asm:asm:9.7.1") implementation("org.ow2.asm:asm-commons:9.7.1") -@@ -148,6 +149,13 @@ val generateApiVersioningFile by tasks.registering { +@@ -150,6 +151,13 @@ val generateApiVersioningFile by tasks.registering { } } diff --git a/patches/api/0005-Build-System-Changes.patch b/patches/api/0005-Build-System-Changes.patch index a6ce146299..ae251c7926 100644 --- a/patches/api/0005-Build-System-Changes.patch +++ b/patches/api/0005-Build-System-Changes.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Build System Changes diff --git a/build.gradle.kts b/build.gradle.kts -index ed46baad9fad925201cf2aeaea884a796af5dd9c..99a157ade959fd38da28851b3c698d8ea4736b86 100644 +index 5ceaca1bd75335f85b4876a394ea8c2643cda694..49546dfbb4dd006b5a2419908890ba4c2a0e207a 100644 --- a/build.gradle.kts +++ b/build.gradle.kts -@@ -168,6 +168,8 @@ tasks.jar { +@@ -170,6 +170,8 @@ tasks.jar { } tasks.withType { diff --git a/patches/server/0001-Pufferfish-Server-Changes.patch b/patches/server/0001-Pufferfish-Server-Changes.patch index dd83492189..ab554b1998 100644 --- a/patches/server/0001-Pufferfish-Server-Changes.patch +++ b/patches/server/0001-Pufferfish-Server-Changes.patch @@ -131,10 +131,10 @@ index c21e00812f1aaa1279834a0562d360d6b89e146c..877d2095a066854939f260ca4b0b8c7b } diff --git a/src/main/java/com/destroystokyo/paper/Metrics.java b/src/main/java/com/destroystokyo/paper/Metrics.java -index 4b002e8b75d117b726b0de274a76d3596fce015b..692c962193cf9fcc6801fc93f3220bdc673d527b 100644 +index 8f62879582195d8ae4f64bd23f752fa133b1c973..8433c3ac440faa969069d1929b8b77fcb1080be7 100644 --- a/src/main/java/com/destroystokyo/paper/Metrics.java +++ b/src/main/java/com/destroystokyo/paper/Metrics.java -@@ -593,7 +593,7 @@ public class Metrics { +@@ -592,7 +592,7 @@ public class Metrics { boolean logFailedRequests = config.getBoolean("logFailedRequests", false); // Only start Metrics, if it's enabled in the config if (config.getBoolean("enabled", true)) { @@ -143,7 +143,7 @@ index 4b002e8b75d117b726b0de274a76d3596fce015b..692c962193cf9fcc6801fc93f3220bdc metrics.addCustomChart(new Metrics.SimplePie("minecraft_version", () -> { String minecraftVersion = Bukkit.getVersion(); -@@ -607,11 +607,11 @@ public class Metrics { +@@ -606,11 +606,11 @@ public class Metrics { final String implVersion = org.bukkit.craftbukkit.Main.class.getPackage().getImplementationVersion(); if (implVersion != null) { final String buildOrHash = implVersion.substring(implVersion.lastIndexOf('-') + 1); @@ -1017,13 +1017,13 @@ index 0000000000000000000000000000000000000000..facd55463d44cb7e3d2ca6892982f549 + } +} diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index ab4f1bd1ebf0af54f3fa88ee9e2007d20445e7e9..81591e2b51755b0b76ddceea32ea9f19004bfb13 100644 +index ae4ebf509837e8d44255781c61d02873f8b74be8..312edb4c47a404c1d20e6bdf748a4ccb49a330f4 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -333,6 +333,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop pluginsBlockingSleep = new java.util.HashSet<>(); // Paper - API to allow/disallow tick sleeping + public gg.pufferfish.pufferfish.util.AsyncExecutor mobSpawnExecutor = new gg.pufferfish.pufferfish.util.AsyncExecutor("MobSpawning"); // Pufferfish - optimize mob spawning public static S spin(Function serverFactory) { @@ -1198,7 +1198,7 @@ index 103e2c414780be66324bcb9cd4ea539bbdfe12ad..c563326d3131bc726c7f43311c3eaa82 this.wasOnGround = this.entity.onGround(); this.teleportDelay = 0; diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 7270a94246df73ee195156fc7b62470d090a337a..430e29b61feaf525ffa054469dd098a2c1d760f1 100644 +index 1f898500d0e9b18a880645ceb0a8ff0fe75f4e48..fe295515b8043d988eb87c2caf516a4ae4169451 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -793,6 +793,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe @@ -1241,10 +1241,10 @@ index 7270a94246df73ee195156fc7b62470d090a337a..430e29b61feaf525ffa054469dd098a2 if (this.isRainingAt(blockposition)) { diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 2fbe3d8722eeacc3b27ce38145aeffa610f9daab..9646b13ee9fa1824b929eb8b8ce2302d1c461120 100644 +index 84fa24880d02dc7ba1ec8bda3575be38447fd4b2..dedd8b3644699c4bdb33c9a7046342b620889b87 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -1225,6 +1225,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -1226,6 +1226,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @Override public void handleEditBook(ServerboundEditBookPacket packet) { @@ -1253,7 +1253,7 @@ index 2fbe3d8722eeacc3b27ce38145aeffa610f9daab..9646b13ee9fa1824b929eb8b8ce2302d final io.papermc.paper.configuration.type.number.IntOr.Disabled pageMax = io.papermc.paper.configuration.GlobalConfiguration.get().itemValidation.bookSize.pageMax; if (!this.cserver.isPrimaryThread() && pageMax.enabled()) { diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 27618d07d718cb2a5783536e11d56f712303487b..d337311b36db049b11c768bf16d8e7b5f31436dd 100644 +index 1b547be0fe97119edf4f29666cfe0037e0c778e0..0348a458493c4fe22552ae2404272dd9b989d53e 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -389,6 +389,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -1333,7 +1333,7 @@ index 96b4fbe4a4655777ff10b32e3257e2fac2aba12a..ee2c88638f058172ef730de9b112ce65 if (this.isSpectator()) { return false; diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java -index 5a3059cadbc9735b4b48745c6b1b11196596b06d..c68543bd7023e9022660ad9c7cbf72c8dc2a6e27 100644 +index 5a0b51342f4a646101f4588697bcae7d1ca8a010..8ebe26c46db485ee0bdf64a313681d465051f436 100644 --- a/src/main/java/net/minecraft/world/entity/Mob.java +++ b/src/main/java/net/minecraft/world/entity/Mob.java @@ -231,14 +231,16 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab @@ -1355,7 +1355,7 @@ index 5a3059cadbc9735b4b48745c6b1b11196596b06d..c68543bd7023e9022660ad9c7cbf72c8 this.targetSelector.tick(); } } -@@ -925,16 +927,20 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab +@@ -927,16 +929,20 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab if (i % 2 != 0 && this.tickCount > 1) { gameprofilerfiller.push("targetSelector"); @@ -1700,7 +1700,7 @@ index 2d8ba55906c8da16fde850e3412f4a6bda3d56e7..3fd86782134a674f58ef37288c8963a4 if (this.assignProfessionWhenSpawned) { this.assignProfessionWhenSpawned = false; diff --git a/src/main/java/net/minecraft/world/entity/player/Inventory.java b/src/main/java/net/minecraft/world/entity/player/Inventory.java -index 36ba57e95b84f3d598bf4be624d6c88b05a6f9a6..9d467d401147308b9f6e3eb7be2d7606993825c3 100644 +index 110456deaa662bc1c0f6ba7878bb3074869a4350..58c8e8f06f5cf028b158350327bf42984fcb4d38 100644 --- a/src/main/java/net/minecraft/world/entity/player/Inventory.java +++ b/src/main/java/net/minecraft/world/entity/player/Inventory.java @@ -636,6 +636,8 @@ public class Inventory implements Container, Nameable { @@ -1786,7 +1786,7 @@ index b62db8c7c8c57e43869ee239ebf4b02f112355d9..2bee342e59e600426c8681a3ce641a12 } } diff --git a/src/main/java/net/minecraft/world/item/crafting/ShapelessRecipe.java b/src/main/java/net/minecraft/world/item/crafting/ShapelessRecipe.java -index 6ec7b234b468755835107be40d0080222c0b9263..ab91d14f263ba2cdb2bbf4a8a2dd66898e709fe6 100644 +index 12f95bee2a69fd5df7c4a165537e01299e60c5f6..4b3769020a92124bd5677cf75e268b8bc5ba2031 100644 --- a/src/main/java/net/minecraft/world/item/crafting/ShapelessRecipe.java +++ b/src/main/java/net/minecraft/world/item/crafting/ShapelessRecipe.java @@ -31,8 +31,13 @@ public class ShapelessRecipe implements CraftingRecipe { @@ -1828,9 +1828,9 @@ index 6ec7b234b468755835107be40d0080222c0b9263..ab91d14f263ba2cdb2bbf4a8a2dd6689 + return ingredients.isEmpty(); + } + // Pufferfish end - return input.ingredientCount() != this.ingredients.size() ? false : (input.size() == 1 && this.ingredients.size() == 1 ? ((Ingredient) this.ingredients.getFirst()).test(input.getItem(0)) : input.stackedContents().canCraft((Recipe) this, (StackedContents.Output) null)); - } - + // Paper start - Improve exact choice recipe ingredients & unwrap ternary + if (input.ingredientCount() != this.ingredients.size()) { + return false; diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java index 27f9d167b5ae9ce5117798ea44324107df59425f..6470f145e2470574a40ddce6ca5bf924c1bb094c 100644 --- a/src/main/java/net/minecraft/world/level/Level.java diff --git a/patches/server/0004-Purpur-config-files.patch b/patches/server/0004-Purpur-config-files.patch index 5461c5de4e..30b8a97de0 100644 --- a/patches/server/0004-Purpur-config-files.patch +++ b/patches/server/0004-Purpur-config-files.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Purpur config files diff --git a/src/main/java/com/destroystokyo/paper/Metrics.java b/src/main/java/com/destroystokyo/paper/Metrics.java -index 692c962193cf9fcc6801fc93f3220bdc673d527b..8cde30544e14f8fc2dac32966ae3c21f8cf3a551 100644 +index 8433c3ac440faa969069d1929b8b77fcb1080be7..4a8f95670e25c81952cccbaf4c6e49514cacd529 100644 --- a/src/main/java/com/destroystokyo/paper/Metrics.java +++ b/src/main/java/com/destroystokyo/paper/Metrics.java -@@ -593,7 +593,7 @@ public class Metrics { +@@ -592,7 +592,7 @@ public class Metrics { boolean logFailedRequests = config.getBoolean("logFailedRequests", false); // Only start Metrics, if it's enabled in the config if (config.getBoolean("enabled", true)) { @@ -17,7 +17,7 @@ index 692c962193cf9fcc6801fc93f3220bdc673d527b..8cde30544e14f8fc2dac32966ae3c21f metrics.addCustomChart(new Metrics.SimplePie("minecraft_version", () -> { String minecraftVersion = Bukkit.getVersion(); -@@ -602,16 +602,8 @@ public class Metrics { +@@ -601,16 +601,8 @@ public class Metrics { })); metrics.addCustomChart(new Metrics.SingleLineChart("players", () -> Bukkit.getOnlinePlayers().size())); @@ -112,7 +112,7 @@ index 6470f145e2470574a40ddce6ca5bf924c1bb094c..31ec722cfb102eaea5511aca07a48e4a this.world = new CraftWorld((ServerLevel) this, gen, biomeProvider, env); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index ac8af406180bc680d46e8edc3da0fc2e5211345a..48a8bdd45c063797144e98e76f6007ae9025124e 100644 +index 97b5d6ba2b19a7c730730c74175a29157aed1840..ac83ec97e5a55d2184c0c0d64b9b340f39c2be9f 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -1086,6 +1086,7 @@ public final class CraftServer implements Server { diff --git a/patches/server/0005-Purpur-client-support.patch b/patches/server/0005-Purpur-client-support.patch index 58ce302ee6..d868c1f62c 100644 --- a/patches/server/0005-Purpur-client-support.patch +++ b/patches/server/0005-Purpur-client-support.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Purpur client support diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 8aff5b7dd14b835788348b22b1fec4d381df816f..e223a732b8ff485645fa3a4c08c6bf6dff146dd7 100644 +index fc7f7a34babd095a51b5321f600aef65a2a9d123..c067ac7481367afbcdb051b7a215ebf0f28e3c9c 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java @@ -327,6 +327,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple @@ -43,10 +43,10 @@ index b0bc66dc7248aae691dcab68b925b52a1695e63f..b6dd6bde947ac7502f25d31603995961 try { String channels = payload.toString(com.google.common.base.Charsets.UTF_8); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 84c494ca81b8f58604b372ac7236147776817a4f..d86bf4f995e8156f594fa90ebbab4165e52c0e09 100644 +index 20f64850cb42d986358f01ffcdb42187e1684bca..0528b90bf718e4b3dc144cc33806126dfbe736e2 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -3565,4 +3565,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -3557,4 +3557,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player { this.getHandle().connection.send(new net.minecraft.network.protocol.game.ClientboundEntityEventPacket(((CraftEntity) target).getHandle(), effect.getData())); } // Paper end - entity effect API diff --git a/patches/server/0009-Ridables.patch b/patches/server/0009-Ridables.patch index 8d993621c5..9235550793 100644 --- a/patches/server/0009-Ridables.patch +++ b/patches/server/0009-Ridables.patch @@ -22,7 +22,7 @@ index faffd87c357511ef00646971a16acf1009362c59..c98e0d9d8bc9e6ef12a9b9d6082e98bc super(x, y, z); } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 81591e2b51755b0b76ddceea32ea9f19004bfb13..48e40ef7fba63d9354152a02440656ceb3a9b7a6 100644 +index 312edb4c47a404c1d20e6bdf748a4ccb49a330f4..c391d42e1e84beeee6cf8796f748b70be9c98b52 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -1864,6 +1864,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop { String s = String.valueOf(worldserver); diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 430e29b61feaf525ffa054469dd098a2c1d760f1..d571b4a56807bcc4206d54573604c01290cd3dd7 100644 +index fe295515b8043d988eb87c2caf516a4ae4169451..4de53bba7b0bf036d2ef76970f01ca5414514ebc 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -232,6 +232,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe @@ -46,7 +46,7 @@ index 430e29b61feaf525ffa054469dd098a2c1d760f1..d571b4a56807bcc4206d54573604c012 public LevelChunk getChunkIfLoaded(int x, int z) { return this.chunkSource.getChunkAtIfLoadedImmediately(x, z); // Paper - Use getChunkIfLoadedImmediately diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 5bad9af939411e23a84184cdc13004bc5e2e2568..cff9e1877d3abcf92417ff56f4db2d14ad188f97 100644 +index f8787b8a4a267cc7f5e1a81344f0de9cacf43e07..1e0ca760b18e34a4c320439838283b8fcd87075a 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java @@ -1030,6 +1030,15 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple @@ -66,10 +66,10 @@ index 5bad9af939411e23a84184cdc13004bc5e2e2568..cff9e1877d3abcf92417ff56f4db2d14 private void updatePlayerAttributes() { diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 9646b13ee9fa1824b929eb8b8ce2302d1c461120..e6c4b62daece71edae995a3c3fd21e18b5616bb1 100644 +index dedd8b3644699c4bdb33c9a7046342b620889b87..ddbfd4884daaa4cffdb5e4d8923a8755dab76d91 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2887,6 +2887,8 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -2888,6 +2888,8 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl ServerGamePacketListenerImpl.this.cserver.getPluginManager().callEvent(event); @@ -79,7 +79,7 @@ index 9646b13ee9fa1824b929eb8b8ce2302d1c461120..e6c4b62daece71edae995a3c3fd21e18 if ((entity instanceof Bucketable && entity instanceof LivingEntity && origItem != null && origItem.asItem() == Items.WATER_BUCKET) && (event.isCancelled() || ServerGamePacketListenerImpl.this.player.getInventory().getSelected() == null || ServerGamePacketListenerImpl.this.player.getInventory().getSelected().getItem() != origItem)) { entity.resendPossiblyDesyncedEntityData(ServerGamePacketListenerImpl.this.player); // Paper - The entire mob gets deleted, so resend it diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index d337311b36db049b11c768bf16d8e7b5f31436dd..d6b48ad015e118ec9599110f54f462ef3a5debc3 100644 +index 0348a458493c4fe22552ae2404272dd9b989d53e..c11689baa8e917a2163bd550452b7a6694163b72 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -340,7 +340,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -259,7 +259,7 @@ index ee2c88638f058172ef730de9b112ce6506211d3b..1135737e16849417df1cdcd5f3858ebb // Paper end - Add EntityMoveEvent world = this.level(); diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java -index c68543bd7023e9022660ad9c7cbf72c8dc2a6e27..d2baf9408fd7cc19025d2d6a891acc94e6ec23a7 100644 +index 8ebe26c46db485ee0bdf64a313681d465051f436..b57c362e67d9724fc387d3aa5b8547aef648fe91 100644 --- a/src/main/java/net/minecraft/world/entity/Mob.java +++ b/src/main/java/net/minecraft/world/entity/Mob.java @@ -159,8 +159,8 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab @@ -273,7 +273,7 @@ index c68543bd7023e9022660ad9c7cbf72c8dc2a6e27..d2baf9408fd7cc19025d2d6a891acc94 this.jumpControl = new JumpControl(this); this.bodyRotationControl = this.createBodyControl(); this.navigation = this.createNavigation(world); -@@ -1500,7 +1500,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab +@@ -1502,7 +1502,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab protected void onOffspringSpawnedFromEgg(Player player, Mob child) {} protected InteractionResult mobInteract(Player player, InteractionHand hand) { @@ -282,7 +282,7 @@ index c68543bd7023e9022660ad9c7cbf72c8dc2a6e27..d2baf9408fd7cc19025d2d6a891acc94 } public boolean isWithinRestriction() { -@@ -1820,4 +1820,58 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab +@@ -1822,4 +1822,58 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab public float[] getArmorDropChances() { return this.armorDropChances; } @@ -582,7 +582,7 @@ index 9aedc62b1766f6a7db4da7eba55167d21d698791..9708ed3e00059fdf5d1d60e0c607d0ab double d = this.wantedX - this.fish.getX(); double e = this.wantedY - this.fish.getY(); diff --git a/src/main/java/net/minecraft/world/entity/animal/Bee.java b/src/main/java/net/minecraft/world/entity/animal/Bee.java -index ca706f1ac5f4248164daa613eef81e46b3e5a210..6ae52fa7c0cb3eda4f0d7f8c7dbbf97078dd2d59 100644 +index 0bafe14342c1acce131ad34717c18aed3718deed..91825f18da8f95d84b9fe6de39e2d519b11b684b 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Bee.java +++ b/src/main/java/net/minecraft/world/entity/animal/Bee.java @@ -154,6 +154,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { @@ -4747,7 +4747,7 @@ index 03e3cbe73119ca76417d4dd192e1560bdfc373ec..aa4160892b9ba2486806b5a54bc1465a public void setPersistentAngerTarget(@Nullable UUID angryAt) { this.persistentAngerTarget = angryAt; diff --git a/src/main/java/net/minecraft/world/entity/monster/creaking/Creaking.java b/src/main/java/net/minecraft/world/entity/monster/creaking/Creaking.java -index bdf2b22f3f57e99ad7bbc24d391c7773663fda41..2afb53a33b612faf6aac6fc8a27dc285cc558b4d 100644 +index 6a7e725edece3043c8523d387e2929d5ba8932cb..d0a4df6775d79dfa5193146a1256a4569607597a 100644 --- a/src/main/java/net/minecraft/world/entity/monster/creaking/Creaking.java +++ b/src/main/java/net/minecraft/world/entity/monster/creaking/Creaking.java @@ -106,6 +106,29 @@ public class Creaking extends Monster { diff --git a/patches/server/0013-AFK-API.patch b/patches/server/0013-AFK-API.patch index 4ded8d9860..c48dd9dad3 100644 --- a/patches/server/0013-AFK-API.patch +++ b/patches/server/0013-AFK-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] AFK API diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index cff9e1877d3abcf92417ff56f4db2d14ad188f97..ae4733c402662630a3892aecd01646d2e7613eed 100644 +index 1e0ca760b18e34a4c320439838283b8fcd87075a..0f979af9131678991860765163fcc4b0453ef52a 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java @@ -2621,8 +2621,68 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple @@ -78,7 +78,7 @@ index cff9e1877d3abcf92417ff56f4db2d14ad188f97..ae4733c402662630a3892aecd01646d2 return this.stats; } diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index e6c4b62daece71edae995a3c3fd21e18b5616bb1..236402e35eb04a2c12ed7ef28ce7c78d7be125cf 100644 +index ddbfd4884daaa4cffdb5e4d8923a8755dab76d91..ea579334ea9f0c1675186af3192f3f7a1c23e859 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -344,6 +344,20 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -124,7 +124,7 @@ index e6c4b62daece71edae995a3c3fd21e18b5616bb1..236402e35eb04a2c12ed7ef28ce7c78d Location oldTo = to.clone(); PlayerMoveEvent event = new PlayerMoveEvent(player, from, to); this.cserver.getPluginManager().callEvent(event); -@@ -1554,7 +1576,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -1555,7 +1577,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl movedWrongly = true; if (event.getLogWarning()) // Paper end @@ -133,7 +133,7 @@ index e6c4b62daece71edae995a3c3fd21e18b5616bb1..236402e35eb04a2c12ed7ef28ce7c78d } // Paper } -@@ -1622,6 +1644,8 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -1623,6 +1645,8 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl this.lastYaw = to.getYaw(); this.lastPitch = to.getPitch(); @@ -223,10 +223,10 @@ index 5d7a6e4b73f032db356e7ec369b150013e940ee6..6b2cda6d578a0983b2401ea206292754 if (range < 0.0 || d < range * range) { return true; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index d86bf4f995e8156f594fa90ebbab4165e52c0e09..350165d6616a1dfe931d0a35de0dbbd9222da216 100644 +index 0528b90bf718e4b3dc144cc33806126dfbe736e2..cfc85a7089de9e30ac9a703b87440475cc2e2cf0 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -583,10 +583,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -584,10 +584,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @Override public void setPlayerListName(String name) { @@ -243,7 +243,7 @@ index d86bf4f995e8156f594fa90ebbab4165e52c0e09..350165d6616a1dfe931d0a35de0dbbd9 if (this.getHandle().connection == null) return; // Paper - Updates are possible before the player has fully joined for (ServerPlayer player : (List) this.server.getHandle().players) { if (player.getBukkitEntity().canSee(this)) { -@@ -3571,5 +3576,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -3563,5 +3568,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { public boolean usesPurpurClient() { return getHandle().purpurClient; } diff --git a/patches/server/0016-Lagging-threshold.patch b/patches/server/0016-Lagging-threshold.patch index 6eeabfaa58..db2bd21e63 100644 --- a/patches/server/0016-Lagging-threshold.patch +++ b/patches/server/0016-Lagging-threshold.patch @@ -5,13 +5,13 @@ Subject: [PATCH] Lagging threshold diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 5a85471d26130c893ad619dbfc9b61c0ee1b938b..93aa1dce5c9bfdfff9372b0a84bfa2d5bf5c1169 100644 +index a79a30b951325d046b38b4dc62c4cc6f22db564e..bac36e5798ae92c75c73a0d0bd53d7bd6ddb07a8 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -328,6 +328,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop pluginsBlockingSleep = new java.util.HashSet<>(); // Paper - API to allow/disallow tick sleeping + public boolean lagging = false; // Purpur public volatile Thread shutdownThread; // Paper @@ -25,7 +25,7 @@ index 5a85471d26130c893ad619dbfc9b61c0ee1b938b..93aa1dce5c9bfdfff9372b0a84bfa2d5 } // Paper end - further improve server tick loop diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 96f0ff6877e2959fe1ab26728ee64b9c9b777d26..5fa7d429b19d135c5b3f719c35042818499b4563 100644 +index 5c1d968d560cb1caf69549ff03a960a7a960d952..6e4725f49de3ddb74002732b9f462bcfcd161be0 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -3291,5 +3291,10 @@ public final class CraftServer implements Server { diff --git a/patches/server/0071-Allow-color-codes-in-books.patch b/patches/server/0071-Allow-color-codes-in-books.patch index c29628afa3..c7b6733d6d 100644 --- a/patches/server/0071-Allow-color-codes-in-books.patch +++ b/patches/server/0071-Allow-color-codes-in-books.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Allow color codes in books diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 236402e35eb04a2c12ed7ef28ce7c78d7be125cf..fd37bfc932fa7102189bbf1c00bd14612f3116e9 100644 +index ea579334ea9f0c1675186af3192f3f7a1c23e859..ff96fcf7d039c4bae4d77c9c546486c2312f6ecc 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -1302,10 +1302,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -1303,10 +1303,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl Objects.requireNonNull(list); optional.ifPresent(list::add); list.addAll(packet.pages()); @@ -25,7 +25,7 @@ index 236402e35eb04a2c12ed7ef28ce7c78d7be125cf..fd37bfc932fa7102189bbf1c00bd1461 }; this.filterTextPacket((List) list).thenAcceptAsync(consumer, this.server); -@@ -1313,13 +1317,18 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -1314,13 +1318,18 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl } private void updateBookContents(List pages, int slotId) { @@ -45,7 +45,7 @@ index 236402e35eb04a2c12ed7ef28ce7c78d7be125cf..fd37bfc932fa7102189bbf1c00bd1461 itemstack.set(DataComponents.WRITABLE_BOOK_CONTENT, new WritableBookContent(list1)); this.player.getInventory().setItem(slotId, CraftEventFactory.handleEditBookEvent(this.player, slotId, handItem, itemstack)); // CraftBukkit // Paper - Don't ignore result (see other callsite for handleEditBookEvent) -@@ -1327,6 +1336,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -1328,6 +1337,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl } private void signBook(FilteredText title, List pages, int slotId) { @@ -57,7 +57,7 @@ index 236402e35eb04a2c12ed7ef28ce7c78d7be125cf..fd37bfc932fa7102189bbf1c00bd1461 ItemStack itemstack = this.player.getInventory().getItem(slotId); if (itemstack.has(DataComponents.WRITABLE_BOOK_CONTENT)) { -@@ -1334,10 +1348,10 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -1335,10 +1349,10 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl itemstack1.remove(DataComponents.WRITABLE_BOOK_CONTENT); List> list1 = (List>) (List) pages.stream().map((filteredtext1) -> { // CraftBukkit - decompile error @@ -70,7 +70,7 @@ index 236402e35eb04a2c12ed7ef28ce7c78d7be125cf..fd37bfc932fa7102189bbf1c00bd1461 CraftEventFactory.handleEditBookEvent(this.player, slotId, itemstack, itemstack1); // CraftBukkit this.player.getInventory().setItem(slotId, itemstack); // CraftBukkit - event factory updates the hand book } -@@ -1347,6 +1361,16 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -1348,6 +1362,16 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl return this.player.isTextFilteringEnabled() ? Filterable.passThrough(message.filteredOrEmpty()) : Filterable.from(message); } diff --git a/patches/server/0072-Entity-lifespan.patch b/patches/server/0072-Entity-lifespan.patch index 668ceeb3d9..6cd35f666a 100644 --- a/patches/server/0072-Entity-lifespan.patch +++ b/patches/server/0072-Entity-lifespan.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Entity lifespan diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index fd37bfc932fa7102189bbf1c00bd14612f3116e9..c1446e31b608f4496b15cb424581e4ce2efecd78 100644 +index ff96fcf7d039c4bae4d77c9c546486c2312f6ecc..92afa94ce5ae84ddbe0564c57300771126c4fde9 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2922,6 +2922,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -2923,6 +2923,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl AABB axisalignedbb = entity.getBoundingBox(); if (this.player.canInteractWithEntity(axisalignedbb, io.papermc.paper.configuration.GlobalConfiguration.get().misc.clientInteractionLeniencyDistance.or(3.0D))) { // Paper - configurable lenience value for interact range @@ -17,7 +17,7 @@ index fd37bfc932fa7102189bbf1c00bd14612f3116e9..c1446e31b608f4496b15cb424581e4ce private void performInteraction(InteractionHand enumhand, ServerGamePacketListenerImpl.EntityInteraction playerconnection_a, PlayerInteractEntityEvent event) { // CraftBukkit ItemStack itemstack = ServerGamePacketListenerImpl.this.player.getItemInHand(enumhand); diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java -index d2baf9408fd7cc19025d2d6a891acc94e6ec23a7..d845d4a0a2ce99b90d4004146be8db90b9ea64c3 100644 +index b57c362e67d9724fc387d3aa5b8547aef648fe91..0c55e69bbdc673a87b5ac5ee740817aca2434bb6 100644 --- a/src/main/java/net/minecraft/world/entity/Mob.java +++ b/src/main/java/net/minecraft/world/entity/Mob.java @@ -144,6 +144,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab @@ -73,7 +73,7 @@ index d2baf9408fd7cc19025d2d6a891acc94e6ec23a7..d845d4a0a2ce99b90d4004146be8db90 } @Override -@@ -634,6 +657,11 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab +@@ -636,6 +659,11 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab this.aware = nbt.getBoolean("Bukkit.Aware"); } // CraftBukkit end @@ -85,7 +85,7 @@ index d2baf9408fd7cc19025d2d6a891acc94e6ec23a7..d845d4a0a2ce99b90d4004146be8db90 } @Override -@@ -1742,6 +1770,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab +@@ -1744,6 +1772,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab this.playAttackSound(); } diff --git a/patches/server/0091-Add-predicate-to-recipe-s-ExactChoice-ingredient.patch b/patches/server/0091-Add-predicate-to-recipe-s-ExactChoice-ingredient.patch index cf3949cb55..08d1f639c9 100644 --- a/patches/server/0091-Add-predicate-to-recipe-s-ExactChoice-ingredient.patch +++ b/patches/server/0091-Add-predicate-to-recipe-s-ExactChoice-ingredient.patch @@ -5,20 +5,20 @@ Subject: [PATCH] Add predicate to recipe's ExactChoice ingredient diff --git a/src/main/java/net/minecraft/world/item/crafting/Ingredient.java b/src/main/java/net/minecraft/world/item/crafting/Ingredient.java -index 0bd0935e76038e07c063bbfc61fa1a6339c23eed..e38cab89bd58a91cf91044d23900b5d83fa191f6 100644 +index 0b0054b3d5d56ba24e1aee0e3ab56ea5b01a82a8..2e3a834643d56543418e9b9beb9d3448bf059d22 100644 --- a/src/main/java/net/minecraft/world/item/crafting/Ingredient.java +++ b/src/main/java/net/minecraft/world/item/crafting/Ingredient.java -@@ -45,6 +45,7 @@ public final class Ingredient implements StackedContents.IngredientInfo itemStacks; + private java.util.Set itemStacks; // Paper - Improve exact choice recipe ingredients + public Predicate predicate; // Purpur public boolean isExact() { return this.itemStacks != null; -@@ -102,6 +103,11 @@ public final class Ingredient implements StackedContents.IngredientInfo byteAllowed) { diff --git a/patches/server/0118-Add-mobGriefing-bypass-to-everything-affected.patch b/patches/server/0118-Add-mobGriefing-bypass-to-everything-affected.patch index 0bede9123e..933005b6b2 100644 --- a/patches/server/0118-Add-mobGriefing-bypass-to-everything-affected.patch +++ b/patches/server/0118-Add-mobGriefing-bypass-to-everything-affected.patch @@ -18,10 +18,10 @@ index 1add518a30e1f44849aea6c805cf3cef849f1992..fe183dcfb32e915af4c58f8b40c35e34 BlockState iblockdata = Blocks.WITHER_ROSE.defaultBlockState(); diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java -index 263db57683045e99210a68184de382a6d91e0f71..30be625e2f9c84f9ee3dbb68c8fc3806eae8a510 100644 +index 81fb0826a1e4ec3ab36447ec0a4dcbf1196cb441..0846becd1da3b7b311c491be176a3394c258dd2e 100644 --- a/src/main/java/net/minecraft/world/entity/Mob.java +++ b/src/main/java/net/minecraft/world/entity/Mob.java -@@ -714,7 +714,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab +@@ -716,7 +716,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab Level world = this.level(); if (world instanceof ServerLevel worldserver) { diff --git a/patches/server/0120-Add-EntityTeleportHinderedEvent.patch b/patches/server/0120-Add-EntityTeleportHinderedEvent.patch index b2a6cf5685..d12358c54f 100644 --- a/patches/server/0120-Add-EntityTeleportHinderedEvent.patch +++ b/patches/server/0120-Add-EntityTeleportHinderedEvent.patch @@ -83,10 +83,10 @@ index 12c65755f85acce10c2d5359539d64498138127b..c0b6efefc4d4f31602f39afa76f83730 } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 350165d6616a1dfe931d0a35de0dbbd9222da216..75986a13b87c2024c96742fbbab960026b256837 100644 +index cfc85a7089de9e30ac9a703b87440475cc2e2cf0..ad477e53a2a33e47a5bac42eebe46a59ece659ee 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1440,6 +1440,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1441,6 +1441,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { // Paper start - Teleport passenger API // Don't allow teleporting between worlds while keeping passengers if (ignorePassengers && entity.isVehicle() && location.getWorld() != this.getWorld()) { diff --git a/patches/server/0128-Dont-run-with-scissors.patch b/patches/server/0128-Dont-run-with-scissors.patch index c1466c0504..b7b845ad8b 100644 --- a/patches/server/0128-Dont-run-with-scissors.patch +++ b/patches/server/0128-Dont-run-with-scissors.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Dont run with scissors! inspired by https://modrinth.com/mod/dont-run-with-scissors diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 7c58f969d86c87555764afcac56961de7f43e114..4049eeb7d448dfe83b758d268ce1ef8612d32542 100644 +index b4cd58ae2c89cb3875cff2bcbe60511d94a926d4..10757591f1318222f79ff4e3df4c59bacfc41dee 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -1720,6 +1720,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -1721,6 +1721,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl this.player.tryResetCurrentImpulseContext(); } @@ -23,7 +23,7 @@ index 7c58f969d86c87555764afcac56961de7f43e114..4049eeb7d448dfe83b758d268ce1ef86 this.player.checkMovementStatistics(this.player.getX() - d3, this.player.getY() - d4, this.player.getZ() - d5); this.lastGoodX = this.player.getX(); this.lastGoodY = this.player.getY(); -@@ -1759,6 +1766,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -1760,6 +1767,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl } } diff --git a/patches/server/0168-API-for-any-mob-to-burn-daylight.patch b/patches/server/0168-API-for-any-mob-to-burn-daylight.patch index 6ae0aa6a6a..7fc76361ec 100644 --- a/patches/server/0168-API-for-any-mob-to-burn-daylight.patch +++ b/patches/server/0168-API-for-any-mob-to-burn-daylight.patch @@ -6,7 +6,7 @@ Subject: [PATCH] API for any mob to burn daylight Co-authored by: Encode42 diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 60ffa728e6b8c861b0d108d1562150ccb671af33..433dbe3c9350cd55ff22d490e077bf1a31ae83be 100644 +index 3bf381f766c478bdb1e645777bd79ba5e8e3949f..00714b79ed8f5bb1c1e2e27905e38683e7ee2fdb 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -578,6 +578,22 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -100,10 +100,10 @@ index 2a187f1b674a6e8279495921088d5a0620c4e404..33fe6d19b3702d8de987fd9292dfca35 public boolean isSensitiveToWater() { diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java -index 30be625e2f9c84f9ee3dbb68c8fc3806eae8a510..5ce7224afc224698e8b1c200c66a1069aab4458c 100644 +index 0846becd1da3b7b311c491be176a3394c258dd2e..0d68cd513cfed80fcbe011648cc8779beb782aaa 100644 --- a/src/main/java/net/minecraft/world/entity/Mob.java +++ b/src/main/java/net/minecraft/world/entity/Mob.java -@@ -1777,17 +1777,8 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab +@@ -1779,17 +1779,8 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab protected void playAttackSound() {} public boolean isSunBurnTick() { diff --git a/patches/server/0201-Extended-OfflinePlayer-API.patch b/patches/server/0201-Extended-OfflinePlayer-API.patch index 0f9e9914fb..9f924d8c4a 100644 --- a/patches/server/0201-Extended-OfflinePlayer-API.patch +++ b/patches/server/0201-Extended-OfflinePlayer-API.patch @@ -243,10 +243,10 @@ index 94ca0407303c4493ab4928b12ec6ecc75aaca549..a138e1b6b66d99f2035de054137a607a + // Purpur end - OfflinePlayer API } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 75986a13b87c2024c96742fbbab960026b256837..3c76dd383ec0ba19eea19d12902833dc410f96c0 100644 +index ad477e53a2a33e47a5bac42eebe46a59ece659ee..02ef1446ed3ef1bc15949a2bc9dacc842cf2f02d 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -2760,6 +2760,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2761,6 +2761,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player { return this.getHandle().getAbilities().walkingSpeed * 2f; } diff --git a/patches/server/0205-Shift-right-click-to-use-exp-for-mending.patch b/patches/server/0205-Shift-right-click-to-use-exp-for-mending.patch index 1e46b90d4a..69bd0256bd 100644 --- a/patches/server/0205-Shift-right-click-to-use-exp-for-mending.patch +++ b/patches/server/0205-Shift-right-click-to-use-exp-for-mending.patch @@ -36,10 +36,10 @@ index 7315e604a2f9cb068eb5bbca744e44eeabac09c9..88eb3774f688bcff383efa7f113bd0b1 + // Purpur end } diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index f993d33caa44a2d782780c8829a7785ed74b3dcc..3c98be45587f3f6ca6cdc53834ef7dae4962f58d 100644 +index 10757591f1318222f79ff4e3df4c59bacfc41dee..8d52446ddd452a62fa727469f2e191acba1b7d24 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2152,6 +2152,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -2153,6 +2153,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl boolean cancelled; if (movingobjectposition == null || movingobjectposition.getType() != HitResult.Type.BLOCK) { diff --git a/patches/server/0211-UPnP-Port-Forwarding.patch b/patches/server/0211-UPnP-Port-Forwarding.patch index 60498dee5d..f6b112a55b 100644 --- a/patches/server/0211-UPnP-Port-Forwarding.patch +++ b/patches/server/0211-UPnP-Port-Forwarding.patch @@ -5,12 +5,12 @@ Subject: [PATCH] UPnP Port Forwarding diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 36fb238819e529fdecd8dd904c074d7a3a937db2..757cedd57b89a452832f2c9d9e5ed9fb495ca933 100644 +index 53cf0ea7f0b26ce0b69a02a4d10f3027b1d1530f..11a03a0865c52551b1dd95695403caf60d4700c4 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -330,6 +330,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop pluginsBlockingSleep = new java.util.HashSet<>(); // Paper - API to allow/disallow tick sleeping public boolean lagging = false; // Purpur + protected boolean upnp = false; // Purpur diff --git a/patches/server/0249-Add-local-difficulty-api.patch b/patches/server/0249-Add-local-difficulty-api.patch index d4fdbfa338..6081fadd1b 100644 --- a/patches/server/0249-Add-local-difficulty-api.patch +++ b/patches/server/0249-Add-local-difficulty-api.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add local difficulty api diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index a9f7ac8d1f5e184687d53ab3e8b348bb7f4f2ba0..5d0f4395617bcd59aad7cea221f6009d08dc0913 100644 +index 92d9f0ea8f7810ae20d3996f49aefa539b4bcb69..4f3da35084d1c69d1b697196a17f932fedee9b88 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -2384,6 +2384,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -2374,6 +2374,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { return (this.getHandle().getDragonFight() == null) ? null : new CraftDragonBattle(this.getHandle().getDragonFight()); } diff --git a/patches/server/0251-Add-more-logger-output-for-invalid-movement-kicks.patch b/patches/server/0251-Add-more-logger-output-for-invalid-movement-kicks.patch index 977351c714..a103288042 100644 --- a/patches/server/0251-Add-more-logger-output-for-invalid-movement-kicks.patch +++ b/patches/server/0251-Add-more-logger-output-for-invalid-movement-kicks.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add more logger output for invalid movement kicks diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 3c98be45587f3f6ca6cdc53834ef7dae4962f58d..f8438bc2af43ee8883db75503deac10e1e34686e 100644 +index 8d52446ddd452a62fa727469f2e191acba1b7d24..70d314a8d5ff077c337d468482b0f1e130ffdd28 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -756,6 +756,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -16,7 +16,7 @@ index 3c98be45587f3f6ca6cdc53834ef7dae4962f58d..f8438bc2af43ee8883db75503deac10e this.disconnect((Component) Component.translatable("multiplayer.disconnect.invalid_player_movement"), org.bukkit.event.player.PlayerKickEvent.Cause.INVALID_PLAYER_MOVEMENT); // Paper - kick event cause return; } -@@ -1425,7 +1426,15 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -1426,7 +1427,15 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @Override public void handleMovePlayer(ServerboundMovePlayerPacket packet) { PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel()); diff --git a/patches/server/0253-Debug-Marker-API.patch b/patches/server/0253-Debug-Marker-API.patch index e4d7f5de6f..e8910df55c 100644 --- a/patches/server/0253-Debug-Marker-API.patch +++ b/patches/server/0253-Debug-Marker-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Debug Marker API diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 268ab3f175ece52e7da6dfa50573089f49685d68..6b0308d081af880a79c369306e8ad69757bcd6de 100644 +index 82c8dc67fc40e253a4765a215864d40c007de3c2..efb81eec2680fc9ae2b92edead07d1d78fbe2b00 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -1643,6 +1643,42 @@ public final class CraftServer implements Server { @@ -52,10 +52,10 @@ index 268ab3f175ece52e7da6dfa50573089f49685d68..6b0308d081af880a79c369306e8ad697 @Override diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 5d0f4395617bcd59aad7cea221f6009d08dc0913..41077511328a31f39639af1d02e7a3041992676d 100644 +index 4f3da35084d1c69d1b697196a17f932fedee9b88..eb9bb689a52a7e9c95d6f2e07bb16799286e9057 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -2388,6 +2388,42 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -2378,6 +2378,42 @@ public class CraftWorld extends CraftRegionAccessor implements World { public float getLocalDifficultyAt(Location location) { return getHandle().getCurrentDifficultyAt(io.papermc.paper.util.MCUtil.toBlockPosition(location)).getEffectiveDifficulty(); } @@ -99,10 +99,10 @@ index 5d0f4395617bcd59aad7cea221f6009d08dc0913..41077511328a31f39639af1d02e7a304 @Override diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 3c76dd383ec0ba19eea19d12902833dc410f96c0..f63b02573b3d42ae8743f591aff2282ece927e31 100644 +index 02ef1446ed3ef1bc15949a2bc9dacc842cf2f02d..2a2f19d9fe756b9e017cb5640343d2a7852e7ece 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -3614,5 +3614,43 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -3606,5 +3606,43 @@ public class CraftPlayer extends CraftHumanEntity implements Player { public void resetIdleTimer() { getHandle().resetLastActionTime(); } diff --git a/patches/server/0256-Add-death-screen-API.patch b/patches/server/0256-Add-death-screen-API.patch index cfae288b3e..6b62b31933 100644 --- a/patches/server/0256-Add-death-screen-API.patch +++ b/patches/server/0256-Add-death-screen-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add death screen API diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index f63b02573b3d42ae8743f591aff2282ece927e31..8e0136c55e37d1f2732c555eb7c6129eb2b84c19 100644 +index 2a2f19d9fe756b9e017cb5640343d2a7852e7ece..c7e6c7b4a094cd4a2d68332a81409db84bf4ccf5 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -3652,5 +3652,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -3644,5 +3644,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player { if (this.getHandle().connection == null) return; this.getHandle().connection.send(new net.minecraft.network.protocol.common.ClientboundCustomPayloadPacket(new net.minecraft.network.protocol.common.custom.GameTestClearMarkersDebugPayload())); } diff --git a/patches/server/0293-Fire-EntityTeleportHinderedEvent-when-attempting-to-.patch b/patches/server/0293-Fire-EntityTeleportHinderedEvent-when-attempting-to-.patch index 146533dbbc..4dc1337d60 100644 --- a/patches/server/0293-Fire-EntityTeleportHinderedEvent-when-attempting-to-.patch +++ b/patches/server/0293-Fire-EntityTeleportHinderedEvent-when-attempting-to-.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Fire EntityTeleportHinderedEvent when attempting to teleport diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 8e0136c55e37d1f2732c555eb7c6129eb2b84c19..22abd7c837fe35423bd0c9e94107d47156d09266 100644 +index c7e6c7b4a094cd4a2d68332a81409db84bf4ccf5..d43577ee22c5cafb8bd84d96c24292550a52795c 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1462,6 +1462,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1463,6 +1463,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } if (entity.isVehicle() && !ignorePassengers) { // Paper - Teleport API