From 783ea26eeb08be89e68a389da2c413e252a16266 Mon Sep 17 00:00:00 2001 From: violetc <58360096+s-yh-china@users.noreply.github.com> Date: Sun, 31 Dec 2023 01:56:55 +0800 Subject: [PATCH] Update Paper --- build.gradle.kts | 4 ---- gradle.properties | 6 +++--- patches/server/0002-Delete-Timings.patch | 6 +++--- patches/server/0010-Fakeplayer-support.patch | 6 +++--- ...11-Make-shears-in-dispenser-can-unlimited-use.patch | 2 +- patches/server/0018-No-chat-sign.patch | 8 ++++---- ...hrottle-goal-selector-during-inactive-ticking.patch | 2 +- patches/server/0047-Player-operation-limiter.patch | 4 ++-- patches/server/0052-Return-nether-portal-fix.patch | 6 +++--- patches/server/0060-Syncmatica-Protocol.patch | 6 +++--- ...61-Disable-distance-check-for-UseItemOnPacket.patch | 4 ++-- patches/server/0068-Creative-fly-no-clip.patch | 4 ++-- .../server/0073-Elytra-aeronautics-no-chunk-load.patch | 6 +++--- patches/server/0074-Fix-Paper-9372.patch | 10 +++++----- patches/server/0093-Reduce-array-allocations.patch | 8 ++++---- patches/server/0094-Optimize-sun-burn-tick.patch | 4 ++-- patches/server/0111-Replay-Mod-API.patch | 2 +- .../server/0124-Disable-moved-wrongly-threshold.patch | 10 +++++----- 18 files changed, 47 insertions(+), 51 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 277ba20f..8d38fcb5 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,8 +1,4 @@ -import io.papermc.paperweight.tasks.BaseTask import io.papermc.paperweight.util.* -import java.io.ByteArrayOutputStream -import java.nio.file.Path -import java.util.regex.Pattern import kotlin.io.path.* plugins { diff --git a/gradle.properties b/gradle.properties index fad7525d..d7c8537e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,6 +4,6 @@ version=1.20.4-R0.1-SNAPSHOT mcVersion=1.20.4 packageVersion=1_20_R3 org.gradle.jvmargs=-Xmx2G -paperRef=8221b085f91a6ce65701b02fbb6a29e54bcc6023 -preVersion=true -updatingMinecraft=true \ No newline at end of file +paperRef=0ae58c09a15ee1ad307a2b8ef7e8ad735d336651 +preVersion=false +updatingMinecraft=false \ No newline at end of file diff --git a/patches/server/0002-Delete-Timings.patch b/patches/server/0002-Delete-Timings.patch index 60a78db1..ad6f7873 100644 --- a/patches/server/0002-Delete-Timings.patch +++ b/patches/server/0002-Delete-Timings.patch @@ -1578,10 +1578,10 @@ index 6041f1f5151f26d389f946d70f16e1de76db496b..6a07d6bd04dd3f4070a6db83c8a31890 } else if (close) { chunkproviderserver.close(false); } // Paper - rewrite chunk system diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 30ccbab1586a656e0ae41d7406525fb02d9e025b..0046043408e5ec5737857d833f0a43f91d418df0 100644 +index 64255f7db85886421d5029766e8a6d1eadb94cff..abf864b0f4c20ee9c2b52456f931b58495f97fa2 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2391,7 +2391,6 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -2398,7 +2398,6 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl public void handleCommand(String s) { // Paper - private -> public org.spigotmc.AsyncCatcher.catchOp("Command Dispatched Async: " + s); // Paper - Add async catcher @@ -1589,7 +1589,7 @@ index 30ccbab1586a656e0ae41d7406525fb02d9e025b..0046043408e5ec5737857d833f0a43f9 if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot this.LOGGER.info(this.player.getScoreboardName() + " issued server command: " + s); -@@ -2401,20 +2400,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -2408,20 +2407,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl this.cserver.getPluginManager().callEvent(event); if (event.isCancelled()) { diff --git a/patches/server/0010-Fakeplayer-support.patch b/patches/server/0010-Fakeplayer-support.patch index 55708c83..5a21ce3f 100644 --- a/patches/server/0010-Fakeplayer-support.patch +++ b/patches/server/0010-Fakeplayer-support.patch @@ -99,7 +99,7 @@ index 931d77112ad02e712225efe7e0218fadde24400d..3e7bdcfd3d0ba845fef79c02d110d4a5 } diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 0eb3384df396508c3d26d1e155cd0e6d64251346..6f062dc3e48d1c7a1e766f699428b44ef91bace4 100644 +index be05a52be037042c6158100e2ce880b8ed415d53..d9038d85f8a04381a92567acf1c8922d666aa3e8 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java @@ -186,6 +186,7 @@ import org.bukkit.event.player.PlayerTeleportEvent; @@ -156,7 +156,7 @@ index 0eb3384df396508c3d26d1e155cd0e6d64251346..6f062dc3e48d1c7a1e766f699428b44e for (ItemStack item : this.getInventory().getContents()) { if (!item.isEmpty() && !EnchantmentHelper.hasVanishingCurse(item)) { loot.add(new DefaultDrop(item, stack -> this.drop(stack, true, false, false))); // Paper - drop function taken from Inventory#dropAll (don't fire drop event) -@@ -1271,6 +1276,13 @@ public class ServerPlayer extends Player { +@@ -1272,6 +1277,13 @@ public class ServerPlayer extends Player { this.lastSentHealth = -1.0F; this.lastSentFood = -1; @@ -171,7 +171,7 @@ index 0eb3384df396508c3d26d1e155cd0e6d64251346..6f062dc3e48d1c7a1e766f699428b44e PlayerChangedWorldEvent changeEvent = new PlayerChangedWorldEvent(this.getBukkitEntity(), worldserver1.getWorld()); this.level().getCraftServer().getPluginManager().callEvent(changeEvent); diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 0046043408e5ec5737857d833f0a43f91d418df0..68cc14ef2176dd20ede46af3d62ef0797169b87e 100644 +index abf864b0f4c20ee9c2b52456f931b58495f97fa2..ae7cf2b0a90044e93360fc914573c6a549cb6731 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -298,7 +298,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0011-Make-shears-in-dispenser-can-unlimited-use.patch b/patches/server/0011-Make-shears-in-dispenser-can-unlimited-use.patch index 5346512a..e51f010a 100644 --- a/patches/server/0011-Make-shears-in-dispenser-can-unlimited-use.patch +++ b/patches/server/0011-Make-shears-in-dispenser-can-unlimited-use.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Make shears in dispenser can unlimited use diff --git a/src/main/java/net/minecraft/core/dispenser/ShearsDispenseItemBehavior.java b/src/main/java/net/minecraft/core/dispenser/ShearsDispenseItemBehavior.java -index e17090003988ad2c890d48666c2234b14d511345..f3cbb95eed1d85c96bb52e05b5274ed249298d60 100644 +index ec43e8294d7e7112478a2fc1475f0852690a4882..840524c55d52b5ecaf0b1decfdc871c1fd8e0f42 100644 --- a/src/main/java/net/minecraft/core/dispenser/ShearsDispenseItemBehavior.java +++ b/src/main/java/net/minecraft/core/dispenser/ShearsDispenseItemBehavior.java @@ -63,7 +63,7 @@ public class ShearsDispenseItemBehavior extends OptionalDispenseItemBehavior { diff --git a/patches/server/0018-No-chat-sign.patch b/patches/server/0018-No-chat-sign.patch index fe052d67..7eec36de 100644 --- a/patches/server/0018-No-chat-sign.patch +++ b/patches/server/0018-No-chat-sign.patch @@ -41,11 +41,11 @@ index 72a8aa676836fcb3b4578689d16af65e18f55bbe..47a06936a4727c6209a7ad0fb8fb1099 public MessageSignature get(String argumentName) { for(ArgumentSignatures.Entry entry : this.entries) { diff --git a/src/main/java/net/minecraft/network/FriendlyByteBuf.java b/src/main/java/net/minecraft/network/FriendlyByteBuf.java -index b13bc90b28b02f5e80d935bfcba727f92c5e4c4f..15b41328948ae11b16584484f5973b00bb456a13 100644 +index a5bcad412fb1ac3b6a3eee3f4618dc6c1ca66936..a9dbe17dfc1ed81775e5a9500527cdf010f3d223 100644 --- a/src/main/java/net/minecraft/network/FriendlyByteBuf.java +++ b/src/main/java/net/minecraft/network/FriendlyByteBuf.java -@@ -138,6 +138,16 @@ public class FriendlyByteBuf extends ByteBuf { - public void writeJsonWithCodec(Codec codec, T value) { +@@ -143,6 +143,16 @@ public class FriendlyByteBuf extends ByteBuf { + // Paper end - Adventure DataResult dataresult = codec.encodeStart(JsonOps.INSTANCE, value); + // Leaves start - no chat sign @@ -60,7 +60,7 @@ index b13bc90b28b02f5e80d935bfcba727f92c5e4c4f..15b41328948ae11b16584484f5973b00 + this.writeUtf(FriendlyByteBuf.GSON.toJson((JsonElement) Util.getOrThrow(dataresult, (s) -> { return new EncoderException("Failed to encode: " + s + " " + value); - }))); + })), maxLength); // Paper - Adventure diff --git a/src/main/java/net/minecraft/network/protocol/game/ServerboundChatPacket.java b/src/main/java/net/minecraft/network/protocol/game/ServerboundChatPacket.java index d1d2fc0c57523c1abf1e8bfec913c78927c3dafc..50c1b722231c2add72663c475ae9068a35bfd524 100644 --- a/src/main/java/net/minecraft/network/protocol/game/ServerboundChatPacket.java diff --git a/patches/server/0031-Throttle-goal-selector-during-inactive-ticking.patch b/patches/server/0031-Throttle-goal-selector-during-inactive-ticking.patch index 8903e69f..bae967b2 100644 --- a/patches/server/0031-Throttle-goal-selector-during-inactive-ticking.patch +++ b/patches/server/0031-Throttle-goal-selector-during-inactive-ticking.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Throttle goal selector during inactive ticking This patch is Powered by Pufferfish(https://github.com/pufferfish-gg/Pufferfish) diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java -index 5af48151159135b869ec4753bbcf79dd257c1570..339782b10101189fdf70d41330d2e793713d1544 100644 +index e0cf7771488ab0065708d68b4e8550b865af0ed4..dc196d04afa8e74be1a43994212d17b430aad2ee 100644 --- a/src/main/java/net/minecraft/world/entity/Mob.java +++ b/src/main/java/net/minecraft/world/entity/Mob.java @@ -221,11 +221,13 @@ public abstract class Mob extends LivingEntity implements Targeting { diff --git a/patches/server/0047-Player-operation-limiter.patch b/patches/server/0047-Player-operation-limiter.patch index b0188b6f..acbe38ec 100644 --- a/patches/server/0047-Player-operation-limiter.patch +++ b/patches/server/0047-Player-operation-limiter.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Player operation limiter This patch is Powered by plusls-carpet-addition(https://github.com/plusls/plusls-carpet-addition) diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 6f062dc3e48d1c7a1e766f699428b44ef91bace4..75188dbdaf10d60d11f2b76a73ad0fd2c9b7e643 100644 +index d9038d85f8a04381a92567acf1c8922d666aa3e8..b22dd3700c913d0391c8641fca46e89ed5cfff6b 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java @@ -282,6 +282,10 @@ public class ServerPlayer extends Player { @@ -28,7 +28,7 @@ index 6f062dc3e48d1c7a1e766f699428b44ef91bace4..75188dbdaf10d60d11f2b76a73ad0fd2 this.gameMode.tick(); this.wardenSpawnTracker.tick(); --this.spawnInvulnerableTime; -@@ -2767,5 +2772,32 @@ public class ServerPlayer extends Player { +@@ -2768,5 +2773,32 @@ public class ServerPlayer extends Player { public CraftPlayer getBukkitEntity() { return (CraftPlayer) super.getBukkitEntity(); } diff --git a/patches/server/0052-Return-nether-portal-fix.patch b/patches/server/0052-Return-nether-portal-fix.patch index 57b9a6b4..77599b79 100644 --- a/patches/server/0052-Return-nether-portal-fix.patch +++ b/patches/server/0052-Return-nether-portal-fix.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Return nether portal fix This patch is powered by NetherPortalFix(https://github.com/TwelveIterationMods/NetherPortalFix) diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 75188dbdaf10d60d11f2b76a73ad0fd2c9b7e643..e2d54448cc9007e2f056d90b77229a664967789b 100644 +index b22dd3700c913d0391c8641fca46e89ed5cfff6b..ee85716ac98caa2e63f34be26a48d6b75b0179e3 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java @@ -187,6 +187,7 @@ import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause; @@ -17,7 +17,7 @@ index 75188dbdaf10d60d11f2b76a73ad0fd2c9b7e643..e2d54448cc9007e2f056d90b77229a66 // CraftBukkit end public class ServerPlayer extends Player { -@@ -1292,6 +1293,24 @@ public class ServerPlayer extends Player { +@@ -1293,6 +1294,24 @@ public class ServerPlayer extends Player { PlayerChangedWorldEvent changeEvent = new PlayerChangedWorldEvent(this.getBukkitEntity(), worldserver1.getWorld()); this.level().getCraftServer().getPluginManager().callEvent(changeEvent); // CraftBukkit end @@ -42,7 +42,7 @@ index 75188dbdaf10d60d11f2b76a73ad0fd2c9b7e643..e2d54448cc9007e2f056d90b77229a66 } // Paper start if (this.isBlocking()) { -@@ -1344,6 +1363,30 @@ public class ServerPlayer extends Player { +@@ -1345,6 +1364,30 @@ public class ServerPlayer extends Player { protected Optional getExitPortal(ServerLevel worldserver, BlockPos blockposition, boolean flag, WorldBorder worldborder, int searchRadius, boolean canCreatePortal, int createRadius) { // CraftBukkit Optional optional = super.getExitPortal(worldserver, blockposition, flag, worldborder, searchRadius, canCreatePortal, createRadius); // CraftBukkit diff --git a/patches/server/0060-Syncmatica-Protocol.patch b/patches/server/0060-Syncmatica-Protocol.patch index 12111ad8..ba9d0c3a 100644 --- a/patches/server/0060-Syncmatica-Protocol.patch +++ b/patches/server/0060-Syncmatica-Protocol.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Syncmatica Protocol This patch is Powered by Syncmatica(https://github.com/End-Tech/syncmatica) diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 68cc14ef2176dd20ede46af3d62ef0797169b87e..507285757ed8c3997748647947b16b7db62ff5f1 100644 +index ae7cf2b0a90044e93360fc914573c6a549cb6731..eacc68696f8d78114c7129b390e1a1e915f29223 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -313,6 +313,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -17,8 +17,8 @@ index 68cc14ef2176dd20ede46af3d62ef0797169b87e..507285757ed8c3997748647947b16b7d } // CraftBukkit start - add fields -@@ -332,6 +333,8 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl - private boolean hasMoved; // Spigot +@@ -331,6 +332,8 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl + private boolean justTeleported = false; // CraftBukkit end + public final top.leavesmc.leaves.protocol.syncmatica.exchange.ExchangeTarget exchangeTarget; // Leaves - Syncmatica Protocol diff --git a/patches/server/0061-Disable-distance-check-for-UseItemOnPacket.patch b/patches/server/0061-Disable-distance-check-for-UseItemOnPacket.patch index 84eebc4a..8723608b 100644 --- a/patches/server/0061-Disable-distance-check-for-UseItemOnPacket.patch +++ b/patches/server/0061-Disable-distance-check-for-UseItemOnPacket.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Disable distance check for UseItemOnPacket diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 507285757ed8c3997748647947b16b7db62ff5f1..ab64a28775d3b5b57a103e2bedaf6af30e62bca7 100644 +index eacc68696f8d78114c7129b390e1a1e915f29223..6e70d8832ca06367573b0c8066a5d9fe41c0d9cf 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -1932,7 +1932,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -1936,7 +1936,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl Vec3 vec3d2 = vec3d.subtract(vec3d1); double d0 = 1.0000001D; diff --git a/patches/server/0068-Creative-fly-no-clip.patch b/patches/server/0068-Creative-fly-no-clip.patch index 3da2418f..f5b2f5ec 100644 --- a/patches/server/0068-Creative-fly-no-clip.patch +++ b/patches/server/0068-Creative-fly-no-clip.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Creative fly no clip diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java -index 3e597833b57377b855505b8a0f2744801c791f90..d866f957a0ce59588a5b58cc9a974193048cb3d2 100644 +index ccc1caafb0ada52c7b99b7358253826f5390843e..c908ddf5214a6c9a5800fff87f5865b110d24fe1 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java @@ -238,8 +238,8 @@ public abstract class Player extends LivingEntity { @@ -37,7 +37,7 @@ index 3e597833b57377b855505b8a0f2744801c791f90..d866f957a0ce59588a5b58cc9a974193 AABB axisalignedbb; if (this.isPassenger() && !this.getVehicle().isRemoved()) { -@@ -2051,6 +2051,12 @@ public abstract class Player extends LivingEntity { +@@ -2067,6 +2067,12 @@ public abstract class Player extends LivingEntity { @Override public abstract boolean isSpectator(); diff --git a/patches/server/0073-Elytra-aeronautics-no-chunk-load.patch b/patches/server/0073-Elytra-aeronautics-no-chunk-load.patch index aceb163f..7354b080 100644 --- a/patches/server/0073-Elytra-aeronautics-no-chunk-load.patch +++ b/patches/server/0073-Elytra-aeronautics-no-chunk-load.patch @@ -45,10 +45,10 @@ index 24936f6b97a2c42259fcb6a9e914fe1175cce241..2e3061b3874764fa2bde068486fa0c03 SectionPos sectionposition = player.getLastSectionPos(); diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index ab64a28775d3b5b57a103e2bedaf6af30e62bca7..c70597690364e044a0d4231eb2895cc5bf35820a 100644 +index 6e70d8832ca06367573b0c8066a5d9fe41c0d9cf..9be579fae145329196c33d2c23c7bbd55470c549 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -543,7 +543,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -549,7 +549,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl speed *= 2f; // TODO: Get the speed of the vehicle instead of the player // Paper start - Prevent moving into unloaded chunks @@ -85,7 +85,7 @@ index e4ad454fed1d4f615621c7973598f8106f57b5ab..c555922aaf678261fa67403194b3df08 } diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java -index d866f957a0ce59588a5b58cc9a974193048cb3d2..fd4be9152fa49b76b2aa9ff79b1eb993582b090a 100644 +index c908ddf5214a6c9a5800fff87f5865b110d24fe1..82b73e4080ee8a1883847db378e373bfde7e8e1e 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java @@ -183,6 +183,7 @@ public abstract class Player extends LivingEntity { diff --git a/patches/server/0074-Fix-Paper-9372.patch b/patches/server/0074-Fix-Paper-9372.patch index 95da5830..3b7c311b 100644 --- a/patches/server/0074-Fix-Paper-9372.patch +++ b/patches/server/0074-Fix-Paper-9372.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Fix Paper#9372 This patch is Powered by Pufferfish(https://github.com/pufferfish-gg/Pufferfish) diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index e2d54448cc9007e2f056d90b77229a664967789b..0d2ace4bc177ed975b6bf0cbe2e3eb8d691c9c01 100644 +index ee85716ac98caa2e63f34be26a48d6b75b0179e3..297d51fada6e89980d0daccdb636dcc3aef3e6cf 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -1263,6 +1263,7 @@ public class ServerPlayer extends Player { +@@ -1264,6 +1264,7 @@ public class ServerPlayer extends Player { this.setServerLevel(worldserver); this.connection.teleport(exit); // CraftBukkit - use internal teleport without event this.connection.resetPosition(); @@ -17,7 +17,7 @@ index e2d54448cc9007e2f056d90b77229a664967789b..0d2ace4bc177ed975b6bf0cbe2e3eb8d worldserver.addDuringPortalTeleport(this); worldserver1.getProfiler().pop(); this.triggerDimensionChangeTriggers(worldserver1); -@@ -2076,6 +2077,7 @@ public class ServerPlayer extends Player { +@@ -2077,6 +2078,7 @@ public class ServerPlayer extends Player { public void moveTo(double x, double y, double z) { super.moveTo(x, y, z); this.connection.resetPosition(); @@ -25,7 +25,7 @@ index e2d54448cc9007e2f056d90b77229a664967789b..0d2ace4bc177ed975b6bf0cbe2e3eb8d } @Override -@@ -2322,6 +2324,7 @@ public class ServerPlayer extends Player { +@@ -2323,6 +2325,7 @@ public class ServerPlayer extends Player { this.connection.send(new ClientboundSetCameraPacket(this.camera)); this.connection.resetPosition(); @@ -33,7 +33,7 @@ index e2d54448cc9007e2f056d90b77229a664967789b..0d2ace4bc177ed975b6bf0cbe2e3eb8d } } -@@ -2761,6 +2764,7 @@ public class ServerPlayer extends Player { +@@ -2762,6 +2765,7 @@ public class ServerPlayer extends Player { public void forceSetPositionRotation(double x, double y, double z, float yaw, float pitch) { this.moveTo(x, y, z, yaw, pitch); this.connection.resetPosition(); diff --git a/patches/server/0093-Reduce-array-allocations.patch b/patches/server/0093-Reduce-array-allocations.patch index 45b4055d..4bf6df9f 100644 --- a/patches/server/0093-Reduce-array-allocations.patch +++ b/patches/server/0093-Reduce-array-allocations.patch @@ -257,7 +257,7 @@ index ae6bb8a2c9970ba7bd4d0d2d7debf4524268e487..eecc757120b026b6728d033761120606 return ret; } diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index c70597690364e044a0d4231eb2895cc5bf35820a..6950e1d1eef91141190db83b82debcd11dd220e8 100644 +index 9be579fae145329196c33d2c23c7bbd55470c549..143fb847691645dc5c36fb207dee8cc694cae880 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -243,6 +243,7 @@ import org.bukkit.inventory.EquipmentSlot; @@ -268,7 +268,7 @@ index c70597690364e044a0d4231eb2895cc5bf35820a..6950e1d1eef91141190db83b82debcd1 public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl implements ServerGamePacketListener, ServerPlayerConnection, TickablePacketListener { -@@ -783,13 +784,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -781,13 +782,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl // PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel()); // Paper - run this async // CraftBukkit start if (this.chatSpamTickCount.addAndGet(io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.tabSpamIncrement) > io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.tabSpamLimit && !this.server.getPlayerList().isOp(this.player.getGameProfile())) { // Paper start - split and make configurable @@ -284,7 +284,7 @@ index c70597690364e044a0d4231eb2895cc5bf35820a..6950e1d1eef91141190db83b82debcd1 return; } // Paper end -@@ -3202,7 +3203,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -3209,7 +3210,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl // Paper start if (!org.bukkit.Bukkit.isPrimaryThread()) { if (this.recipeSpamPackets.addAndGet(io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.recipeSpamIncrement) > io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.recipeSpamLimit) { @@ -409,7 +409,7 @@ index ab8e19e67f173a6c05b4895b3fa78a1eb2b13675..7e6f28c0d10e70acdaedb06314f1f5fc for (int j = 0; j < i; ++j) { diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java -index 339782b10101189fdf70d41330d2e793713d1544..a4193814174821614e8c47d7662d567a352102bc 100644 +index dc196d04afa8e74be1a43994212d17b430aad2ee..4a8a4a6ffa781a59035f34d2f10ef6b1172a9efa 100644 --- a/src/main/java/net/minecraft/world/entity/Mob.java +++ b/src/main/java/net/minecraft/world/entity/Mob.java @@ -1082,7 +1082,7 @@ public abstract class Mob extends LivingEntity implements Targeting { diff --git a/patches/server/0094-Optimize-sun-burn-tick.patch b/patches/server/0094-Optimize-sun-burn-tick.patch index 8e2686cf..ffa58d41 100644 --- a/patches/server/0094-Optimize-sun-burn-tick.patch +++ b/patches/server/0094-Optimize-sun-burn-tick.patch @@ -34,10 +34,10 @@ index c555922aaf678261fa67403194b3df08ab390e15..595fd0bd92714b262db500dfafa6b651 public void absMoveTo(double x, double y, double z, float yaw, float pitch) { this.absMoveTo(x, y, z); diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java -index a4193814174821614e8c47d7662d567a352102bc..b24076ebe434b510a3a01b99dd41dbb481f4cf66 100644 +index 4a8a4a6ffa781a59035f34d2f10ef6b1172a9efa..3fd75473811cb373c8cc13aeb8f6f8c875c4521a 100644 --- a/src/main/java/net/minecraft/world/entity/Mob.java +++ b/src/main/java/net/minecraft/world/entity/Mob.java -@@ -1712,15 +1712,41 @@ public abstract class Mob extends LivingEntity implements Targeting { +@@ -1716,15 +1716,41 @@ public abstract class Mob extends LivingEntity implements Targeting { } diff --git a/patches/server/0111-Replay-Mod-API.patch b/patches/server/0111-Replay-Mod-API.patch index 5eb540e0..4bd5f552 100644 --- a/patches/server/0111-Replay-Mod-API.patch +++ b/patches/server/0111-Replay-Mod-API.patch @@ -107,7 +107,7 @@ index f941e7add46e690e21d39111bed520df9156f154..5ea28c20b34b46eb68fb8a2d468ea009 } // Leaves end - bot can't get advancement diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 6950e1d1eef91141190db83b82debcd11dd220e8..a6a579a98b5cd814223b3ba32f699573d97a9255 100644 +index 143fb847691645dc5c36fb207dee8cc694cae880..9776c4e3ff6327592322ca441ef8fc2e9022db8d 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -300,7 +300,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0124-Disable-moved-wrongly-threshold.patch b/patches/server/0124-Disable-moved-wrongly-threshold.patch index d13859ff..46cf2ed4 100644 --- a/patches/server/0124-Disable-moved-wrongly-threshold.patch +++ b/patches/server/0124-Disable-moved-wrongly-threshold.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Disable moved wrongly threshold diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index a6a579a98b5cd814223b3ba32f699573d97a9255..6d45aaedbf692dd261f7c2279ec4fb711ee38dc9 100644 +index 9776c4e3ff6327592322ca441ef8fc2e9022db8d..05cf9062de1398c2285dd041a5076d397430c368 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -553,7 +553,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -559,7 +559,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl } // Paper end @@ -17,7 +17,7 @@ index a6a579a98b5cd814223b3ba32f699573d97a9255..6d45aaedbf692dd261f7c2279ec4fb71 // CraftBukkit end ServerGamePacketListenerImpl.LOGGER.warn("{} (vehicle of {}) moved too quickly! {},{},{}", new Object[]{entity.getName().getString(), this.player.getName().getString(), d6, d7, d8}); this.send(new ClientboundMoveVehiclePacket(entity)); -@@ -589,7 +589,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -595,7 +595,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl d10 = d6 * d6 + d7 * d7 + d8 * d8; boolean flag2 = false; @@ -26,7 +26,7 @@ index a6a579a98b5cd814223b3ba32f699573d97a9255..6d45aaedbf692dd261f7c2279ec4fb71 flag2 = true; // Paper - diff on change, this should be moved wrongly ServerGamePacketListenerImpl.LOGGER.warn("{} (vehicle of {}) moved wrongly! {}", new Object[]{entity.getName().getString(), this.player.getName().getString(), Math.sqrt(d10)}); } -@@ -1427,7 +1427,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -1426,7 +1426,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl io.papermc.paper.event.player.PlayerFailMoveEvent event = fireFailMove(io.papermc.paper.event.player.PlayerFailMoveEvent.FailReason.MOVED_TOO_QUICKLY, toX, toY, toZ, toYaw, toPitch, true); if (!event.isAllowed()) { @@ -35,7 +35,7 @@ index a6a579a98b5cd814223b3ba32f699573d97a9255..6d45aaedbf692dd261f7c2279ec4fb71 ServerGamePacketListenerImpl.LOGGER.warn("{} moved too quickly! {},{},{}", new Object[]{this.player.getName().getString(), d6, d7, d8}); this.teleport(this.player.getX(), this.player.getY(), this.player.getZ(), this.player.getYRot(), this.player.getXRot()); return; -@@ -1497,7 +1497,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -1496,7 +1496,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl d10 = d6 * d6 + d7 * d7 + d8 * d8; boolean flag2 = false;