diff --git a/build-data/dev-imports.txt b/build-data/dev-imports.txt index 2a6e32ff20..286aeeaaa9 100644 --- a/build-data/dev-imports.txt +++ b/build-data/dev-imports.txt @@ -9,4 +9,3 @@ # minecraft net.minecraft.world.level.entity.LevelEntityGetterAdapter # minecraft net/minecraft/world/level/entity/LevelEntityGetter.java -minecraft net.minecraft.WorldVersion diff --git a/patches/unapplied/server/0154-Ocelot-despawns-should-honor-nametags-and-leash.patch b/patches/server/0154-Ocelot-despawns-should-honor-nametags-and-leash.patch similarity index 90% rename from patches/unapplied/server/0154-Ocelot-despawns-should-honor-nametags-and-leash.patch rename to patches/server/0154-Ocelot-despawns-should-honor-nametags-and-leash.patch index eeea627ee3..b5173d97af 100644 --- a/patches/unapplied/server/0154-Ocelot-despawns-should-honor-nametags-and-leash.patch +++ b/patches/server/0154-Ocelot-despawns-should-honor-nametags-and-leash.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Ocelot despawns should honor nametags and leash diff --git a/src/main/java/net/minecraft/world/entity/animal/Ocelot.java b/src/main/java/net/minecraft/world/entity/animal/Ocelot.java -index 49cd7fea60d3d962e88a1380608e1b7174d44c28..5ad029e3c1eaeae33784b55d04181cdd119ef8c0 100644 +index 290a20bf54b3651c1c7cced04041a1aa1224bd01..f889e86bd6355ed72b85bf322d09ac2be4fb4954 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Ocelot.java +++ b/src/main/java/net/minecraft/world/entity/animal/Ocelot.java @@ -133,7 +133,7 @@ public class Ocelot extends Animal { diff --git a/patches/unapplied/server/0155-Reset-spawner-timer-when-spawner-event-is-cancelled.patch b/patches/server/0155-Reset-spawner-timer-when-spawner-event-is-cancelled.patch similarity index 92% rename from patches/unapplied/server/0155-Reset-spawner-timer-when-spawner-event-is-cancelled.patch rename to patches/server/0155-Reset-spawner-timer-when-spawner-event-is-cancelled.patch index eac12bfb53..75f8dacaf9 100644 --- a/patches/unapplied/server/0155-Reset-spawner-timer-when-spawner-event-is-cancelled.patch +++ b/patches/server/0155-Reset-spawner-timer-when-spawner-event-is-cancelled.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Reset spawner timer when spawner event is cancelled diff --git a/src/main/java/net/minecraft/world/level/BaseSpawner.java b/src/main/java/net/minecraft/world/level/BaseSpawner.java -index 7e436a2cbf1920c985cb9febf1839adc589c2619..b3df6184b1b7f7e3b5cf87c76acb7f103e0dc1db 100644 +index faa4b1bfe8dcd2dcf897470964e7d0619bfcffaf..bd85887e4497be2f8aeccc6c0260a96a3b9c615f 100644 --- a/src/main/java/net/minecraft/world/level/BaseSpawner.java +++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java @@ -164,6 +164,7 @@ public abstract class BaseSpawner { diff --git a/patches/unapplied/server/0156-Allow-specifying-a-custom-authentication-servers-dow.patch b/patches/server/0156-Allow-specifying-a-custom-authentication-servers-dow.patch similarity index 93% rename from patches/unapplied/server/0156-Allow-specifying-a-custom-authentication-servers-dow.patch rename to patches/server/0156-Allow-specifying-a-custom-authentication-servers-dow.patch index 0093a6dd86..b579d1f764 100644 --- a/patches/unapplied/server/0156-Allow-specifying-a-custom-authentication-servers-dow.patch +++ b/patches/server/0156-Allow-specifying-a-custom-authentication-servers-dow.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Allow specifying a custom "authentication servers down" kick diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -index 897b72d230976594c33cdb80706e9ce594d0b0f5..3813f62907e6582b5fa310d3df750f4a460188d4 100644 +index bab2b06992800885dca42868186163a712ef9d73..06f3e1f42da85a54187f3decc35c338a3eeb8de4 100644 --- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java @@ -294,7 +294,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, diff --git a/patches/unapplied/server/0157-Handle-plugin-prefixes-using-Log4J-configuration.patch b/patches/server/0157-Handle-plugin-prefixes-using-Log4J-configuration.patch similarity index 97% rename from patches/unapplied/server/0157-Handle-plugin-prefixes-using-Log4J-configuration.patch rename to patches/server/0157-Handle-plugin-prefixes-using-Log4J-configuration.patch index 2738068841..4b5eaae940 100644 --- a/patches/unapplied/server/0157-Handle-plugin-prefixes-using-Log4J-configuration.patch +++ b/patches/server/0157-Handle-plugin-prefixes-using-Log4J-configuration.patch @@ -15,7 +15,7 @@ This may cause additional prefixes to be disabled for plugins bypassing the plugin logger. diff --git a/build.gradle.kts b/build.gradle.kts -index 26987f66704ae01dc25edc52734c95b9b73f4b57..c909ad3e263cdce6766dcc2ac64412effaa9a784 100644 +index 3e8f983cd7c69e9a95bcd863349adaf22be85128..2134a7d28cdf1a1b6ef50d4978e80e4411cf3c5a 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -17,7 +17,7 @@ dependencies { diff --git a/patches/unapplied/server/0158-Improve-Log4J-Configuration-Plugin-Loggers.patch b/patches/server/0158-Improve-Log4J-Configuration-Plugin-Loggers.patch similarity index 100% rename from patches/unapplied/server/0158-Improve-Log4J-Configuration-Plugin-Loggers.patch rename to patches/server/0158-Improve-Log4J-Configuration-Plugin-Loggers.patch diff --git a/patches/unapplied/server/0159-Add-PlayerJumpEvent.patch b/patches/server/0159-Add-PlayerJumpEvent.patch similarity index 94% rename from patches/unapplied/server/0159-Add-PlayerJumpEvent.patch rename to patches/server/0159-Add-PlayerJumpEvent.patch index 1d8f26df9a..504ba8fd21 100644 --- a/patches/unapplied/server/0159-Add-PlayerJumpEvent.patch +++ b/patches/server/0159-Add-PlayerJumpEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add PlayerJumpEvent diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 3757be5d859ca388569b391df0b9bddd87181265..95da0857b94d48830d4528b72370a18c244cae04 100644 +index 38a45efcd2ff3cba9d2e15d7b6939c5ec873a1c5..5c60baafd997aed3168d60284dcbb2a3e002029c 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -1285,7 +1285,34 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1287,7 +1287,34 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic boolean flag = d8 > 0.0D; if (this.player.isOnGround() && !packet.isOnGround() && flag) { diff --git a/patches/unapplied/server/0160-handle-ServerboundKeepAlivePacket-async.patch b/patches/server/0160-handle-ServerboundKeepAlivePacket-async.patch similarity index 92% rename from patches/unapplied/server/0160-handle-ServerboundKeepAlivePacket-async.patch rename to patches/server/0160-handle-ServerboundKeepAlivePacket-async.patch index b282d59bc8..00e1ce0524 100644 --- a/patches/unapplied/server/0160-handle-ServerboundKeepAlivePacket-async.patch +++ b/patches/server/0160-handle-ServerboundKeepAlivePacket-async.patch @@ -15,10 +15,10 @@ also adding some additional logging in order to help work out what is causing random disconnections for clients. diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 95da0857b94d48830d4528b72370a18c244cae04..9d764b32b669c8970ac472faa3000f7a95d20342 100644 +index 5c60baafd997aed3168d60284dcbb2a3e002029c..f52ed21255e2ae5efed2a095a220d132b3ef91f6 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -3128,14 +3128,18 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3137,14 +3137,18 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @Override public void handleKeepAlive(ServerboundKeepAlivePacket packet) { diff --git a/patches/unapplied/server/0161-Expose-client-protocol-version-and-virtual-host.patch b/patches/server/0161-Expose-client-protocol-version-and-virtual-host.patch similarity index 89% rename from patches/unapplied/server/0161-Expose-client-protocol-version-and-virtual-host.patch rename to patches/server/0161-Expose-client-protocol-version-and-virtual-host.patch index f5e11dd5f1..b7c175ec0b 100644 --- a/patches/unapplied/server/0161-Expose-client-protocol-version-and-virtual-host.patch +++ b/patches/server/0161-Expose-client-protocol-version-and-virtual-host.patch @@ -60,10 +60,10 @@ index 0000000000000000000000000000000000000000..a5a7624f1f372a26b982836cd31cff15 + +} diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java -index 463d54c6c808808d3d7fe6d5303be48844bb4444..8774d3f1a1b0019751e515ad94c85ba2f11e80c7 100644 +index da13fd2cde9b54ab5bf87fbb4e90b5da47b6b8f2..07b2d28c5cba543b104ade6a180b0940a794e08c 100644 --- a/src/main/java/net/minecraft/network/Connection.java +++ b/src/main/java/net/minecraft/network/Connection.java -@@ -112,6 +112,10 @@ public class Connection extends SimpleChannelInboundHandler> { +@@ -114,6 +114,10 @@ public class Connection extends SimpleChannelInboundHandler> { } } // Paper end - add pending task queue @@ -75,10 +75,10 @@ index 463d54c6c808808d3d7fe6d5303be48844bb4444..8774d3f1a1b0019751e515ad94c85ba2 public Connection(PacketFlow side) { this.receiving = side; diff --git a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java -index 8284d49c8e30645d00be952c847bab7ce5753d78..a738b79e775a0a4abed1a05e12495d85f3de14bb 100644 +index 2be1bd39ee1341128f02e38afe5698b837735827..cca08b8c6e1e15f13326a2a7e33e7f3225ad894b 100644 --- a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java -@@ -154,6 +154,10 @@ public class ServerHandshakePacketListenerImpl implements ServerHandshakePacketL +@@ -157,6 +157,10 @@ public class ServerHandshakePacketListenerImpl implements ServerHandshakePacketL throw new UnsupportedOperationException("Invalid intention " + packet.getIntention()); } @@ -90,10 +90,10 @@ index 8284d49c8e30645d00be952c847bab7ce5753d78..a738b79e775a0a4abed1a05e12495d85 @Override diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index aa81018c455629659df34802002105966bd89de3..dfc5a445744520388bd09cf4a68a232885c6e2c9 100644 +index 981ac7ad6efb4024216a0967fd4c2f01245a8816..75017f7464247a4766859250453954c4b775d36f 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -301,6 +301,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -302,6 +302,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } } diff --git a/patches/unapplied/server/0162-revert-serverside-behavior-of-keepalives.patch b/patches/server/0162-revert-serverside-behavior-of-keepalives.patch similarity index 93% rename from patches/unapplied/server/0162-revert-serverside-behavior-of-keepalives.patch rename to patches/server/0162-revert-serverside-behavior-of-keepalives.patch index 04c5c545ba..ea1cbb78e9 100644 --- a/patches/unapplied/server/0162-revert-serverside-behavior-of-keepalives.patch +++ b/patches/server/0162-revert-serverside-behavior-of-keepalives.patch @@ -17,10 +17,10 @@ from networking or during connections flood of chunk packets on slower clients, at the cost of dead connections being kept open for longer. diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 9d764b32b669c8970ac472faa3000f7a95d20342..4c978604cdbc1f6a1590dc13951a0f0963901fae 100644 +index f52ed21255e2ae5efed2a095a220d132b3ef91f6..e2e640149913db7951d5c90c084bdb24f9257e8b 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -255,7 +255,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -257,7 +257,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic public ServerPlayer player; private int tickCount; private int ackBlockChangesUpTo = -1; @@ -29,7 +29,7 @@ index 9d764b32b669c8970ac472faa3000f7a95d20342..4c978604cdbc1f6a1590dc13951a0f09 private boolean keepAlivePending; private long keepAliveChallenge; // CraftBukkit start - multithreaded fields -@@ -293,6 +293,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -295,6 +295,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic private final LastSeenMessagesValidator lastSeenMessages; private final MessageSignatureCache messageSignatureCache; private final FutureChain chatMessageChain; @@ -37,7 +37,7 @@ index 9d764b32b669c8970ac472faa3000f7a95d20342..4c978604cdbc1f6a1590dc13951a0f09 public ServerGamePacketListenerImpl(MinecraftServer server, Connection connection, ServerPlayer player) { this.lastChatTimeStamp = new AtomicReference(Instant.EPOCH); -@@ -384,18 +385,25 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -386,18 +387,25 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } this.server.getProfiler().push("keepAlive"); diff --git a/patches/unapplied/server/0163-Send-attack-SoundEffects-only-to-players-who-can-see.patch b/patches/server/0163-Send-attack-SoundEffects-only-to-players-who-can-see.patch similarity index 92% rename from patches/unapplied/server/0163-Send-attack-SoundEffects-only-to-players-who-can-see.patch rename to patches/server/0163-Send-attack-SoundEffects-only-to-players-who-can-see.patch index 340f596b6f..25a1cc8ed7 100644 --- a/patches/unapplied/server/0163-Send-attack-SoundEffects-only-to-players-who-can-see.patch +++ b/patches/server/0163-Send-attack-SoundEffects-only-to-players-who-can-see.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Send attack SoundEffects only to players who can see the 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 095d459962841f7247a9365aff3bdf83bc0b3589..4066cde038732fadad753b0b5a1ca14d95aee0b0 100644 +index f98e25965c9d8fe348a209ef8d2a2109cd2294f2..32ee62d4d8d0cdd4719959fc55a40d2673a9a744 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java -@@ -1228,7 +1228,7 @@ public abstract class Player extends LivingEntity { +@@ -1227,7 +1227,7 @@ public abstract class Player extends LivingEntity { int i = b0 + EnchantmentHelper.getKnockbackBonus(this); if (this.isSprinting() && flag) { @@ -18,7 +18,7 @@ index 095d459962841f7247a9365aff3bdf83bc0b3589..4066cde038732fadad753b0b5a1ca14d ++i; flag1 = true; } -@@ -1303,7 +1303,7 @@ public abstract class Player extends LivingEntity { +@@ -1302,7 +1302,7 @@ public abstract class Player extends LivingEntity { } } @@ -27,7 +27,7 @@ index 095d459962841f7247a9365aff3bdf83bc0b3589..4066cde038732fadad753b0b5a1ca14d this.sweepAttack(); } -@@ -1331,15 +1331,15 @@ public abstract class Player extends LivingEntity { +@@ -1330,15 +1330,15 @@ public abstract class Player extends LivingEntity { } if (flag2) { @@ -46,7 +46,7 @@ index 095d459962841f7247a9365aff3bdf83bc0b3589..4066cde038732fadad753b0b5a1ca14d } } -@@ -1391,7 +1391,7 @@ public abstract class Player extends LivingEntity { +@@ -1390,7 +1390,7 @@ public abstract class Player extends LivingEntity { this.causeFoodExhaustion(level.spigotConfig.combatExhaustion, EntityExhaustionEvent.ExhaustionReason.ATTACK); // CraftBukkit - EntityExhaustionEvent // Spigot - Change to use configurable value } else { @@ -55,7 +55,7 @@ index 095d459962841f7247a9365aff3bdf83bc0b3589..4066cde038732fadad753b0b5a1ca14d if (flag4) { target.clearFire(); } -@@ -1843,6 +1843,14 @@ public abstract class Player extends LivingEntity { +@@ -1838,6 +1838,14 @@ public abstract class Player extends LivingEntity { public int getXpNeededForNextLevel() { return this.experienceLevel >= 30 ? 112 + (this.experienceLevel - 30) * 9 : (this.experienceLevel >= 15 ? 37 + (this.experienceLevel - 15) * 5 : 7 + this.experienceLevel * 2); } diff --git a/patches/unapplied/server/0164-Add-PlayerArmorChangeEvent.patch b/patches/server/0164-Add-PlayerArmorChangeEvent.patch similarity index 89% rename from patches/unapplied/server/0164-Add-PlayerArmorChangeEvent.patch rename to patches/server/0164-Add-PlayerArmorChangeEvent.patch index 877cab1622..a9e743e1b2 100644 --- a/patches/unapplied/server/0164-Add-PlayerArmorChangeEvent.patch +++ b/patches/server/0164-Add-PlayerArmorChangeEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerArmorChangeEvent diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index b6aaebb5359c8162359b377b3485c3fcf91587e1..6d599fb38607cf841eef6d48bcaad81b378f667e 100644 +index 2cd9c02fd664e263d9dae030d2c438a082c9e1b4..5ae5f58a6b521318703cf8ba044044992f0ef3f9 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -1,5 +1,6 @@ @@ -15,7 +15,7 @@ index b6aaebb5359c8162359b377b3485c3fcf91587e1..6d599fb38607cf841eef6d48bcaad81b import com.google.common.base.Objects; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -@@ -3019,6 +3020,13 @@ public abstract class LivingEntity extends Entity { +@@ -2987,6 +2988,13 @@ public abstract class LivingEntity extends Entity implements Attackable { ItemStack itemstack1 = this.getItemBySlot(enumitemslot); if (this.equipmentHasChanged(itemstack, itemstack1)) { diff --git a/patches/unapplied/server/0165-Prevent-logins-from-being-processed-when-the-player-.patch b/patches/server/0165-Prevent-logins-from-being-processed-when-the-player-.patch similarity index 92% rename from patches/unapplied/server/0165-Prevent-logins-from-being-processed-when-the-player-.patch rename to patches/server/0165-Prevent-logins-from-being-processed-when-the-player-.patch index 6e007eef98..a1ad28135c 100644 --- a/patches/unapplied/server/0165-Prevent-logins-from-being-processed-when-the-player-.patch +++ b/patches/server/0165-Prevent-logins-from-being-processed-when-the-player-.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Prevent logins from being processed when the player has diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -index 3813f62907e6582b5fa310d3df750f4a460188d4..82b1bdc0e4bce2762fa226fb54d9945dc1e5c736 100644 +index 06f3e1f42da85a54187f3decc35c338a3eeb8de4..9607c3297c1a977cb33fb730eacb35ce9604b74c 100644 --- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java @@ -78,7 +78,11 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, diff --git a/patches/unapplied/server/0166-Fix-MC-117075-TE-Unload-Lag-Spike.patch b/patches/server/0166-Fix-MC-117075-TE-Unload-Lag-Spike.patch similarity index 88% rename from patches/unapplied/server/0166-Fix-MC-117075-TE-Unload-Lag-Spike.patch rename to patches/server/0166-Fix-MC-117075-TE-Unload-Lag-Spike.patch index 6e9daf1b7c..a8def578b2 100644 --- a/patches/unapplied/server/0166-Fix-MC-117075-TE-Unload-Lag-Spike.patch +++ b/patches/server/0166-Fix-MC-117075-TE-Unload-Lag-Spike.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix MC-117075: TE Unload Lag Spike diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 94e527fa7db9822a15711c80107a2d99eacbaac5..edb12eb2a567febe01dd3160b193b0d8a7d17270 100644 +index 35eecb719a813fda6113da24a858188aef31466b..bc0b693b260368e1876bf3cc18a919acfaaf324d 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -722,6 +722,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -728,6 +728,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable { // Spigot start // Iterator iterator = this.blockEntityTickers.iterator(); int tilesThisCycle = 0; @@ -17,7 +17,7 @@ index 94e527fa7db9822a15711c80107a2d99eacbaac5..edb12eb2a567febe01dd3160b193b0d8 for (tileTickPosition = 0; tileTickPosition < this.blockEntityTickers.size(); tileTickPosition++) { // Paper - Disable tick limiters this.tileTickPosition = (this.tileTickPosition < this.blockEntityTickers.size()) ? this.tileTickPosition : 0; TickingBlockEntity tickingblockentity = (TickingBlockEntity) this.blockEntityTickers.get(tileTickPosition); -@@ -729,7 +731,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -735,7 +737,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable { if (tickingblockentity == null) { this.getCraftServer().getLogger().severe("Spigot has detected a null entity and has removed it, preventing a crash"); tilesThisCycle--; @@ -25,7 +25,7 @@ index 94e527fa7db9822a15711c80107a2d99eacbaac5..edb12eb2a567febe01dd3160b193b0d8 continue; } // Spigot end -@@ -737,12 +738,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -743,12 +744,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable { if (tickingblockentity.isRemoved()) { // Spigot start tilesThisCycle--; diff --git a/patches/unapplied/server/0167-use-CB-BlockState-implementations-for-captured-block.patch b/patches/server/0167-use-CB-BlockState-implementations-for-captured-block.patch similarity index 91% rename from patches/unapplied/server/0167-use-CB-BlockState-implementations-for-captured-block.patch rename to patches/server/0167-use-CB-BlockState-implementations-for-captured-block.patch index 12c290db14..6f0c6755d7 100644 --- a/patches/unapplied/server/0167-use-CB-BlockState-implementations-for-captured-block.patch +++ b/patches/server/0167-use-CB-BlockState-implementations-for-captured-block.patch @@ -18,10 +18,10 @@ the blockstate that will be valid for restoration, as opposed to dropping information on restoration when the event is cancelled. diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index edb12eb2a567febe01dd3160b193b0d8a7d17270..7b4fe58cb6b9e0b4b9a09c79a5385c785983c955 100644 +index bc0b693b260368e1876bf3cc18a919acfaaf324d..7c8069e237a41bf5d9fc09199ff1ac247e245d9d 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -151,7 +151,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -155,7 +155,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { public boolean preventPoiUpdated = false; // CraftBukkit - SPIGOT-5710 public boolean captureBlockStates = false; public boolean captureTreeGeneration = false; @@ -30,7 +30,7 @@ index edb12eb2a567febe01dd3160b193b0d8a7d17270..7b4fe58cb6b9e0b4b9a09c79a5385c78 public Map capturedTileEntities = new HashMap<>(); public List captureDrops; public final it.unimi.dsi.fastutil.objects.Object2LongOpenHashMap ticksPerSpawnCategory = new it.unimi.dsi.fastutil.objects.Object2LongOpenHashMap<>(); -@@ -380,7 +380,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -386,7 +386,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { public boolean setBlock(BlockPos pos, BlockState state, int flags, int maxUpdateDepth) { // CraftBukkit start - tree generation if (this.captureTreeGeneration) { @@ -39,7 +39,7 @@ index edb12eb2a567febe01dd3160b193b0d8a7d17270..7b4fe58cb6b9e0b4b9a09c79a5385c78 if (blockstate == null) { blockstate = CapturedBlockState.getTreeBlockState(this, pos, flags); this.capturedBlockStates.put(pos.immutable(), blockstate); -@@ -400,7 +400,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -406,7 +406,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable { // CraftBukkit start - capture blockstates boolean captured = false; if (this.captureBlockStates && !this.capturedBlockStates.containsKey(pos)) { @@ -49,7 +49,7 @@ index edb12eb2a567febe01dd3160b193b0d8a7d17270..7b4fe58cb6b9e0b4b9a09c79a5385c78 this.capturedBlockStates.put(pos.immutable(), blockstate); captured = true; } -@@ -612,7 +613,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -618,7 +619,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { public BlockState getBlockState(BlockPos pos) { // CraftBukkit start - tree generation if (this.captureTreeGeneration) { diff --git a/patches/unapplied/server/0168-API-to-get-a-BlockState-without-a-snapshot.patch b/patches/server/0168-API-to-get-a-BlockState-without-a-snapshot.patch similarity index 98% rename from patches/unapplied/server/0168-API-to-get-a-BlockState-without-a-snapshot.patch rename to patches/server/0168-API-to-get-a-BlockState-without-a-snapshot.patch index 9d98e1c68d..bcd60ce32e 100644 --- a/patches/unapplied/server/0168-API-to-get-a-BlockState-without-a-snapshot.patch +++ b/patches/server/0168-API-to-get-a-BlockState-without-a-snapshot.patch @@ -114,10 +114,10 @@ index 7629a51ec284cab0db7e9238027d6acfa4f3083c..a76cce199acdcecfdd8b998ec08974c2 + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java -index 55cf35ec1bd867ae8106d00c101fd4797b6e9919..812eb8c75bf5308a3a0771a1faabdb22a3d80c28 100644 +index 7de568a342244cadbc8d4bb6e923a5daa35540aa..cf76ca2ebead64d194ce03ee024085d32d02077a 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java -@@ -368,15 +368,30 @@ public final class CraftBlockStates { +@@ -376,15 +376,30 @@ public final class CraftBlockStates { } public static BlockState getBlockState(Block block) { diff --git a/patches/unapplied/server/0169-AsyncTabCompleteEvent.patch b/patches/server/0169-AsyncTabCompleteEvent.patch similarity index 96% rename from patches/unapplied/server/0169-AsyncTabCompleteEvent.patch rename to patches/server/0169-AsyncTabCompleteEvent.patch index 899392b5df..5ebf4a098b 100644 --- a/patches/unapplied/server/0169-AsyncTabCompleteEvent.patch +++ b/patches/server/0169-AsyncTabCompleteEvent.patch @@ -16,10 +16,10 @@ Also adds isCommand and getLocation to the sync TabCompleteEvent Co-authored-by: Aikar diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 4c978604cdbc1f6a1590dc13951a0f0963901fae..e6c44e29e6b5bbb49c486685077cb5b1bff24f84 100644 +index e2e640149913db7951d5c90c084bdb24f9257e8b..2985032eb3e97653f96fdbc7a4e986b0f9f15983 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -776,12 +776,16 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -778,12 +778,16 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } @@ -38,7 +38,7 @@ index 4c978604cdbc1f6a1590dc13951a0f0963901fae..e6c44e29e6b5bbb49c486685077cb5b1 return; } // Paper start -@@ -792,18 +796,45 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -794,18 +798,45 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } // Paper end // CraftBukkit end @@ -91,10 +91,10 @@ index 4c978604cdbc1f6a1590dc13951a0f0963901fae..e6c44e29e6b5bbb49c486685077cb5b1 @Override diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 527e22973cb0f7fca9d19a41abf943e48980db19..23b0a829ab5d7a9b45d72c786c218548962dff11 100644 +index 3b110b947b13f1d3bec1e48e1abf530c425bb043..60eded2e31c5f353980e574e863e3ad0397c57b1 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2096,7 +2096,7 @@ public final class CraftServer implements Server { +@@ -2095,7 +2095,7 @@ public final class CraftServer implements Server { offers = this.tabCompleteChat(player, message); } diff --git a/patches/unapplied/server/0170-PlayerPickupExperienceEvent.patch b/patches/server/0170-PlayerPickupExperienceEvent.patch similarity index 92% rename from patches/unapplied/server/0170-PlayerPickupExperienceEvent.patch rename to patches/server/0170-PlayerPickupExperienceEvent.patch index 39c1192294..aacac2b87b 100644 --- a/patches/unapplied/server/0170-PlayerPickupExperienceEvent.patch +++ b/patches/server/0170-PlayerPickupExperienceEvent.patch @@ -6,7 +6,7 @@ Subject: [PATCH] PlayerPickupExperienceEvent Allows plugins to cancel a player picking up an experience orb diff --git a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java -index 2ba92563f95e2899db29bf9b017e1b385a5bda3c..cc3c1d6b76f66cd0f511c5fd57ffa606eba0d387 100644 +index f9488311524bb8ff8a5686763973c9ae0053668d..28949deb54e89742541c1a14e8b69bb5b13848a9 100644 --- a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java +++ b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java @@ -304,7 +304,7 @@ public class ExperienceOrb extends Entity { diff --git a/patches/unapplied/server/0171-Ability-to-apply-mending-to-XP-API.patch b/patches/server/0171-Ability-to-apply-mending-to-XP-API.patch similarity index 94% rename from patches/unapplied/server/0171-Ability-to-apply-mending-to-XP-API.patch rename to patches/server/0171-Ability-to-apply-mending-to-XP-API.patch index 0fddb45cac..d0ad6f87f5 100644 --- a/patches/unapplied/server/0171-Ability-to-apply-mending-to-XP-API.patch +++ b/patches/server/0171-Ability-to-apply-mending-to-XP-API.patch @@ -14,10 +14,10 @@ public net.minecraft.world.entity.ExperienceOrb durabilityToXp(I)I public net.minecraft.world.entity.ExperienceOrb xpToDurability(I)I diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index dfc5a445744520388bd09cf4a68a232885c6e2c9..43fed86150b15294ed4aeb1a6139891456754c97 100644 +index 75017f7464247a4766859250453954c4b775d36f..a1ab7a666e429f0ac9afc1bd8a65866364655b70 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1470,7 +1470,37 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1493,7 +1493,37 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } @Override diff --git a/patches/unapplied/server/0172-PlayerNaturallySpawnCreaturesEvent.patch b/patches/server/0172-PlayerNaturallySpawnCreaturesEvent.patch similarity index 91% rename from patches/unapplied/server/0172-PlayerNaturallySpawnCreaturesEvent.patch rename to patches/server/0172-PlayerNaturallySpawnCreaturesEvent.patch index 2c1f04adb1..6093346028 100644 --- a/patches/unapplied/server/0172-PlayerNaturallySpawnCreaturesEvent.patch +++ b/patches/server/0172-PlayerNaturallySpawnCreaturesEvent.patch @@ -9,10 +9,10 @@ from triggering monster spawns on a server. Also a highly more effecient way to blanket block spawns in a world diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 3c5b6231dc6f3dcc275e032d03989ed638fb03a9..61039a4b61317e293ea054a6a2c0e849e5a302f0 100644 +index 9246ce9f654ad4db6155b026778a83d4ee79624d..526ffddc27d85237dd2f8a1028945fa58ffaefb2 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -692,7 +692,9 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -695,7 +695,9 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider chunkRange = (chunkRange > level.spigotConfig.viewDistance) ? (byte) level.spigotConfig.viewDistance : chunkRange; chunkRange = (chunkRange > 8) ? 8 : chunkRange; @@ -23,7 +23,7 @@ index 3c5b6231dc6f3dcc275e032d03989ed638fb03a9..61039a4b61317e293ea054a6a2c0e849 // Spigot end long i = chunkcoordintpair.toLong(); -@@ -709,6 +711,15 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -712,6 +714,15 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider } entityplayer = (ServerPlayer) iterator.next(); @@ -60,7 +60,7 @@ index 80d108ae7faf3fdcb024931e93032215935fe70b..c021733342c09adb04ce3f675209543f while (iterator1.hasNext()) { diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 04912bd14a2b03ca123561a3e21a812b8f806366..ac6acdd08e808dfadf2de1075fea0d0ee51dad3b 100644 +index 66705a8fb0ba4ca27136ee75420a08bc99ebd965..0e44abb38eb90d1943137e8e0f297f5529d3f25b 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java @@ -1,5 +1,6 @@ @@ -68,9 +68,9 @@ index 04912bd14a2b03ca123561a3e21a812b8f806366..ac6acdd08e808dfadf2de1075fea0d0e +import com.destroystokyo.paper.event.entity.PlayerNaturallySpawnCreaturesEvent; import com.google.common.collect.Lists; + import com.google.common.net.InetAddresses; import com.mojang.authlib.GameProfile; - import com.mojang.datafixers.util.Either; -@@ -252,6 +253,7 @@ public class ServerPlayer extends Player { +@@ -257,6 +258,7 @@ public class ServerPlayer extends Player { // CraftBukkit end public boolean isRealPlayer; // Paper public final com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet cachedSingleHashSet; // Paper diff --git a/patches/unapplied/server/0173-Add-setPlayerProfile-API-for-Skulls.patch b/patches/server/0173-Add-setPlayerProfile-API-for-Skulls.patch similarity index 100% rename from patches/unapplied/server/0173-Add-setPlayerProfile-API-for-Skulls.patch rename to patches/server/0173-Add-setPlayerProfile-API-for-Skulls.patch diff --git a/patches/unapplied/server/0174-PreCreatureSpawnEvent.patch b/patches/server/0174-PreCreatureSpawnEvent.patch similarity index 95% rename from patches/unapplied/server/0174-PreCreatureSpawnEvent.patch rename to patches/server/0174-PreCreatureSpawnEvent.patch index f5379c5ec4..2b7d92db4d 100644 --- a/patches/unapplied/server/0174-PreCreatureSpawnEvent.patch +++ b/patches/server/0174-PreCreatureSpawnEvent.patch @@ -59,10 +59,10 @@ index 1b3c7b3fb869215badacdb604199d5b96f74e384..83ef8cb27db685cceb5c2b7c9674e17b if (t0 != null) { diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java -index a2c4267f0001b276d848377e4dbcc407ee8d1ff9..c33550137ea83f23885341545c4a7f4985e07cfc 100644 +index bb0f57be7ecb6a36f447294cc04edc74708427af..fa54a27d224113d5565b300693bd58b460bf086d 100644 --- a/src/main/java/net/minecraft/world/entity/EntityType.java +++ b/src/main/java/net/minecraft/world/entity/EntityType.java -@@ -405,6 +405,20 @@ public class EntityType implements FeatureElement, EntityTypeT +@@ -413,6 +413,20 @@ public class EntityType implements FeatureElement, EntityTypeT @Nullable public T spawn(ServerLevel worldserver, @Nullable CompoundTag nbttagcompound, @Nullable Consumer consumer, BlockPos blockposition, MobSpawnType enummobspawn, boolean flag, boolean flag1, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason spawnReason) { // CraftBukkit end @@ -84,10 +84,10 @@ index a2c4267f0001b276d848377e4dbcc407ee8d1ff9..c33550137ea83f23885341545c4a7f49 if (t0 != null) { diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java -index bbbb26550b0c5b36d9c7204f075aa90b79b85ff0..bc778aadb2604756b783d4d024e3154576ab3236 100644 +index 806c49c127578a8f0a0bde11a4ad213e18d629af..caab72b733eabfe6a78c2a75e252817def49cbd0 100644 --- a/src/main/java/net/minecraft/world/entity/npc/Villager.java +++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java -@@ -951,7 +951,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler +@@ -963,7 +963,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler }).limit(5L).collect(Collectors.toList()); if (list1.size() >= requiredCount) { @@ -97,7 +97,7 @@ index bbbb26550b0c5b36d9c7204f075aa90b79b85ff0..bc778aadb2604756b783d4d024e31545 } } diff --git a/src/main/java/net/minecraft/world/level/BaseSpawner.java b/src/main/java/net/minecraft/world/level/BaseSpawner.java -index b3df6184b1b7f7e3b5cf87c76acb7f103e0dc1db..64d1f0ed579ef6f6f2e24e795d8dd0e1bdb5f39d 100644 +index bd85887e4497be2f8aeccc6c0260a96a3b9c615f..4e1d28fbe67bc7a3d0741acd490be8db787480ae 100644 --- a/src/main/java/net/minecraft/world/level/BaseSpawner.java +++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java @@ -128,6 +128,27 @@ public abstract class BaseSpawner { @@ -129,7 +129,7 @@ index b3df6184b1b7f7e3b5cf87c76acb7f103e0dc1db..64d1f0ed579ef6f6f2e24e795d8dd0e1 Entity entity = EntityType.loadEntityRecursive(nbttagcompound, world, (entity1) -> { entity1.moveTo(d0, d1, d2, entity1.getYRot(), entity1.getXRot()); diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java -index 5c58031279c0b74d2061c802e60b7bed50f27156..608be2b8bfff1b89855fc0bd181430d3a29a4cbb 100644 +index b2bb9bbd3af414c50ec3f8e3e171a679e95ef75e..5338e0e1a67925da0c386735a545bb31096afbb1 100644 --- a/src/main/java/net/minecraft/world/level/NaturalSpawner.java +++ b/src/main/java/net/minecraft/world/level/NaturalSpawner.java @@ -213,7 +213,13 @@ public final class NaturalSpawner { diff --git a/patches/unapplied/server/0175-Fill-Profile-Property-Events.patch b/patches/server/0175-Fill-Profile-Property-Events.patch similarity index 100% rename from patches/unapplied/server/0175-Fill-Profile-Property-Events.patch rename to patches/server/0175-Fill-Profile-Property-Events.patch diff --git a/patches/unapplied/server/0176-PlayerAdvancementCriterionGrantEvent.patch b/patches/server/0176-PlayerAdvancementCriterionGrantEvent.patch similarity index 87% rename from patches/unapplied/server/0176-PlayerAdvancementCriterionGrantEvent.patch rename to patches/server/0176-PlayerAdvancementCriterionGrantEvent.patch index 04f350388d..4686111f3c 100644 --- a/patches/unapplied/server/0176-PlayerAdvancementCriterionGrantEvent.patch +++ b/patches/server/0176-PlayerAdvancementCriterionGrantEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] PlayerAdvancementCriterionGrantEvent diff --git a/src/main/java/net/minecraft/server/PlayerAdvancements.java b/src/main/java/net/minecraft/server/PlayerAdvancements.java -index 4a60665ec4bbda53464151c3b4a7e83d5de6aa8f..3f7f6a43ac0bf2efb0e66dc96438febbd92113e9 100644 +index dd149e037e90067fb2f9b02520a2f29a12d90f13..6802e1def5e93c208d01a68f5cfc4c8809bb910f 100644 --- a/src/main/java/net/minecraft/server/PlayerAdvancements.java +++ b/src/main/java/net/minecraft/server/PlayerAdvancements.java -@@ -275,6 +275,12 @@ public class PlayerAdvancements { +@@ -228,6 +228,12 @@ public class PlayerAdvancements { boolean flag1 = advancementprogress.isDone(); if (advancementprogress.grantProgress(criterionName)) { diff --git a/patches/unapplied/server/0177-Add-ArmorStand-Item-Meta.patch b/patches/server/0177-Add-ArmorStand-Item-Meta.patch similarity index 100% rename from patches/unapplied/server/0177-Add-ArmorStand-Item-Meta.patch rename to patches/server/0177-Add-ArmorStand-Item-Meta.patch diff --git a/patches/unapplied/server/0178-Extend-Player-Interact-cancellation.patch b/patches/server/0178-Extend-Player-Interact-cancellation.patch similarity index 100% rename from patches/unapplied/server/0178-Extend-Player-Interact-cancellation.patch rename to patches/server/0178-Extend-Player-Interact-cancellation.patch diff --git a/patches/unapplied/server/0179-Tameable-getOwnerUniqueId-API.patch b/patches/server/0179-Tameable-getOwnerUniqueId-API.patch similarity index 100% rename from patches/unapplied/server/0179-Tameable-getOwnerUniqueId-API.patch rename to patches/server/0179-Tameable-getOwnerUniqueId-API.patch diff --git a/patches/unapplied/server/0180-Toggleable-player-crits-helps-mitigate-hacked-client.patch b/patches/server/0180-Toggleable-player-crits-helps-mitigate-hacked-client.patch similarity index 85% rename from patches/unapplied/server/0180-Toggleable-player-crits-helps-mitigate-hacked-client.patch rename to patches/server/0180-Toggleable-player-crits-helps-mitigate-hacked-client.patch index 59a00b028b..408e879056 100644 --- a/patches/unapplied/server/0180-Toggleable-player-crits-helps-mitigate-hacked-client.patch +++ b/patches/server/0180-Toggleable-player-crits-helps-mitigate-hacked-client.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Toggleable player crits, helps mitigate hacked clients. 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 4066cde038732fadad753b0b5a1ca14d95aee0b0..8fc8e7a6fff002a6022f5a4579a229238af08348 100644 +index 32ee62d4d8d0cdd4719959fc55a40d2673a9a744..0665aa0242ca93c19b1488320168be82f85d6b16 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java -@@ -1235,6 +1235,7 @@ public abstract class Player extends LivingEntity { +@@ -1234,6 +1234,7 @@ public abstract class Player extends LivingEntity { boolean flag2 = flag && this.fallDistance > 0.0F && !this.onGround && !this.onClimbable() && !this.isInWater() && !this.hasEffect(MobEffects.BLINDNESS) && !this.isPassenger() && target instanceof LivingEntity; diff --git a/patches/unapplied/server/0181-Disable-Explicit-Network-Manager-Flushing.patch b/patches/server/0181-Disable-Explicit-Network-Manager-Flushing.patch similarity index 86% rename from patches/unapplied/server/0181-Disable-Explicit-Network-Manager-Flushing.patch rename to patches/server/0181-Disable-Explicit-Network-Manager-Flushing.patch index 86058a3dc6..7463a5b3a0 100644 --- a/patches/unapplied/server/0181-Disable-Explicit-Network-Manager-Flushing.patch +++ b/patches/server/0181-Disable-Explicit-Network-Manager-Flushing.patch @@ -12,10 +12,10 @@ flushing on the netty event loop, so it won't do the flush on the main thread. Renable flushing by passing -Dpaper.explicit-flush=true diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java -index 8774d3f1a1b0019751e515ad94c85ba2f11e80c7..a31820cb543f3e72e461c91b3191b56b18fb33dd 100644 +index 07b2d28c5cba543b104ade6a180b0940a794e08c..b1a9c75081f7e61212ea9395b35375e067fd7fc6 100644 --- a/src/main/java/net/minecraft/network/Connection.java +++ b/src/main/java/net/minecraft/network/Connection.java -@@ -115,6 +115,7 @@ public class Connection extends SimpleChannelInboundHandler> { +@@ -117,6 +117,7 @@ public class Connection extends SimpleChannelInboundHandler> { // Paper start - NetworkClient implementation public int protocolVersion; public java.net.InetSocketAddress virtualHost; @@ -23,7 +23,7 @@ index 8774d3f1a1b0019751e515ad94c85ba2f11e80c7..a31820cb543f3e72e461c91b3191b56b // Paper end public Connection(PacketFlow side) { -@@ -310,7 +311,7 @@ public class Connection extends SimpleChannelInboundHandler> { +@@ -317,7 +318,7 @@ public class Connection extends SimpleChannelInboundHandler> { } if (this.channel != null) { diff --git a/patches/unapplied/server/0182-Implement-extended-PaperServerListPingEvent.patch b/patches/server/0182-Implement-extended-PaperServerListPingEvent.patch similarity index 75% rename from patches/unapplied/server/0182-Implement-extended-PaperServerListPingEvent.patch rename to patches/server/0182-Implement-extended-PaperServerListPingEvent.patch index 3279220072..bbace46d46 100644 --- a/patches/unapplied/server/0182-Implement-extended-PaperServerListPingEvent.patch +++ b/patches/server/0182-Implement-extended-PaperServerListPingEvent.patch @@ -174,27 +174,12 @@ index 0000000000000000000000000000000000000000..4c2351b03b58511b80017b58ee9b20ab + } + +} -diff --git a/src/main/java/net/minecraft/network/protocol/status/ClientboundStatusResponsePacket.java b/src/main/java/net/minecraft/network/protocol/status/ClientboundStatusResponsePacket.java -index 67455a5ba75c9b816213e44d6872c5ddf8e27e98..23efad80934930beadf15e65781551d4ba7ff81b 100644 ---- a/src/main/java/net/minecraft/network/protocol/status/ClientboundStatusResponsePacket.java -+++ b/src/main/java/net/minecraft/network/protocol/status/ClientboundStatusResponsePacket.java -@@ -10,7 +10,9 @@ import net.minecraft.util.GsonHelper; - import net.minecraft.util.LowerCaseEnumTypeAdapterFactory; - - public class ClientboundStatusResponsePacket implements Packet { -- private static final Gson GSON = (new GsonBuilder()).registerTypeAdapter(ServerStatus.Version.class, new ServerStatus.Version.Serializer()).registerTypeAdapter(ServerStatus.Players.class, new ServerStatus.Players.Serializer()).registerTypeAdapter(ServerStatus.class, new ServerStatus.Serializer()).registerTypeHierarchyAdapter(Component.class, new Component.Serializer()).registerTypeHierarchyAdapter(Style.class, new Style.Serializer()).registerTypeAdapterFactory(new LowerCaseEnumTypeAdapterFactory()).create(); -+ private static final Gson GSON = (new GsonBuilder()).registerTypeAdapter(ServerStatus.Version.class, new ServerStatus.Version.Serializer()).registerTypeAdapter(ServerStatus.Players.class, new ServerStatus.Players.Serializer()).registerTypeAdapter(ServerStatus.class, new ServerStatus.Serializer()).registerTypeHierarchyAdapter(Component.class, new Component.Serializer()).registerTypeHierarchyAdapter(Style.class, new Style.Serializer()).registerTypeAdapterFactory(new LowerCaseEnumTypeAdapterFactory()) -+ .registerTypeAdapter(io.papermc.paper.adventure.AdventureComponent.class, new io.papermc.paper.adventure.AdventureComponent.Serializer()) -+ .create(); - private final ServerStatus status; - - public ClientboundStatusResponsePacket(ServerStatus metadata) { diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index fc040a4424144ecae03a039899f53227777cce05..bb7da8b167b72f2b1fec2be8838545ae4ed71eb3 100644 +index 44c9135e8d63df11009d5eea509c6c57e8d841c4..163993cd4fe52c5bd89db656d61ff795b6ddc896 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -2,6 +2,9 @@ package net.minecraft.server; - +@@ -3,6 +3,9 @@ package net.minecraft.server; + import com.google.common.base.Preconditions; import com.google.common.base.Splitter; import com.google.common.collect.ImmutableList; +import co.aikar.timings.Timings; @@ -203,29 +188,29 @@ index fc040a4424144ecae03a039899f53227777cce05..bb7da8b167b72f2b1fec2be8838545ae import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.common.collect.Sets; -@@ -1310,7 +1313,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop objectarraylist = new ObjectArrayList(j); + int k = Mth.nextInt(this.random, 0, list.size() - j); - for (int k = 0; k < agameprofile.length; ++k) { diff --git a/src/main/java/net/minecraft/server/network/ServerStatusPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerStatusPacketListenerImpl.java -index 3d7d1ba148dbc3591d8c76b99a2ee7d965d12eef..0725c39d9cbec3282f93975a0ae76f060f70d86d 100644 +index d99b2235038eb1aba8cda474c4aa51e207149ef4..4eebe72d8ef4e71271c583545c7312212fabe8ec 100644 --- a/src/main/java/net/minecraft/server/network/ServerStatusPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerStatusPacketListenerImpl.java -@@ -46,6 +46,8 @@ public class ServerStatusPacketListenerImpl implements ServerStatusPacketListene +@@ -48,6 +48,8 @@ public class ServerStatusPacketListenerImpl implements ServerStatusPacketListene this.connection.disconnect(ServerStatusPacketListenerImpl.DISCONNECT_REASON); } else { this.hasRequestedStatus = true; + // Paper start - Replace everything + /* // CraftBukkit start - // this.connection.send(new PacketStatusOutServerInfo(this.server.getStatus())); - final Object[] players = this.server.getPlayerList().players.toArray(); -@@ -149,6 +151,9 @@ public class ServerStatusPacketListenerImpl implements ServerStatusPacketListene + // this.connection.send(new PacketStatusOutServerInfo(this.status)); + MinecraftServer server = MinecraftServer.getServer(); +@@ -150,6 +152,9 @@ public class ServerStatusPacketListenerImpl implements ServerStatusPacketListene this.connection.send(new ClientboundStatusResponsePacket(ping)); // CraftBukkit end diff --git a/patches/unapplied/server/0183-Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch b/patches/server/0183-Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch similarity index 95% rename from patches/unapplied/server/0183-Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch rename to patches/server/0183-Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch index 6cc179b1ca..b33e4f9545 100644 --- a/patches/unapplied/server/0183-Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch +++ b/patches/server/0183-Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Ability to change PlayerProfile in AsyncPreLoginEvent This will allow you to change the players name or skin on login. diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -index 82b1bdc0e4bce2762fa226fb54d9945dc1e5c736..b1fa2b95e161996cb62f05b67d710c0f9a98b1b2 100644 +index 9607c3297c1a977cb33fb730eacb35ce9604b74c..6b31b0894e52ad6fc397624e50587ec04e46c099 100644 --- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java @@ -329,8 +329,16 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, diff --git a/patches/unapplied/server/0184-Player.setPlayerProfile-API.patch b/patches/server/0184-Player.setPlayerProfile-API.patch similarity index 81% rename from patches/unapplied/server/0184-Player.setPlayerProfile-API.patch rename to patches/server/0184-Player.setPlayerProfile-API.patch index cc79f13f6b..a94924951e 100644 --- a/patches/unapplied/server/0184-Player.setPlayerProfile-API.patch +++ b/patches/server/0184-Player.setPlayerProfile-API.patch @@ -8,8 +8,21 @@ This can be useful for changing name or skins after a player has logged in. == AT == public-f net.minecraft.world.entity.player.Player gameProfile +diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +index 2985032eb3e97653f96fdbc7a4e986b0f9f15983..5a8703799204c28d885edfe1f366d222270d6558 100644 +--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java ++++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +@@ -1534,7 +1534,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic + this.internalTeleport(dest.getX(), dest.getY(), dest.getZ(), dest.getYaw(), dest.getPitch(), Collections.emptySet()); + } + +- private void internalTeleport(double d0, double d1, double d2, float f, float f1, Set set) { ++ public void internalTeleport(double d0, double d1, double d2, float f, float f1, Set set) { // Paper + // CraftBukkit start + if (Float.isNaN(f)) { + f = 0; diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -index b1fa2b95e161996cb62f05b67d710c0f9a98b1b2..9d3ea20adba300a38a544c3454eff2edd9b4bbb9 100644 +index 6b31b0894e52ad6fc397624e50587ec04e46c099..0c7f280bae81bbb492d5780a43e5ffda0f58756a 100644 --- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java @@ -330,11 +330,11 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, @@ -42,10 +55,10 @@ index e7442952ef1f03969949014492a7ddc6d0796ba5..69a1852905dd4724c30ac8ab88c14251 public Server getServer() { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 43fed86150b15294ed4aeb1a6139891456754c97..8e36073d0519f341c3356cb460b26d1221d3b187 100644 +index a1ab7a666e429f0ac9afc1bd8a65866364655b70..e3d166dd69470468e17255e994876a305f90c9ba 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -81,6 +81,7 @@ import net.minecraft.world.entity.ai.attributes.Attributes; +@@ -82,6 +82,7 @@ import net.minecraft.world.entity.ai.attributes.Attributes; import net.minecraft.world.inventory.AbstractContainerMenu; import net.minecraft.world.level.GameType; import net.minecraft.world.level.block.Blocks; @@ -53,7 +66,7 @@ index 43fed86150b15294ed4aeb1a6139891456754c97..8e36073d0519f341c3356cb460b26d12 import net.minecraft.world.level.block.entity.SignBlockEntity; import net.minecraft.world.level.border.BorderChangeListener; import net.minecraft.world.level.saveddata.maps.MapDecoration; -@@ -284,11 +285,6 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -285,11 +286,6 @@ public class CraftPlayer extends CraftHumanEntity implements Player { return server.getPlayer(getUniqueId()) != null; } @@ -65,9 +78,9 @@ index 43fed86150b15294ed4aeb1a6139891456754c97..8e36073d0519f341c3356cb460b26d12 @Override public InetSocketAddress getAddress() { if (this.getHandle().connection == null) return null; -@@ -1603,8 +1599,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { - this.hiddenEntities.put(entity.getUniqueId(), hidingPlugins); +@@ -1643,8 +1639,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { + private void untrackAndHideEntity(org.bukkit.entity.Entity entity) { // Remove this entity from the hidden player's EntityTrackerEntry - ChunkMap tracker = ((ServerLevel) this.getHandle().level).getChunkSource().chunkMap; + // Paper start @@ -82,7 +95,7 @@ index 43fed86150b15294ed4aeb1a6139891456754c97..8e36073d0519f341c3356cb460b26d12 ChunkMap.TrackedEntity entry = tracker.entityMap.get(other.getId()); if (entry != null) { entry.removePlayer(this.getHandle()); -@@ -1617,8 +1620,6 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1657,8 +1660,6 @@ public class CraftPlayer extends CraftHumanEntity implements Player { this.getHandle().connection.send(new ClientboundPlayerInfoRemovePacket(List.of(otherPlayer.getUUID()))); } } @@ -90,28 +103,12 @@ index 43fed86150b15294ed4aeb1a6139891456754c97..8e36073d0519f341c3356cb460b26d12 - server.getPluginManager().callEvent(new PlayerHideEntityEvent(this, entity)); } - @Override -@@ -1655,8 +1656,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { - } - this.hiddenEntities.remove(entity.getUniqueId()); - -- ChunkMap tracker = ((ServerLevel) this.getHandle().level).getChunkSource().chunkMap; -+ // Paper start - Entity other = ((CraftEntity) entity).getHandle(); -+ registerEntity(other); -+ -+ server.getPluginManager().callEvent(new PlayerShowEntityEvent(this, entity)); -+ } -+ private void registerEntity(Entity other) { -+ ChunkMap tracker = ((ServerLevel) this.getHandle().level).getChunkSource().chunkMap; -+ // Paper end - - if (other instanceof ServerPlayer) { - ServerPlayer otherPlayer = (ServerPlayer) other; -@@ -1667,10 +1675,63 @@ public class CraftPlayer extends CraftHumanEntity implements Player { + void resetAndHideEntity(org.bukkit.entity.Entity entity) { +@@ -1730,8 +1731,38 @@ public class CraftPlayer extends CraftHumanEntity implements Player { if (entry != null && !entry.seenBy.contains(this.getHandle().connection)) { entry.updatePlayer(this.getHandle()); } ++ server.getPluginManager().callEvent(new PlayerShowEntityEvent(this, entity)); // Paper + } + // Paper start + @Override @@ -130,22 +127,28 @@ index 43fed86150b15294ed4aeb1a6139891456754c97..8e36073d0519f341c3356cb460b26d12 + bukkitPlayer.unregisterEntity(self); + } + } - -- server.getPluginManager().callEvent(new PlayerShowEntityEvent(this, entity)); ++ + // Set the game profile here, we should have unregistered the entity via iterating all player entities above. + self.gameProfile = gameProfile; -+ + +- server.getPluginManager().callEvent(new PlayerShowEntityEvent(this, entity)); + // Re-register the game profile for all players + for (ServerPlayer player : players) { + CraftPlayer bukkitPlayer = player.getBukkitEntity(); + if (bukkitPlayer.canSee(this)) { -+ bukkitPlayer.registerEntity(self); ++ bukkitPlayer.trackAndShowEntity(self); + } + } + // Refresh misc player things AFTER sending game profile + this.refreshPlayer(); } + void resetAndShowEntity(org.bukkit.entity.Entity entity) { +@@ -1739,6 +1770,30 @@ public class CraftPlayer extends CraftHumanEntity implements Player { + this.trackAndShowEntity(entity); + } + } ++ // Paper start + public com.destroystokyo.paper.profile.PlayerProfile getPlayerProfile() { + return new com.destroystokyo.paper.profile.CraftPlayerProfile(this).clone(); + } @@ -160,7 +163,7 @@ index 43fed86150b15294ed4aeb1a6139891456754c97..8e36073d0519f341c3356cb460b26d12 + ServerLevel worldserver = handle.getLevel(); + connection.send(new net.minecraft.network.protocol.game.ClientboundRespawnPacket(worldserver.dimensionTypeId(), worldserver.dimension(), net.minecraft.world.level.biome.BiomeManager.obfuscateSeed(worldserver.getSeed()), handle.gameMode.getGameModeForPlayer(), handle.gameMode.getPreviousGameModeForPlayer(), worldserver.isDebug(), worldserver.isFlat(), net.minecraft.network.protocol.game.ClientboundRespawnPacket.KEEP_ALL_DATA, this.getHandle().getLastDeathLocation())); + handle.onUpdateAbilities(); -+ connection.internalTeleport(loc.getX(), loc.getY(), loc.getZ(), loc.getYaw(), loc.getPitch(), java.util.Collections.emptySet(), false); ++ connection.internalTeleport(loc.getX(), loc.getY(), loc.getZ(), loc.getYaw(), loc.getPitch(), java.util.Collections.emptySet()); + net.minecraft.server.MinecraftServer.getServer().getPlayerList().sendAllPlayerInfo(handle); + + if (this.isOp()) { @@ -169,10 +172,9 @@ index 43fed86150b15294ed4aeb1a6139891456754c97..8e36073d0519f341c3356cb460b26d12 + } + } + // Paper end -+ + public void onEntityRemove(Entity entity) { - this.hiddenEntities.remove(entity.getUUID()); - } + this.invertedVisibilityEntities.remove(entity.getUUID()); diff --git a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java index a679133a3de51e26eb19932ece9ade292879aefd..e342ea27a8a689ea080c7881711a5dcd6322c914 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java diff --git a/patches/unapplied/server/0185-getPlayerUniqueId-API.patch b/patches/server/0185-getPlayerUniqueId-API.patch similarity index 90% rename from patches/unapplied/server/0185-getPlayerUniqueId-API.patch rename to patches/server/0185-getPlayerUniqueId-API.patch index 7fe0cf7031..44dacb68a1 100644 --- a/patches/unapplied/server/0185-getPlayerUniqueId-API.patch +++ b/patches/server/0185-getPlayerUniqueId-API.patch @@ -9,10 +9,10 @@ In Offline Mode, will return an Offline UUID This is a more performant way to obtain a UUID for a name than loading an OfflinePlayer diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 23b0a829ab5d7a9b45d72c786c218548962dff11..969dc6197ae9c65c9a76bda76e48312bbb38d2d5 100644 +index 60eded2e31c5f353980e574e863e3ad0397c57b1..d770063b7e17c55b7e13e9ea44c05870cadb9fe7 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1718,6 +1718,25 @@ public final class CraftServer implements Server { +@@ -1717,6 +1717,25 @@ public final class CraftServer implements Server { return recipients.size(); } diff --git a/patches/unapplied/server/0186-Improved-Async-Task-Scheduler.patch b/patches/server/0186-Improved-Async-Task-Scheduler.patch similarity index 100% rename from patches/unapplied/server/0186-Improved-Async-Task-Scheduler.patch rename to patches/server/0186-Improved-Async-Task-Scheduler.patch diff --git a/patches/unapplied/server/0187-Make-legacy-ping-handler-more-reliable.patch b/patches/server/0187-Make-legacy-ping-handler-more-reliable.patch similarity index 100% rename from patches/unapplied/server/0187-Make-legacy-ping-handler-more-reliable.patch rename to patches/server/0187-Make-legacy-ping-handler-more-reliable.patch diff --git a/patches/unapplied/server/0188-Call-PaperServerListPingEvent-for-legacy-pings.patch b/patches/server/0188-Call-PaperServerListPingEvent-for-legacy-pings.patch similarity index 100% rename from patches/unapplied/server/0188-Call-PaperServerListPingEvent-for-legacy-pings.patch rename to patches/server/0188-Call-PaperServerListPingEvent-for-legacy-pings.patch diff --git a/patches/unapplied/server/0189-Flag-to-disable-the-channel-limit.patch b/patches/server/0189-Flag-to-disable-the-channel-limit.patch similarity index 88% rename from patches/unapplied/server/0189-Flag-to-disable-the-channel-limit.patch rename to patches/server/0189-Flag-to-disable-the-channel-limit.patch index 926ebc84aa..c1aa7a94d0 100644 --- a/patches/unapplied/server/0189-Flag-to-disable-the-channel-limit.patch +++ b/patches/server/0189-Flag-to-disable-the-channel-limit.patch @@ -9,10 +9,10 @@ e.g. servers which allow and support the usage of mod packs. provide an optional flag to disable this check, at your own risk. diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 8e36073d0519f341c3356cb460b26d1221d3b187..1d217d3795abe2e0e0d40746a523f78c84127ea4 100644 +index e3d166dd69470468e17255e994876a305f90c9ba..9d4c164e43915c10821b332c18d440637ef19a8b 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -175,6 +175,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -176,6 +176,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { // Paper start private org.bukkit.event.player.PlayerResourcePackStatusEvent.Status resourcePackStatus; private String resourcePackHash; @@ -20,7 +20,7 @@ index 8e36073d0519f341c3356cb460b26d1221d3b187..1d217d3795abe2e0e0d40746a523f78c // Paper end public CraftPlayer(CraftServer server, ServerPlayer entity) { -@@ -1934,7 +1935,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2002,7 +2003,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { // Paper end public void addChannel(String channel) { diff --git a/patches/unapplied/server/0190-Add-openSign-method-to-HumanEntity.patch b/patches/server/0190-Add-openSign-method-to-HumanEntity.patch similarity index 100% rename from patches/unapplied/server/0190-Add-openSign-method-to-HumanEntity.patch rename to patches/server/0190-Add-openSign-method-to-HumanEntity.patch diff --git a/patches/unapplied/server/0191-Configurable-sprint-interruption-on-attack.patch b/patches/server/0191-Configurable-sprint-interruption-on-attack.patch similarity index 87% rename from patches/unapplied/server/0191-Configurable-sprint-interruption-on-attack.patch rename to patches/server/0191-Configurable-sprint-interruption-on-attack.patch index 3fc16e4732..620051195d 100644 --- a/patches/unapplied/server/0191-Configurable-sprint-interruption-on-attack.patch +++ b/patches/server/0191-Configurable-sprint-interruption-on-attack.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Configurable sprint interruption on attack If the sprint interruption is disabled players continue sprinting when they attack entities. 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 8fc8e7a6fff002a6022f5a4579a229238af08348..3bdd77d2e91be5182c32761f736e7cccccb08978 100644 +index 0665aa0242ca93c19b1488320168be82f85d6b16..0d34089b28c6f89df81a93e7032a8c52a89187c5 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java -@@ -1284,7 +1284,11 @@ public abstract class Player extends LivingEntity { +@@ -1283,7 +1283,11 @@ public abstract class Player extends LivingEntity { } this.setDeltaMovement(this.getDeltaMovement().multiply(0.6D, 1.0D, 0.6D)); diff --git a/patches/unapplied/server/0192-Fix-exploit-that-allowed-colored-signs-to-be-created.patch b/patches/server/0192-Fix-exploit-that-allowed-colored-signs-to-be-created.patch similarity index 90% rename from patches/unapplied/server/0192-Fix-exploit-that-allowed-colored-signs-to-be-created.patch rename to patches/server/0192-Fix-exploit-that-allowed-colored-signs-to-be-created.patch index ac4fcb39e0..9bcfb420d3 100644 --- a/patches/unapplied/server/0192-Fix-exploit-that-allowed-colored-signs-to-be-created.patch +++ b/patches/server/0192-Fix-exploit-that-allowed-colored-signs-to-be-created.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix exploit that allowed colored signs to be created diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index e6c44e29e6b5bbb49c486685077cb5b1bff24f84..e29fffb8f91b52f0da77303c61c0e4fbef13370c 100644 +index 5a8703799204c28d885edfe1f366d222270d6558..ed910ec48845cbf7fad163771b409ea7485e9bf4 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -3142,9 +3142,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3151,9 +3151,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic FilteredText filteredtext = (FilteredText) signText.get(i); if (this.player.isTextFilteringEnabled()) { diff --git a/patches/unapplied/server/0193-EndermanEscapeEvent.patch b/patches/server/0193-EndermanEscapeEvent.patch similarity index 68% rename from patches/unapplied/server/0193-EndermanEscapeEvent.patch rename to patches/server/0193-EndermanEscapeEvent.patch index 6e7333ccfe..bb6d3e50a2 100644 --- a/patches/unapplied/server/0193-EndermanEscapeEvent.patch +++ b/patches/server/0193-EndermanEscapeEvent.patch @@ -8,7 +8,7 @@ Fires an event anytime an enderman intends to teleport away from the player You may cancel this, enabling ranged attacks to damage the enderman for example. diff --git a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java -index 9e93f8ab0f8e9a1287fdbae24f2dc1d3364e98d9..82896e98cb4704db0480b6b3342b09a697d39770 100644 +index d5f6769a50dee22349713bd313858c799a5a3960..167be7bc35f83fb3563044492195181c75b0bd1d 100644 --- a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java +++ b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java @@ -118,6 +118,12 @@ public class EnderMan extends Monster implements NeutralMob { @@ -33,28 +33,21 @@ index 9e93f8ab0f8e9a1287fdbae24f2dc1d3364e98d9..82896e98cb4704db0480b6b3342b09a6 this.setTarget((LivingEntity) null); this.teleport(); } -@@ -394,17 +400,19 @@ public class EnderMan extends Monster implements NeutralMob { - flag = false; - } +@@ -398,11 +404,13 @@ public class EnderMan extends Monster implements NeutralMob { + } else { + flag1 = flag && this.hurtWithCleanWater(source, (ThrownPotion) source.getDirectEntity(), amount); -+ if (this.tryEscape(com.destroystokyo.paper.event.entity.EndermanEscapeEvent.Reason.INDIRECT)) { // Paper start - for (int i = 0; i < 64; ++i) { - if (this.teleport()) { - return true; ++ if (this.tryEscape(com.destroystokyo.paper.event.entity.EndermanEscapeEvent.Reason.INDIRECT)) { // Paper start + for (int i = 0; i < 64; ++i) { + if (this.teleport()) { + return true; + } } ++ } // Paper end + + return flag1; } -+ } // Paper end - - return flag; - } else { - boolean flag1 = super.hurt(source, amount); - -- if (!this.level.isClientSide() && !(source.getEntity() instanceof LivingEntity) && this.random.nextInt(10) != 0) { -+ if (!this.level.isClientSide() && !(source.getEntity() instanceof LivingEntity) && this.random.nextInt(10) != 0 && this.tryEscape(source == DamageSource.DROWN ? com.destroystokyo.paper.event.entity.EndermanEscapeEvent.Reason.DROWN : com.destroystokyo.paper.event.entity.EndermanEscapeEvent.Reason.INDIRECT)) { // Paper - use to be critical hits as else, but mojang removed critical hits in 1.16.2 due to MC-185684 - this.teleport(); - } - -@@ -626,7 +634,7 @@ public class EnderMan extends Monster implements NeutralMob { +@@ -633,7 +641,7 @@ public class EnderMan extends Monster implements NeutralMob { } else { if (this.target != null && !this.enderman.isPassenger()) { if (this.enderman.isLookingAtMe((Player) this.target)) { diff --git a/patches/unapplied/server/0194-Enderman.teleportRandomly.patch b/patches/server/0194-Enderman.teleportRandomly.patch similarity index 94% rename from patches/unapplied/server/0194-Enderman.teleportRandomly.patch rename to patches/server/0194-Enderman.teleportRandomly.patch index 4c3ab8bc6d..01d4d56d34 100644 --- a/patches/unapplied/server/0194-Enderman.teleportRandomly.patch +++ b/patches/server/0194-Enderman.teleportRandomly.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Enderman.teleportRandomly() Ability to trigger the vanilla "teleport randomly" mechanic of an enderman. diff --git a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java -index 82896e98cb4704db0480b6b3342b09a697d39770..6f75d7ddb4b28c8ab94cecdb1556a6a7e31daa2a 100644 +index 167be7bc35f83fb3563044492195181c75b0bd1d..54088f183e218e10d48e07f3f66b2fdb892a1035 100644 --- a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java +++ b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java @@ -287,7 +287,7 @@ public class EnderMan extends Monster implements NeutralMob { diff --git a/patches/unapplied/server/0195-Block-Enderpearl-Travel-Exploit.patch b/patches/server/0195-Block-Enderpearl-Travel-Exploit.patch similarity index 86% rename from patches/unapplied/server/0195-Block-Enderpearl-Travel-Exploit.patch rename to patches/server/0195-Block-Enderpearl-Travel-Exploit.patch index 639481f1b7..40b6b1199e 100644 --- a/patches/unapplied/server/0195-Block-Enderpearl-Travel-Exploit.patch +++ b/patches/server/0195-Block-Enderpearl-Travel-Exploit.patch @@ -16,10 +16,10 @@ public net.minecraft.world.entity.projectile.Projectile cachedOwner public net.minecraft.world.entity.projectile.Projectile ownerUUID diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 349a9f4596cd1411ec3a69cd7d6f5414971b74ef..45485383943f1ae0d4c5b5064cbaa8f56181dad3 100644 +index 343e6da38413ab8dad876884241ad31172466659..d273673978c8270f2e0719412372039406e31f5e 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -2179,6 +2179,12 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2178,6 +2178,12 @@ public class ServerLevel extends Level implements WorldGenLevel { public void onTickingEnd(Entity entity) { ServerLevel.this.entityTickList.remove(entity); @@ -33,10 +33,10 @@ index 349a9f4596cd1411ec3a69cd7d6f5414971b74ef..45485383943f1ae0d4c5b5064cbaa8f5 public void onTrackingStart(Entity entity) { diff --git a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java -index e19251bc9cb18ea3c37628b55ae73bb2e5ba69bd..95ee8f85dd7e6c32f751f5c754a351cc7bcd6245 100644 +index f5ce2653489e544ca95cae9cfb1f209dd047824c..ad5c96e9a7577df1729533ec9a709387b7232844 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java +++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java -@@ -89,6 +89,7 @@ public abstract class Projectile extends Entity { +@@ -91,6 +91,7 @@ public abstract class Projectile extends Entity implements TraceableEntity { protected void readAdditionalSaveData(CompoundTag nbt) { if (nbt.hasUUID("Owner")) { this.ownerUUID = nbt.getUUID("Owner"); diff --git a/patches/unapplied/server/0196-Expand-World.spawnParticle-API-and-add-Builder.patch b/patches/server/0196-Expand-World.spawnParticle-API-and-add-Builder.patch similarity index 93% rename from patches/unapplied/server/0196-Expand-World.spawnParticle-API-and-add-Builder.patch rename to patches/server/0196-Expand-World.spawnParticle-API-and-add-Builder.patch index bf6a558cc9..8124f6610b 100644 --- a/patches/unapplied/server/0196-Expand-World.spawnParticle-API-and-add-Builder.patch +++ b/patches/server/0196-Expand-World.spawnParticle-API-and-add-Builder.patch @@ -10,10 +10,10 @@ Adds an option to control the force mode of the particle. This adds a new Builder API which is much friendlier to use. diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 45485383943f1ae0d4c5b5064cbaa8f56181dad3..d17808f6c565712dac31b0db7a4b6baed2dbdf21 100644 +index d273673978c8270f2e0719412372039406e31f5e..65110445ff8a245742c4f7a7055f544ff6344f75 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -1572,12 +1572,17 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1576,12 +1576,17 @@ public class ServerLevel extends Level implements WorldGenLevel { } public int sendParticles(ServerPlayer sender, T t0, double d0, double d1, double d2, int i, double d3, double d4, double d5, double d6, boolean force) { @@ -34,7 +34,7 @@ index 45485383943f1ae0d4c5b5064cbaa8f56181dad3..d17808f6c565712dac31b0db7a4b6bae if (this.sendParticles(entityplayer, force, d0, d1, d2, packetplayoutworldparticles)) { // CraftBukkit diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 3f6e5e4d36e8170def4ce50e29cdfcc7e25f4f4d..68e3a09bf4adb4fe9fc3c32fdec85d90af4354bc 100644 +index 030ad193dc657810709817c55fb3eb9a08d41459..eaf38f39e550699fe1ab74174896c8f1cd3b0af0 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -1824,11 +1824,17 @@ public class CraftWorld extends CraftRegionAccessor implements World { diff --git a/patches/unapplied/server/0197-Prevent-Frosted-Ice-from-loading-holding-chunks.patch b/patches/server/0197-Prevent-Frosted-Ice-from-loading-holding-chunks.patch similarity index 100% rename from patches/unapplied/server/0197-Prevent-Frosted-Ice-from-loading-holding-chunks.patch rename to patches/server/0197-Prevent-Frosted-Ice-from-loading-holding-chunks.patch diff --git a/patches/unapplied/server/0198-EndermanAttackPlayerEvent.patch b/patches/server/0198-EndermanAttackPlayerEvent.patch similarity index 93% rename from patches/unapplied/server/0198-EndermanAttackPlayerEvent.patch rename to patches/server/0198-EndermanAttackPlayerEvent.patch index ee72fe488e..24eb75efb2 100644 --- a/patches/unapplied/server/0198-EndermanAttackPlayerEvent.patch +++ b/patches/server/0198-EndermanAttackPlayerEvent.patch @@ -8,7 +8,7 @@ Allow control over whether or not an enderman aggros a player. This allows you to override/extend the pumpkin/stare logic. diff --git a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java -index 6f75d7ddb4b28c8ab94cecdb1556a6a7e31daa2a..4fcd5e1e0641474beeaa834adce73ba10065e34e 100644 +index 54088f183e218e10d48e07f3f66b2fdb892a1035..908ef284f17296c72009a5803dfefff13664fb1c 100644 --- a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java +++ b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java @@ -230,7 +230,15 @@ public class EnderMan extends Monster implements NeutralMob { diff --git a/patches/unapplied/server/0199-WitchConsumePotionEvent.patch b/patches/server/0199-WitchConsumePotionEvent.patch similarity index 89% rename from patches/unapplied/server/0199-WitchConsumePotionEvent.patch rename to patches/server/0199-WitchConsumePotionEvent.patch index f054a8dd3c..b232d801bd 100644 --- a/patches/unapplied/server/0199-WitchConsumePotionEvent.patch +++ b/patches/server/0199-WitchConsumePotionEvent.patch @@ -6,10 +6,10 @@ Subject: [PATCH] WitchConsumePotionEvent Fires when a witch consumes the potion in their hand diff --git a/src/main/java/net/minecraft/world/entity/monster/Witch.java b/src/main/java/net/minecraft/world/entity/monster/Witch.java -index 1b9d1262f60224819dcd77acf09798bfc1895369..312726d7d9030146b0db432493b2efbd5e42847a 100644 +index e8be8054c3d54defe5e42e2c8a48e2b69552cd9c..b1dc61cd1a3ec4a9e8f0a0b0117ead1f31942c11 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Witch.java +++ b/src/main/java/net/minecraft/world/entity/monster/Witch.java -@@ -123,7 +123,11 @@ public class Witch extends Raider implements RangedAttackMob { +@@ -124,7 +124,11 @@ public class Witch extends Raider implements RangedAttackMob { this.setItemSlot(EquipmentSlot.MAINHAND, ItemStack.EMPTY); if (itemstack.is(Items.POTION)) { diff --git a/patches/unapplied/server/0200-WitchThrowPotionEvent.patch b/patches/server/0200-WitchThrowPotionEvent.patch similarity index 91% rename from patches/unapplied/server/0200-WitchThrowPotionEvent.patch rename to patches/server/0200-WitchThrowPotionEvent.patch index 86ba404bc1..5322db36e0 100644 --- a/patches/unapplied/server/0200-WitchThrowPotionEvent.patch +++ b/patches/server/0200-WitchThrowPotionEvent.patch @@ -6,10 +6,10 @@ Subject: [PATCH] WitchThrowPotionEvent Fired when a witch throws a potion at a player diff --git a/src/main/java/net/minecraft/world/entity/monster/Witch.java b/src/main/java/net/minecraft/world/entity/monster/Witch.java -index 312726d7d9030146b0db432493b2efbd5e42847a..5a3bc20015ec188debd0703654b734baf20aa52a 100644 +index b1dc61cd1a3ec4a9e8f0a0b0117ead1f31942c11..d9608df5227970e31ebc35a8293edb2de1e7ba76 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Witch.java +++ b/src/main/java/net/minecraft/world/entity/monster/Witch.java -@@ -235,9 +235,16 @@ public class Witch extends Raider implements RangedAttackMob { +@@ -236,9 +236,16 @@ public class Witch extends Raider implements RangedAttackMob { potionregistry = Potions.WEAKNESS; } diff --git a/patches/unapplied/server/0201-Allow-spawning-Item-entities-with-World.spawnEntity.patch b/patches/server/0201-Allow-spawning-Item-entities-with-World.spawnEntity.patch similarity index 85% rename from patches/unapplied/server/0201-Allow-spawning-Item-entities-with-World.spawnEntity.patch rename to patches/server/0201-Allow-spawning-Item-entities-with-World.spawnEntity.patch index 6583e013ad..bd37edd8c5 100644 --- a/patches/unapplied/server/0201-Allow-spawning-Item-entities-with-World.spawnEntity.patch +++ b/patches/server/0201-Allow-spawning-Item-entities-with-World.spawnEntity.patch @@ -8,10 +8,10 @@ This API has more capabilities than .dropItem with the Consumer function Item can be set inside of the Consumer pre spawn function. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java -index 7e16cb08ca1ab2c0b6c0079ac7ffe00cfd758e18..100d59c37cf699bd33bdf0c3fc085dfe0065b93a 100644 +index f8399f63d7b511dfeb7a7ee9d24f848afd16e8c1..2c0773fec42c7c6223e2c300086058939ec32a52 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java -@@ -564,6 +564,10 @@ public abstract class CraftRegionAccessor implements RegionAccessor { +@@ -572,6 +572,10 @@ public abstract class CraftRegionAccessor implements RegionAccessor { entity = net.minecraft.world.entity.EntityType.BOAT.create(world); } entity.moveTo(x, y, z, yaw, pitch); @@ -20,5 +20,5 @@ index 7e16cb08ca1ab2c0b6c0079ac7ffe00cfd758e18..100d59c37cf699bd33bdf0c3fc085dfe + entity = new net.minecraft.world.entity.item.ItemEntity(world, x, y, z, new net.minecraft.world.item.ItemStack(net.minecraft.world.item.Item.byBlock(net.minecraft.world.level.block.Blocks.DIRT))); + // Paper end } else if (FallingBlock.class.isAssignableFrom(clazz)) { - BlockPos pos = new BlockPos(x, y, z); + BlockPos pos = BlockPos.containing(x, y, z); entity = FallingBlockEntity.fall(world, pos, this.getHandle().getBlockState(pos)); diff --git a/patches/unapplied/server/0202-WitchReadyPotionEvent.patch b/patches/server/0202-WitchReadyPotionEvent.patch similarity index 89% rename from patches/unapplied/server/0202-WitchReadyPotionEvent.patch rename to patches/server/0202-WitchReadyPotionEvent.patch index 99ac9dce10..09f53b3547 100644 --- a/patches/unapplied/server/0202-WitchReadyPotionEvent.patch +++ b/patches/server/0202-WitchReadyPotionEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] WitchReadyPotionEvent diff --git a/src/main/java/net/minecraft/world/entity/monster/Witch.java b/src/main/java/net/minecraft/world/entity/monster/Witch.java -index 5a3bc20015ec188debd0703654b734baf20aa52a..1ee8fec8f9f581fa68497ebf4f90aad9d425ec71 100644 +index d9608df5227970e31ebc35a8293edb2de1e7ba76..abbb077281eb8fc7961cf97ff23bb9822f2727f0 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Witch.java +++ b/src/main/java/net/minecraft/world/entity/monster/Witch.java -@@ -156,7 +156,11 @@ public class Witch extends Raider implements RangedAttackMob { +@@ -157,7 +157,11 @@ public class Witch extends Raider implements RangedAttackMob { } if (potionregistry != null) { diff --git a/patches/unapplied/server/0203-ItemStack-getMaxItemUseDuration.patch b/patches/server/0203-ItemStack-getMaxItemUseDuration.patch similarity index 91% rename from patches/unapplied/server/0203-ItemStack-getMaxItemUseDuration.patch rename to patches/server/0203-ItemStack-getMaxItemUseDuration.patch index c2d2d5a50d..b271ea72ef 100644 --- a/patches/unapplied/server/0203-ItemStack-getMaxItemUseDuration.patch +++ b/patches/server/0203-ItemStack-getMaxItemUseDuration.patch @@ -6,7 +6,7 @@ Subject: [PATCH] ItemStack#getMaxItemUseDuration Allows you to determine how long it takes to use a usable/consumable item diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -index 3c3f5a4b7109ec8b47b550f9e766556f8d1546ec..8b3cc7b9ea8ef3ddd619bc4a6affb5bb38cad8c3 100644 +index da5e660860a46227c59567f6458a9cf4ac4092eb..3726339bff55bafce9d985254c91241c0c20b4b7 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java @@ -173,6 +173,13 @@ public final class CraftItemStack extends ItemStack { diff --git a/patches/unapplied/server/0204-Implement-EntityTeleportEndGatewayEvent.patch b/patches/server/0204-Implement-EntityTeleportEndGatewayEvent.patch similarity index 95% rename from patches/unapplied/server/0204-Implement-EntityTeleportEndGatewayEvent.patch rename to patches/server/0204-Implement-EntityTeleportEndGatewayEvent.patch index 64ab468054..c7fdc8ab93 100644 --- a/patches/unapplied/server/0204-Implement-EntityTeleportEndGatewayEvent.patch +++ b/patches/server/0204-Implement-EntityTeleportEndGatewayEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Implement EntityTeleportEndGatewayEvent diff --git a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java -index 9c4469d46cb7a2cc781f6498d3e4ec6a9415d12e..1c0c1be2b08fc8a28ff36896da01d668308570f4 100644 +index 7d2b15edbd1a6bf663c29b7bc63c73d34fefd999..c7de74b7fcfb5f4d8adbe7e703087a03d9d9056d 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java @@ -225,9 +225,20 @@ public class TheEndGatewayBlockEntity extends TheEndPortalBlockEntity { diff --git a/patches/unapplied/server/0205-Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch b/patches/server/0205-Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch similarity index 83% rename from patches/unapplied/server/0205-Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch rename to patches/server/0205-Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch index 31a53febaf..c5443c55ef 100644 --- a/patches/unapplied/server/0205-Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch +++ b/patches/server/0205-Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Unset Ignited flag on cancel of Explosion Event Otherwise the creeper infinite explodes diff --git a/src/main/java/net/minecraft/world/entity/monster/Creeper.java b/src/main/java/net/minecraft/world/entity/monster/Creeper.java -index c418c0b2fa757f29dfa3c07977093c67416959f5..802a46ae9f18e0b58a7e0c38c18b367edd6b7a76 100644 +index baa30d4bdc8c31d04c84e4992062575709c4f2a4..d34945bc60d2b1734ec65be444ae8745cba2029d 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Creeper.java +++ b/src/main/java/net/minecraft/world/entity/monster/Creeper.java -@@ -272,6 +272,7 @@ public class Creeper extends Monster implements PowerableMob { +@@ -276,6 +276,7 @@ public class Creeper extends Monster implements PowerableMob { this.spawnLingeringCloud(); } else { this.swell = 0; diff --git a/patches/unapplied/server/0206-Fix-CraftEntity-hashCode.patch b/patches/server/0206-Fix-CraftEntity-hashCode.patch similarity index 91% rename from patches/unapplied/server/0206-Fix-CraftEntity-hashCode.patch rename to patches/server/0206-Fix-CraftEntity-hashCode.patch index c73a75133d..38b7cbc59b 100644 --- a/patches/unapplied/server/0206-Fix-CraftEntity-hashCode.patch +++ b/patches/server/0206-Fix-CraftEntity-hashCode.patch @@ -21,10 +21,10 @@ check is essentially the same as this.getHandle() == other.getHandle() However, replaced it too to make it clearer of intent. diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index 5199609a6eec4f3785f31091f294612d4941e71c..9ba0135932571c815fec15d2caccc789d3af3464 100644 +index 5a44b9a94992f3703ae1353dbaad40fe25e89a50..dc4060aee09ec9700a9379e0536fd758c3c1eb25 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -@@ -826,14 +826,15 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { +@@ -837,14 +837,15 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { return false; } final CraftEntity other = (CraftEntity) obj; diff --git a/patches/unapplied/server/0207-Configurable-Alternative-LootPool-Luck-Formula.patch b/patches/server/0207-Configurable-Alternative-LootPool-Luck-Formula.patch similarity index 100% rename from patches/unapplied/server/0207-Configurable-Alternative-LootPool-Luck-Formula.patch rename to patches/server/0207-Configurable-Alternative-LootPool-Luck-Formula.patch diff --git a/patches/unapplied/server/0208-Print-Error-details-when-failing-to-save-player-data.patch b/patches/server/0208-Print-Error-details-when-failing-to-save-player-data.patch similarity index 90% rename from patches/unapplied/server/0208-Print-Error-details-when-failing-to-save-player-data.patch rename to patches/server/0208-Print-Error-details-when-failing-to-save-player-data.patch index fda33feee1..fbed4e0bbf 100644 --- a/patches/unapplied/server/0208-Print-Error-details-when-failing-to-save-player-data.patch +++ b/patches/server/0208-Print-Error-details-when-failing-to-save-player-data.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Print Error details when failing to save player data diff --git a/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java b/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java -index 6909b6be840e8d4feadcc8b0c5a44fc1b9c81a54..601f8099f74e81c17600566b3c9b7a6dd39c9bcb 100644 +index 9d25ab52fac9e22d74f874491c7efbcaafa2ffc6..1b076dc77ea57cc779ce3c8742aba2b8c25ce92b 100644 --- a/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java +++ b/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java @@ -43,7 +43,7 @@ public class PlayerDataStorage { diff --git a/patches/unapplied/server/0209-Make-shield-blocking-delay-configurable.patch b/patches/server/0209-Make-shield-blocking-delay-configurable.patch similarity index 88% rename from patches/unapplied/server/0209-Make-shield-blocking-delay-configurable.patch rename to patches/server/0209-Make-shield-blocking-delay-configurable.patch index 364bf7c1e5..5ae1aedc89 100644 --- a/patches/unapplied/server/0209-Make-shield-blocking-delay-configurable.patch +++ b/patches/server/0209-Make-shield-blocking-delay-configurable.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Make shield blocking delay configurable diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 6d599fb38607cf841eef6d48bcaad81b378f667e..4ebdf94833062cde6882f09f1d6878062f2c579e 100644 +index 5ae5f58a6b521318703cf8ba044044992f0ef3f9..059223a014135cd6f6d8fbc4eee7888569fb46b5 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -3751,12 +3751,24 @@ public abstract class LivingEntity extends Entity { +@@ -3711,12 +3711,24 @@ public abstract class LivingEntity extends Entity implements Attackable { if (this.isUsingItem() && !this.useItem.isEmpty()) { Item item = this.useItem.getItem(); @@ -35,7 +35,7 @@ index 6d599fb38607cf841eef6d48bcaad81b378f667e..4ebdf94833062cde6882f09f1d687806 return this.isShiftKeyDown(); } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index cae153b184af9ef87ca2f335692b396800f00cf2..b9657abde59bdf3b2a464466f1a251a2c5f226e1 100644 +index 31f31f0a3dcd5764fffb710111b47359f793b9a2..104be41126252f9cdde3b961f2593b1348a38799 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java @@ -791,5 +791,15 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { diff --git a/patches/unapplied/server/0210-Improve-EntityShootBowEvent.patch b/patches/server/0210-Improve-EntityShootBowEvent.patch similarity index 91% rename from patches/unapplied/server/0210-Improve-EntityShootBowEvent.patch rename to patches/server/0210-Improve-EntityShootBowEvent.patch index 32ba3a6420..781edc26c2 100644 --- a/patches/unapplied/server/0210-Improve-EntityShootBowEvent.patch +++ b/patches/server/0210-Improve-EntityShootBowEvent.patch @@ -9,10 +9,10 @@ Adds missing call to Illagers and also adds Arrow ItemStack to skeletons public net.minecraft.world.entity.projectile.AbstractArrow getPickupItem()Lnet.minecraft.world.item.ItemStack; diff --git a/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java b/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java -index 3799834a1531cd7575ca5d8ea9f3429175b8384d..60064770f08cbee19eeb43bf7c144b6eefbc4888 100644 +index 1928354a7b9a4e3b03fc355ce7a1c60c23c504a9..362bc2d78e024df5a1cdfad9da6e768e3a778095 100644 --- a/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java +++ b/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java -@@ -198,7 +198,7 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo +@@ -201,7 +201,7 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo entityarrow.shoot(d0, d1 + d3 * 0.20000000298023224D, d2, 1.6F, (float) (14 - this.level.getDifficulty().getId() * 4)); // CraftBukkit start @@ -22,7 +22,7 @@ index 3799834a1531cd7575ca5d8ea9f3429175b8384d..60064770f08cbee19eeb43bf7c144b6e event.getProjectile().remove(); return; diff --git a/src/main/java/net/minecraft/world/entity/monster/Illusioner.java b/src/main/java/net/minecraft/world/entity/monster/Illusioner.java -index 7b3a931353e2ead4e5caade8fb12d70f290b67e4..86f7fdd42461db151221d2c0d5cff6953392fa80 100644 +index bd65129ec4f1b7c80ef99c34a1d30780f21bb4bf..10573602c9bc73713cbd6989762d3dbb6f6fcf8c 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Illusioner.java +++ b/src/main/java/net/minecraft/world/entity/monster/Illusioner.java @@ -196,8 +196,18 @@ public class Illusioner extends SpellcasterIllager implements RangedAttackMob { diff --git a/patches/unapplied/server/0211-PlayerReadyArrowEvent.patch b/patches/server/0211-PlayerReadyArrowEvent.patch similarity index 96% rename from patches/unapplied/server/0211-PlayerReadyArrowEvent.patch rename to patches/server/0211-PlayerReadyArrowEvent.patch index cc676ff6a6..a5c1f6754b 100644 --- a/patches/unapplied/server/0211-PlayerReadyArrowEvent.patch +++ b/patches/server/0211-PlayerReadyArrowEvent.patch @@ -7,7 +7,7 @@ Called when a player is firing a bow and the server is choosing an arrow to use. Plugins can skip selection of certain arrows and control which is used. 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 3bdd77d2e91be5182c32761f736e7cccccb08978..2010e93da4e56a6a22a8e6f8c42a799eeba62acc 100644 +index 0d34089b28c6f89df81a93e7032a8c52a89187c5..87573a6ecbf9a74b32f9c686067a34d58fcd5fa1 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java @@ -2226,18 +2226,29 @@ public abstract class Player extends LivingEntity { diff --git a/patches/unapplied/server/0212-Implement-EntityKnockbackByEntityEvent-and-EntityPus.patch b/patches/server/0212-Implement-EntityKnockbackByEntityEvent-and-EntityPus.patch similarity index 82% rename from patches/unapplied/server/0212-Implement-EntityKnockbackByEntityEvent-and-EntityPus.patch rename to patches/server/0212-Implement-EntityKnockbackByEntityEvent-and-EntityPus.patch index d414ead935..fa31f19e21 100644 --- a/patches/unapplied/server/0212-Implement-EntityKnockbackByEntityEvent-and-EntityPus.patch +++ b/patches/server/0212-Implement-EntityKnockbackByEntityEvent-and-EntityPus.patch @@ -9,10 +9,10 @@ Co-authored-by: aerulion This event is called when an entity receives knockback by another entity. diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 66b727c533d3a2b7b5938ab9b9b7b4a76bb62966..378027b72852e5d465c8f621168605ee5c522770 100644 +index 9d82842982a387287a9c2de36f26a1fc80dd948a..7b4ceab1d9988573f21df3fb1a85a640f060d3af 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -1767,8 +1767,17 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -1774,8 +1774,17 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { } public void push(double deltaX, double deltaY, double deltaZ) { @@ -33,19 +33,19 @@ index 66b727c533d3a2b7b5938ab9b9b7b4a76bb62966..378027b72852e5d465c8f621168605ee protected void markHurt() { diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 4ebdf94833062cde6882f09f1d6878062f2c579e..19cd680bd77196b99767b274599e9eb5ead80192 100644 +index 059223a014135cd6f6d8fbc4eee7888569fb46b5..dd82cef26160a1794c47494c99c59eb329879b7b 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -1457,7 +1457,7 @@ public abstract class LivingEntity extends Entity { +@@ -1445,7 +1445,7 @@ public abstract class LivingEntity extends Entity implements Attackable { + d0 = (Math.random() - Math.random()) * 0.01D; } - this.hurtDir = (float) (Mth.atan2(d1, d0) * 57.2957763671875D - (double) this.getYRot()); - this.knockback(0.4000000059604645D, d0, d1); + this.knockback(0.4000000059604645D, d0, d1, entity1); // Paper - } else { - this.hurtDir = (float) ((int) (Math.random() * 2.0D) * 180); - } -@@ -1505,7 +1505,7 @@ public abstract class LivingEntity extends Entity { + if (!flag) { + this.indicateDamage(d0, d1); + } +@@ -1494,7 +1494,7 @@ public abstract class LivingEntity extends Entity implements Attackable { } protected void blockedByShield(LivingEntity target) { @@ -54,7 +54,7 @@ index 4ebdf94833062cde6882f09f1d6878062f2c579e..19cd680bd77196b99767b274599e9eb5 } private boolean checkTotemDeathProtection(DamageSource source) { -@@ -1761,6 +1761,11 @@ public abstract class LivingEntity extends Entity { +@@ -1750,6 +1750,11 @@ public abstract class LivingEntity extends Entity implements Attackable { } public void knockback(double strength, double x, double z) { @@ -66,7 +66,7 @@ index 4ebdf94833062cde6882f09f1d6878062f2c579e..19cd680bd77196b99767b274599e9eb5 strength *= 1.0D - this.getAttributeValue(Attributes.KNOCKBACK_RESISTANCE); if (strength > 0.0D) { this.hasImpulse = true; -@@ -1768,6 +1773,15 @@ public abstract class LivingEntity extends Entity { +@@ -1757,6 +1762,15 @@ public abstract class LivingEntity extends Entity implements Attackable { Vec3 vec3d1 = (new Vec3(x, 0.0D, z)).normalize().scale(strength); this.setDeltaMovement(vec3d.x / 2.0D - vec3d1.x, this.onGround ? Math.min(0.4D, vec3d.y / 2.0D + strength) : vec3d.y, vec3d.z / 2.0D - vec3d1.z); @@ -83,10 +83,10 @@ index 4ebdf94833062cde6882f09f1d6878062f2c579e..19cd680bd77196b99767b274599e9eb5 } diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java -index 458a90529959d3ceae424236461cdeb4c588eedb..6f728231a7b326e605d6ddb8e4cd6f0f0aec820b 100644 +index dad26405e90c7a784266a336ff1b0aa58b961261..e818687adf432e7ff47c8442ed2ea32d41c06b64 100644 --- a/src/main/java/net/minecraft/world/entity/Mob.java +++ b/src/main/java/net/minecraft/world/entity/Mob.java -@@ -1605,7 +1605,7 @@ public abstract class Mob extends LivingEntity { +@@ -1631,7 +1631,7 @@ public abstract class Mob extends LivingEntity implements Targeting { if (flag) { if (f1 > 0.0F && target instanceof LivingEntity) { @@ -96,24 +96,24 @@ index 458a90529959d3ceae424236461cdeb4c588eedb..6f728231a7b326e605d6ddb8e4cd6f0f } diff --git a/src/main/java/net/minecraft/world/entity/ai/behavior/RamTarget.java b/src/main/java/net/minecraft/world/entity/ai/behavior/RamTarget.java -index 61328cde67c994c4ec0629b5869a878eda7c6cab..9b64a465be77bcc07e420c84f19fe75816e0ead1 100644 +index e319a46a21a94314c5d496820b1ac4879dcf56b9..4a3bcd988cf63452c4277ad55ba604ad43c8a623 100644 --- a/src/main/java/net/minecraft/world/entity/ai/behavior/RamTarget.java +++ b/src/main/java/net/minecraft/world/entity/ai/behavior/RamTarget.java -@@ -78,7 +78,7 @@ public class RamTarget extends Behavior { +@@ -77,7 +77,7 @@ public class RamTarget extends Behavior { float f = 0.25F * (float)(i - j); float g = Mth.clamp(entity.getSpeed() * 1.65F, 0.2F, 3.0F) + f; - float h = livingEntity.isDamageSourceBlocked(DamageSource.mobAttack(entity)) ? 0.5F : 1.0F; + float h = livingEntity.isDamageSourceBlocked(world.damageSources().mobAttack(entity)) ? 0.5F : 1.0F; - livingEntity.knockback((double)(h * g) * this.getKnockbackForce.applyAsDouble(entity), this.ramDirection.x(), this.ramDirection.z()); + livingEntity.knockback((double)(h * g) * this.getKnockbackForce.applyAsDouble(entity), this.ramDirection.x(), this.ramDirection.z(), entity); // Paper this.finishRam(world, entity); world.playSound((Player)null, entity, this.getImpactSound.apply(entity), SoundSource.NEUTRAL, 1.0F, 1.0F); } else if (this.hasRammedHornBreakingBlock(world, entity)) { diff --git a/src/main/java/net/minecraft/world/entity/ai/behavior/warden/SonicBoom.java b/src/main/java/net/minecraft/world/entity/ai/behavior/warden/SonicBoom.java -index c8c5a46f526b3f8823b3c2047463c2e67f12c92e..27aea5c5e284767a2a9b7de1b7912c3d50ff3c3c 100644 +index 29cfd065f246bbd3d3c2a5bbd32c3f4813a02951..03ec02f9a2fb5abb5387cd0d83c9481d6cbb0bd2 100644 --- a/src/main/java/net/minecraft/world/entity/ai/behavior/warden/SonicBoom.java +++ b/src/main/java/net/minecraft/world/entity/ai/behavior/warden/SonicBoom.java -@@ -69,7 +69,7 @@ public class SonicBoom extends Behavior { - target.hurt(DamageSource.sonicBoom(entity), 10.0F); +@@ -68,7 +68,7 @@ public class SonicBoom extends Behavior { + target.hurt(world.damageSources().sonicBoom(entity), 10.0F); double d = 0.5D * (1.0D - target.getAttributeValue(Attributes.KNOCKBACK_RESISTANCE)); double e = 2.5D * (1.0D - target.getAttributeValue(Attributes.KNOCKBACK_RESISTANCE)); - target.push(vec33.x() * e, vec33.y() * d, vec33.z() * e); @@ -122,23 +122,23 @@ index c8c5a46f526b3f8823b3c2047463c2e67f12c92e..27aea5c5e284767a2a9b7de1b7912c3d } } diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java -index a889be9dd2a94b531a227ff69a5e761e103067be..7bf3ad1ccef09b697655dc949abab9ab006a95a9 100644 +index 18a9050158f71245d5d88f9c0833fd5d4e5fdca6..55a8ab31a26a16adbe78b3b34366dc81851c02d4 100644 --- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java +++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java -@@ -432,7 +432,7 @@ public class EnderDragon extends Mob implements Enemy { +@@ -434,7 +434,7 @@ public class EnderDragon extends Mob implements Enemy { double d3 = entity.getZ() - d1; double d4 = Math.max(d2 * d2 + d3 * d3, 0.1D); - entity.push(d2 / d4 * 4.0D, 0.20000000298023224D, d3 / d4 * 4.0D); + entity.push(d2 / d4 * 4.0D, 0.20000000298023224D, d3 / d4 * 4.0D, this); // Paper if (!this.phaseManager.getCurrentPhase().isSitting() && ((LivingEntity) entity).getLastHurtByMobTimestamp() < entity.tickCount - 2) { - entity.hurt(DamageSource.mobAttack(this), 5.0F); + entity.hurt(this.damageSources().mobAttack(this), 5.0F); this.doEnchantDamageEffects(this, entity); diff --git a/src/main/java/net/minecraft/world/entity/monster/Ravager.java b/src/main/java/net/minecraft/world/entity/monster/Ravager.java -index 8517fd004727b083545082a5de26b11cb2a93623..01dfe3e29ea55b9e839a4db027fdd6a1dbb5ca23 100644 +index f4aa2be477da34c37660f0f3d7997928d327545d..24dc43c7806e99be6dc37af48ec056a5edd19947 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Ravager.java +++ b/src/main/java/net/minecraft/world/entity/monster/Ravager.java -@@ -275,7 +275,7 @@ public class Ravager extends Raider { +@@ -274,7 +274,7 @@ public class Ravager extends Raider { double d1 = entity.getZ() - this.getZ(); double d2 = Math.max(d0 * d0 + d1 * d1, 0.001D); @@ -148,10 +148,10 @@ index 8517fd004727b083545082a5de26b11cb2a93623..01dfe3e29ea55b9e839a4db027fdd6a1 @Override diff --git a/src/main/java/net/minecraft/world/entity/monster/hoglin/HoglinBase.java b/src/main/java/net/minecraft/world/entity/monster/hoglin/HoglinBase.java -index 127948e7c8620de1f4fabce0d654fbb502510156..191f7afcb23b5ee58df9dd6bd8c78ac993630034 100644 +index f8ccf0cf421bf2d8d6d6ccf8dd9e7c27eb9024ed..de73183166962d84b3fcbb408e011bc9e8486374 100644 --- a/src/main/java/net/minecraft/world/entity/monster/hoglin/HoglinBase.java +++ b/src/main/java/net/minecraft/world/entity/monster/hoglin/HoglinBase.java -@@ -41,7 +41,7 @@ public interface HoglinBase { +@@ -40,7 +40,7 @@ public interface HoglinBase { double j = f * (double)(attacker.level.random.nextFloat() * 0.5F + 0.2F); Vec3 vec3 = (new Vec3(g, 0.0D, h)).normalize().scale(j).yRot(i); double k = f * (double)attacker.level.random.nextFloat() * 0.5D; @@ -161,10 +161,10 @@ index 127948e7c8620de1f4fabce0d654fbb502510156..191f7afcb23b5ee58df9dd6bd8c78ac9 } } 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 2010e93da4e56a6a22a8e6f8c42a799eeba62acc..67da749cef5241d6cbe02a494e43ae8fb24bb56d 100644 +index 87573a6ecbf9a74b32f9c686067a34d58fcd5fa1..10fcfa561ec74a04934d2078eb19b0c1b67b1e6a 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java -@@ -1278,9 +1278,9 @@ public abstract class Player extends LivingEntity { +@@ -1277,9 +1277,9 @@ public abstract class Player extends LivingEntity { if (flag5) { if (i > 0) { if (target instanceof LivingEntity) { @@ -176,17 +176,17 @@ index 2010e93da4e56a6a22a8e6f8c42a799eeba62acc..67da749cef5241d6cbe02a494e43ae8f } this.setDeltaMovement(this.getDeltaMovement().multiply(0.6D, 1.0D, 0.6D)); -@@ -1302,7 +1302,7 @@ public abstract class Player extends LivingEntity { +@@ -1301,7 +1301,7 @@ public abstract class Player extends LivingEntity { if (entityliving != this && entityliving != target && !this.isAlliedTo((Entity) entityliving) && (!(entityliving instanceof ArmorStand) || !((ArmorStand) entityliving).isMarker()) && this.distanceToSqr((Entity) entityliving) < 9.0D) { // CraftBukkit start - Only apply knockback if the damage hits - if (entityliving.hurt(DamageSource.playerAttack(this).sweep(), f4)) { + if (entityliving.hurt(this.damageSources().playerAttack(this).sweep(), f4)) { - entityliving.knockback(0.4000000059604645D, (double) Mth.sin(this.getYRot() * 0.017453292F), (double) (-Mth.cos(this.getYRot() * 0.017453292F))); -+ entityliving.knockback(0.4000000059604645D, (double) Mth.sin(this.getYRot() * 0.017453292F), (double) (-Mth.cos(this.getYRot() * 0.017453292F)), this); // Paper ++ entityliving.knockback(0.4000000059604645D, (double) Mth.sin(this.getYRot() * 0.017453292F), (double) (-Mth.cos(this.getYRot() * 0.017453292F)), this); // Pa } // CraftBukkit end } diff --git a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java -index d4b8364fd860ee2cc632d8c752435b9b311c7ece..915c15faa510f4bdd3a96d8ba83280f08b12dec6 100644 +index aabb5ad09dd7b11a7dfbaa0849726541c0401951..01ccd4f90ad8aed84a89630cf6df9f7ba9bc3fec 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java +++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java @@ -401,7 +401,7 @@ public abstract class AbstractArrow extends Projectile { diff --git a/patches/unapplied/server/0213-Expand-Explosions-API.patch b/patches/server/0213-Expand-Explosions-API.patch similarity index 94% rename from patches/unapplied/server/0213-Expand-Explosions-API.patch rename to patches/server/0213-Expand-Explosions-API.patch index 666ee81c29..7363a9e300 100644 --- a/patches/unapplied/server/0213-Expand-Explosions-API.patch +++ b/patches/server/0213-Expand-Explosions-API.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Expand Explosions API Add Entity as a Source capability, and add more API choices, and on Location. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 68e3a09bf4adb4fe9fc3c32fdec85d90af4354bc..51689ecd87a4afcc24786f3feb82b4d0c23b2732 100644 +index eaf38f39e550699fe1ab74174896c8f1cd3b0af0..c7cf5f1eaedbeff2bd82106a0a1a670c419b2211 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -702,6 +702,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { diff --git a/patches/unapplied/server/0214-LivingEntity-Hand-Raised-Item-Use-API.patch b/patches/server/0214-LivingEntity-Hand-Raised-Item-Use-API.patch similarity index 94% rename from patches/unapplied/server/0214-LivingEntity-Hand-Raised-Item-Use-API.patch rename to patches/server/0214-LivingEntity-Hand-Raised-Item-Use-API.patch index 13931afa3c..aaaa299a9a 100644 --- a/patches/unapplied/server/0214-LivingEntity-Hand-Raised-Item-Use-API.patch +++ b/patches/server/0214-LivingEntity-Hand-Raised-Item-Use-API.patch @@ -6,7 +6,7 @@ Subject: [PATCH] LivingEntity Hand Raised/Item Use API How long an entity has raised hands to charge an attack or use an item diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index b9657abde59bdf3b2a464466f1a251a2c5f226e1..235e360df71b796a39d6c85530157097fd0c7b79 100644 +index 104be41126252f9cdde3b961f2593b1348a38799..a9642e95cde4dc1c3cb9da50c921171c47665536 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java @@ -801,5 +801,30 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { diff --git a/patches/unapplied/server/0215-RangedEntity-API.patch b/patches/server/0215-RangedEntity-API.patch similarity index 100% rename from patches/unapplied/server/0215-RangedEntity-API.patch rename to patches/server/0215-RangedEntity-API.patch diff --git a/patches/unapplied/server/0216-Add-config-to-disable-ender-dragon-legacy-check.patch b/patches/server/0216-Add-config-to-disable-ender-dragon-legacy-check.patch similarity index 100% rename from patches/unapplied/server/0216-Add-config-to-disable-ender-dragon-legacy-check.patch rename to patches/server/0216-Add-config-to-disable-ender-dragon-legacy-check.patch diff --git a/patches/unapplied/server/0217-Implement-World.getEntity-UUID-API.patch b/patches/server/0217-Implement-World.getEntity-UUID-API.patch similarity index 91% rename from patches/unapplied/server/0217-Implement-World.getEntity-UUID-API.patch rename to patches/server/0217-Implement-World.getEntity-UUID-API.patch index c8a4dc7d20..576b660a66 100644 --- a/patches/unapplied/server/0217-Implement-World.getEntity-UUID-API.patch +++ b/patches/server/0217-Implement-World.getEntity-UUID-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Implement World.getEntity(UUID) API diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 51689ecd87a4afcc24786f3feb82b4d0c23b2732..78ca1045257fa0771ddea44629e09cfac8f88ca3 100644 +index c7cf5f1eaedbeff2bd82106a0a1a670c419b2211..0c3c47bfa9af7d0780e60598b703e0d9f906ed9f 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -1036,6 +1036,15 @@ public class CraftWorld extends CraftRegionAccessor implements World { diff --git a/patches/unapplied/server/0218-InventoryCloseEvent-Reason-API.patch b/patches/server/0218-InventoryCloseEvent-Reason-API.patch similarity index 89% rename from patches/unapplied/server/0218-InventoryCloseEvent-Reason-API.patch rename to patches/server/0218-InventoryCloseEvent-Reason-API.patch index de8d9a62d1..81504d668e 100644 --- a/patches/unapplied/server/0218-InventoryCloseEvent-Reason-API.patch +++ b/patches/server/0218-InventoryCloseEvent-Reason-API.patch @@ -7,10 +7,10 @@ Allows you to determine why an inventory was closed, enabling plugin developers to "confirm" things based on if it was player triggered close or not. diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index d17808f6c565712dac31b0db7a4b6baed2dbdf21..8b28de5755ad4fe50903837700feed32e4530afd 100644 +index 65110445ff8a245742c4f7a7055f544ff6344f75..718a403799246228e085280cb539236b01720d4b 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -1309,7 +1309,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1308,7 +1308,7 @@ public class ServerLevel extends Level implements WorldGenLevel { for (net.minecraft.world.level.block.entity.BlockEntity tileentity : chunk.getBlockEntities().values()) { if (tileentity instanceof net.minecraft.world.Container) { for (org.bukkit.entity.HumanEntity h : Lists.newArrayList(((net.minecraft.world.Container) tileentity).getViewers())) { @@ -19,7 +19,7 @@ index d17808f6c565712dac31b0db7a4b6baed2dbdf21..8b28de5755ad4fe50903837700feed32 } } } -@@ -2269,7 +2269,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2268,7 +2268,7 @@ public class ServerLevel extends Level implements WorldGenLevel { // Spigot Start if (entity.getBukkitEntity() instanceof org.bukkit.inventory.InventoryHolder && (!(entity instanceof ServerPlayer) || entity.getRemovalReason() != Entity.RemovalReason.KILLED)) { // SPIGOT-6876: closeInventory clears death message for (org.bukkit.entity.HumanEntity h : Lists.newArrayList(((org.bukkit.inventory.InventoryHolder) entity.getBukkitEntity()).getInventory().getViewers())) { @@ -29,10 +29,10 @@ index d17808f6c565712dac31b0db7a4b6baed2dbdf21..8b28de5755ad4fe50903837700feed32 } // Spigot End diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index ac6acdd08e808dfadf2de1075fea0d0ee51dad3b..20c4ba5d00f5a40f5c7da282c9c069b365273041 100644 +index 0e44abb38eb90d1943137e8e0f297f5529d3f25b..dad0368c8b55be018167bd8b113a80b7508647f1 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -633,7 +633,7 @@ public class ServerPlayer extends Player { +@@ -638,7 +638,7 @@ public class ServerPlayer extends Player { } // Paper end if (!this.level.isClientSide && !this.containerMenu.stillValid(this)) { @@ -41,7 +41,7 @@ index ac6acdd08e808dfadf2de1075fea0d0ee51dad3b..20c4ba5d00f5a40f5c7da282c9c069b3 this.containerMenu = this.inventoryMenu; } -@@ -826,7 +826,7 @@ public class ServerPlayer extends Player { +@@ -831,7 +831,7 @@ public class ServerPlayer extends Player { // SPIGOT-943 - only call if they have an inventory open if (this.containerMenu != this.inventoryMenu) { @@ -50,7 +50,7 @@ index ac6acdd08e808dfadf2de1075fea0d0ee51dad3b..20c4ba5d00f5a40f5c7da282c9c069b3 } net.kyori.adventure.text.Component deathMessage = event.deathMessage() != null ? event.deathMessage() : net.kyori.adventure.text.Component.empty(); // Paper - Adventure -@@ -1472,7 +1472,7 @@ public class ServerPlayer extends Player { +@@ -1450,7 +1450,7 @@ public class ServerPlayer extends Player { } // CraftBukkit end if (this.containerMenu != this.inventoryMenu) { @@ -59,7 +59,7 @@ index ac6acdd08e808dfadf2de1075fea0d0ee51dad3b..20c4ba5d00f5a40f5c7da282c9c069b3 } // this.nextContainerCounter(); // CraftBukkit - moved up -@@ -1500,7 +1500,13 @@ public class ServerPlayer extends Player { +@@ -1478,7 +1478,13 @@ public class ServerPlayer extends Player { @Override public void closeContainer() { @@ -75,10 +75,10 @@ index ac6acdd08e808dfadf2de1075fea0d0ee51dad3b..20c4ba5d00f5a40f5c7da282c9c069b3 this.doCloseContainer(); } diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index e29fffb8f91b52f0da77303c61c0e4fbef13370c..b6ce00b758ca935e991cd4063d85640bc51a356a 100644 +index ed910ec48845cbf7fad163771b409ea7485e9bf4..ce1dcfa2f76245c6b243b030754c8b59cd5227e1 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -217,6 +217,7 @@ import org.bukkit.event.inventory.ClickType; +@@ -219,6 +219,7 @@ import org.bukkit.event.inventory.ClickType; import org.bukkit.event.inventory.CraftItemEvent; import org.bukkit.event.inventory.InventoryAction; import org.bukkit.event.inventory.InventoryClickEvent; @@ -86,7 +86,7 @@ index e29fffb8f91b52f0da77303c61c0e4fbef13370c..b6ce00b758ca935e991cd4063d85640b import org.bukkit.event.inventory.InventoryCreativeEvent; import org.bukkit.event.inventory.InventoryType.SlotType; import org.bukkit.event.inventory.SmithItemEvent; -@@ -2663,10 +2664,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2672,10 +2673,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @Override public void handleContainerClose(ServerboundContainerClosePacket packet) { @@ -104,10 +104,10 @@ index e29fffb8f91b52f0da77303c61c0e4fbef13370c..b6ce00b758ca935e991cd4063d85640b this.player.doCloseContainer(); } diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index c8f17cb40d18bd03e6f612218747ecd62254ff32..0e68297edc603350010e6e7c5fe4638b3741d148 100644 +index 2cde0807c224f008bd2e652ff8a46244ebc53059..2f18121596b957202dfd8227b995ea0615ecf773 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -516,7 +516,7 @@ public abstract class PlayerList { +@@ -523,7 +523,7 @@ public abstract class PlayerList { // CraftBukkit start - Quitting must be before we do final save of data, in case plugins need to modify it // See SPIGOT-5799, SPIGOT-6145 if (entityplayer.containerMenu != entityplayer.inventoryMenu) { @@ -117,10 +117,10 @@ index c8f17cb40d18bd03e6f612218747ecd62254ff32..0e68297edc603350010e6e7c5fe4638b PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(entityplayer.getBukkitEntity(), net.kyori.adventure.text.Component.translatable("multiplayer.player.left", net.kyori.adventure.text.format.NamedTextColor.YELLOW, io.papermc.paper.configuration.GlobalConfiguration.get().messages.useDisplayNameInQuitMessage ? entityplayer.getBukkitEntity().displayName() : PaperAdventure.asAdventure(entityplayer.getDisplayName()))); // Paper - Adventure 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 67da749cef5241d6cbe02a494e43ae8fb24bb56d..48b18b824935ef922fe9f7e5860f923688a0ccc0 100644 +index 10fcfa561ec74a04934d2078eb19b0c1b67b1e6a..ad000e1f7fb6b3d3ec423b6e3d44efdb46f69849 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java -@@ -265,7 +265,7 @@ public abstract class Player extends LivingEntity { +@@ -268,7 +268,7 @@ public abstract class Player extends LivingEntity { this.updateIsUnderwater(); super.tick(); if (!this.level.isClientSide && this.containerMenu != null && !this.containerMenu.stillValid(this)) { @@ -129,7 +129,7 @@ index 67da749cef5241d6cbe02a494e43ae8fb24bb56d..48b18b824935ef922fe9f7e5860f9236 this.containerMenu = this.inventoryMenu; } -@@ -488,6 +488,13 @@ public abstract class Player extends LivingEntity { +@@ -491,6 +491,13 @@ public abstract class Player extends LivingEntity { } @@ -173,10 +173,10 @@ index 787ccb37a39bb506cf9fd8d54cf772b346981f85..f5b3190ffb9e9f92977afc9e40ddfa15 @Override public boolean isBlocking() { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 1d217d3795abe2e0e0d40746a523f78c84127ea4..d9a5a6719be998b9e40ab76519e4f207ee5c6bf9 100644 +index 9d4c164e43915c10821b332c18d440637ef19a8b..1beecfc947f52467bd10e454877bc0678fd2dc41 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1184,7 +1184,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1207,7 +1207,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { // Close any foreign inventory if (this.getHandle().containerMenu != this.getHandle().inventoryMenu) { @@ -186,7 +186,7 @@ index 1d217d3795abe2e0e0d40746a523f78c84127ea4..d9a5a6719be998b9e40ab76519e4f207 // Check if the fromWorld and toWorld are the same. diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 24814f91088b835e398d4d5fa1c895a3b1cdb086..fab613b7c4ee48c3f0eac1405bca7bd53da19060 100644 +index 71b43f56119977c8c28fc255933a851c1f88260f..358040413015cff19fc8b1858726e2d856ebf911 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -1230,7 +1230,7 @@ public class CraftEventFactory { diff --git a/patches/unapplied/server/0219-Vex-get-setSummoner-API.patch b/patches/server/0219-Vex-get-setSummoner-API.patch similarity index 100% rename from patches/unapplied/server/0219-Vex-get-setSummoner-API.patch rename to patches/server/0219-Vex-get-setSummoner-API.patch diff --git a/patches/unapplied/server/0220-Refresh-player-inventory-when-cancelling-PlayerInter.patch b/patches/server/0220-Refresh-player-inventory-when-cancelling-PlayerInter.patch similarity index 90% rename from patches/unapplied/server/0220-Refresh-player-inventory-when-cancelling-PlayerInter.patch rename to patches/server/0220-Refresh-player-inventory-when-cancelling-PlayerInter.patch index 17e9a3a176..1c305e9787 100644 --- a/patches/unapplied/server/0220-Refresh-player-inventory-when-cancelling-PlayerInter.patch +++ b/patches/server/0220-Refresh-player-inventory-when-cancelling-PlayerInter.patch @@ -16,10 +16,10 @@ Refresh the player inventory when PlayerInteractEntityEvent is cancelled to avoid this problem. diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index b6ce00b758ca935e991cd4063d85640bc51a356a..0e4db13373a3e2eda7557b872b7e2eb9e8f2ee4f 100644 +index ce1dcfa2f76245c6b243b030754c8b59cd5227e1..e37a4e8654f20eb9600d675eec7a2fbbb338cdc2 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2545,6 +2545,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2554,6 +2554,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } if (event.isCancelled()) { diff --git a/patches/unapplied/server/0221-Use-AsyncAppender-to-keep-logging-IO-off-main-thread.patch b/patches/server/0221-Use-AsyncAppender-to-keep-logging-IO-off-main-thread.patch similarity index 89% rename from patches/unapplied/server/0221-Use-AsyncAppender-to-keep-logging-IO-off-main-thread.patch rename to patches/server/0221-Use-AsyncAppender-to-keep-logging-IO-off-main-thread.patch index 221daf4dcf..f1dc80e7b1 100644 --- a/patches/unapplied/server/0221-Use-AsyncAppender-to-keep-logging-IO-off-main-thread.patch +++ b/patches/server/0221-Use-AsyncAppender-to-keep-logging-IO-off-main-thread.patch @@ -5,13 +5,13 @@ Subject: [PATCH] Use AsyncAppender to keep logging IO off main thread diff --git a/build.gradle.kts b/build.gradle.kts -index c909ad3e263cdce6766dcc2ac64412effaa9a784..d2b45b70f4951e44b34a67e29d008748ba84a6bf 100644 +index 2134a7d28cdf1a1b6ef50d4978e80e4411cf3c5a..6ca33c80c8bd4d87953103c06804fa9a0eef4f3c 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -27,6 +27,7 @@ dependencies { implementation("commons-lang:commons-lang:2.6") - runtimeOnly("org.xerial:sqlite-jdbc:3.36.0.3") - runtimeOnly("mysql:mysql-connector-java:8.0.29") + runtimeOnly("org.xerial:sqlite-jdbc:3.41.0.0") + runtimeOnly("com.mysql:mysql-connector-j:8.0.32") + runtimeOnly("com.lmax:disruptor:3.4.4") // Paper runtimeOnly("org.apache.maven:maven-resolver-provider:3.8.5") diff --git a/patches/unapplied/server/0222-add-more-information-to-Entity.toString.patch b/patches/server/0222-add-more-information-to-Entity.toString.patch similarity index 91% rename from patches/unapplied/server/0222-add-more-information-to-Entity.toString.patch rename to patches/server/0222-add-more-information-to-Entity.toString.patch index a0bbfb06af..0639d32ba8 100644 --- a/patches/unapplied/server/0222-add-more-information-to-Entity.toString.patch +++ b/patches/server/0222-add-more-information-to-Entity.toString.patch @@ -6,10 +6,10 @@ Subject: [PATCH] add more information to Entity.toString() UUID, ticks lived, valid, dead diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 378027b72852e5d465c8f621168605ee5c522770..0ae266bea5be068ece32a5a2f9b677117680e67b 100644 +index 7b4ceab1d9988573f21df3fb1a85a640f060d3af..c330d8e6894d9a4b6cabd36ccda7443bee33407e 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -3003,7 +3003,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -3024,7 +3024,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { public String toString() { String s = this.level == null ? "~NULL~" : this.level.toString(); diff --git a/patches/unapplied/server/0223-EnderDragon-Events.patch b/patches/server/0223-EnderDragon-Events.patch similarity index 100% rename from patches/unapplied/server/0223-EnderDragon-Events.patch rename to patches/server/0223-EnderDragon-Events.patch diff --git a/patches/unapplied/server/0224-PlayerElytraBoostEvent.patch b/patches/server/0224-PlayerElytraBoostEvent.patch similarity index 92% rename from patches/unapplied/server/0224-PlayerElytraBoostEvent.patch rename to patches/server/0224-PlayerElytraBoostEvent.patch index e80ceb5866..e99be47ba0 100644 --- a/patches/unapplied/server/0224-PlayerElytraBoostEvent.patch +++ b/patches/server/0224-PlayerElytraBoostEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] PlayerElytraBoostEvent diff --git a/src/main/java/net/minecraft/world/item/FireworkRocketItem.java b/src/main/java/net/minecraft/world/item/FireworkRocketItem.java -index 854856ca742dff800ac5d7bf0af4f79cf631540b..b545e4d189fd9b5e80c80fd3adfa55532f912b8b 100644 +index 7c627d27300247db9122ab2081049345ef306073..f17e9c6c91c02e0d36f58851522a5d3e5e423121 100644 --- a/src/main/java/net/minecraft/world/item/FireworkRocketItem.java +++ b/src/main/java/net/minecraft/world/item/FireworkRocketItem.java -@@ -60,12 +60,19 @@ public class FireworkRocketItem extends Item { +@@ -61,12 +61,19 @@ public class FireworkRocketItem extends Item { if (!world.isClientSide) { FireworkRocketEntity fireworkRocketEntity = new FireworkRocketEntity(world, itemStack, user); fireworkRocketEntity.spawningEntity = user.getUUID(); // Paper diff --git a/patches/unapplied/server/0225-PlayerLaunchProjectileEvent.patch b/patches/server/0225-PlayerLaunchProjectileEvent.patch similarity index 99% rename from patches/unapplied/server/0225-PlayerLaunchProjectileEvent.patch rename to patches/server/0225-PlayerLaunchProjectileEvent.patch index 556356857a..16a5be1670 100644 --- a/patches/unapplied/server/0225-PlayerLaunchProjectileEvent.patch +++ b/patches/server/0225-PlayerLaunchProjectileEvent.patch @@ -132,10 +132,10 @@ index 72dfb7b652f515bf9df201d524a851ab56706544..b80bedb5f27b474d7f66e9e1cc38ca3b return InteractionResultHolder.sidedSuccess(itemStack, world.isClientSide()); } diff --git a/src/main/java/net/minecraft/world/item/FireworkRocketItem.java b/src/main/java/net/minecraft/world/item/FireworkRocketItem.java -index b545e4d189fd9b5e80c80fd3adfa55532f912b8b..783791cf501d6ed3975aa82b958d7437158909ba 100644 +index f17e9c6c91c02e0d36f58851522a5d3e5e423121..82b0bda3e35ec2157a477e1a17b2b46baadc97d9 100644 --- a/src/main/java/net/minecraft/world/item/FireworkRocketItem.java +++ b/src/main/java/net/minecraft/world/item/FireworkRocketItem.java -@@ -46,8 +46,12 @@ public class FireworkRocketItem extends Item { +@@ -47,8 +47,12 @@ public class FireworkRocketItem extends Item { Direction direction = context.getClickedFace(); FireworkRocketEntity fireworkRocketEntity = new FireworkRocketEntity(level, context.getPlayer(), vec3.x + (double)direction.getStepX() * 0.15D, vec3.y + (double)direction.getStepY() * 0.15D, vec3.z + (double)direction.getStepZ() * 0.15D, itemStack); fireworkRocketEntity.spawningEntity = context.getPlayer() == null ? null : context.getPlayer().getUUID(); // Paper diff --git a/patches/unapplied/server/0226-Improve-BlockPosition-inlining.patch b/patches/server/0226-Improve-BlockPosition-inlining.patch similarity index 88% rename from patches/unapplied/server/0226-Improve-BlockPosition-inlining.patch rename to patches/server/0226-Improve-BlockPosition-inlining.patch index 25f2989ba1..208af75831 100644 --- a/patches/unapplied/server/0226-Improve-BlockPosition-inlining.patch +++ b/patches/server/0226-Improve-BlockPosition-inlining.patch @@ -21,10 +21,10 @@ This is based upon conclusions drawn from inspecting the assenmbly generated byt They had 'callq' (invoke) instead of 'mov' (get from memory) instructions. diff --git a/src/main/java/net/minecraft/core/Vec3i.java b/src/main/java/net/minecraft/core/Vec3i.java -index a6a6aaf226655d0e44bc229288112882a9c04e3b..9482d5ca34bbc098a5afa785054d6d60d6a2decb 100644 +index 40950db0c242c65dfd4de247c86249354d12108f..e87ef99260bff134529e00b9a75381cecaec01a4 100644 --- a/src/main/java/net/minecraft/core/Vec3i.java +++ b/src/main/java/net/minecraft/core/Vec3i.java -@@ -50,7 +50,7 @@ public class Vec3i implements Comparable { +@@ -44,7 +44,7 @@ public class Vec3i implements Comparable { } @Override @@ -33,7 +33,7 @@ index a6a6aaf226655d0e44bc229288112882a9c04e3b..9482d5ca34bbc098a5afa785054d6d60 if (this == object) { return true; } else if (!(object instanceof Vec3i)) { -@@ -68,7 +68,7 @@ public class Vec3i implements Comparable { +@@ -62,7 +62,7 @@ public class Vec3i implements Comparable { } @Override @@ -42,7 +42,7 @@ index a6a6aaf226655d0e44bc229288112882a9c04e3b..9482d5ca34bbc098a5afa785054d6d60 return (this.getY() + this.getZ() * 31) * 31 + this.getX(); } -@@ -81,15 +81,15 @@ public class Vec3i implements Comparable { +@@ -75,15 +75,15 @@ public class Vec3i implements Comparable { } } diff --git a/patches/unapplied/server/0227-Option-to-prevent-armor-stands-from-doing-entity-loo.patch b/patches/server/0227-Option-to-prevent-armor-stands-from-doing-entity-loo.patch similarity index 83% rename from patches/unapplied/server/0227-Option-to-prevent-armor-stands-from-doing-entity-loo.patch rename to patches/server/0227-Option-to-prevent-armor-stands-from-doing-entity-loo.patch index 91401d4d5c..ccc7098c42 100644 --- a/patches/unapplied/server/0227-Option-to-prevent-armor-stands-from-doing-entity-loo.patch +++ b/patches/server/0227-Option-to-prevent-armor-stands-from-doing-entity-loo.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Option to prevent armor stands from doing entity lookups diff --git a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java -index 4398a33df4e0f0e9d28c51af3d48e41d957d7c9e..3488c882c654a2cb7a470ed84066bcc0bbbbf9c4 100644 +index 8de5a556d364f29706e3391825288c8a3a75c9c8..51acb26076d7de1f365f7aaf6a2ab274a4b87cdc 100644 --- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java +++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java -@@ -336,6 +336,7 @@ public class ArmorStand extends LivingEntity { +@@ -337,6 +337,7 @@ public class ArmorStand extends LivingEntity { @Override protected void pushEntities() { @@ -17,10 +17,10 @@ index 4398a33df4e0f0e9d28c51af3d48e41d957d7c9e..3488c882c654a2cb7a470ed84066bcc0 for (int i = 0; i < list.size(); ++i) { diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 7b4fe58cb6b9e0b4b9a09c79a5385c785983c955..bb5d49a1b002fbe9109b2fe6c31c9d4f7c3f9ac8 100644 +index 7c8069e237a41bf5d9fc09199ff1ac247e245d9d..f07e70ab26fffaec5055a7dd2571dc4d29c66d35 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -766,6 +766,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -772,6 +772,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable { // Paper end } } diff --git a/patches/unapplied/server/0228-Vanished-players-don-t-have-rights.patch b/patches/server/0228-Vanished-players-don-t-have-rights.patch similarity index 91% rename from patches/unapplied/server/0228-Vanished-players-don-t-have-rights.patch rename to patches/server/0228-Vanished-players-don-t-have-rights.patch index 0bdd93d100..8cd2cab6f3 100644 --- a/patches/unapplied/server/0228-Vanished-players-don-t-have-rights.patch +++ b/patches/server/0228-Vanished-players-don-t-have-rights.patch @@ -5,24 +5,25 @@ Subject: [PATCH] Vanished players don't have rights diff --git a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java -index 95ee8f85dd7e6c32f751f5c754a351cc7bcd6245..ec5fc3293097b364b5f6d8acc756aa8adde15215 100644 +index ad5c96e9a7577df1729533ec9a709387b7232844..621ecd0f3cac52d3e4cecd003c67401ec7f0a6f7 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java +++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java -@@ -212,7 +212,14 @@ public abstract class Projectile extends Entity { - if (!entity.isSpectator() && entity.isAlive() && entity.isPickable()) { +@@ -216,6 +216,15 @@ public abstract class Projectile extends Entity implements TraceableEntity { + } else { Entity entity1 = this.getOwner(); + // Paper start - Cancel hit for vanished players + if (entity1 instanceof net.minecraft.server.level.ServerPlayer && entity instanceof net.minecraft.server.level.ServerPlayer) { + org.bukkit.entity.Player collided = (org.bukkit.entity.Player) entity.getBukkitEntity(); + org.bukkit.entity.Player shooter = (org.bukkit.entity.Player) entity1.getBukkitEntity(); -+ if (!shooter.canSee(collided)) return false; ++ if (!shooter.canSee(collided)) { ++ return false; ++ } + } - return entity1 == null || this.leftOwner || !entity1.isPassengerOfSameVehicle(entity); + // Paper end - } else { - return false; + return entity1 == null || this.leftOwner || !entity1.isPassengerOfSameVehicle(entity); } + } diff --git a/src/main/java/net/minecraft/world/item/BlockItem.java b/src/main/java/net/minecraft/world/item/BlockItem.java index a6638e626600e4304a973497a39e3fac52203b16..e68b7a1b03783e4f9de24c5ae8773fc359bd2d37 100644 --- a/src/main/java/net/minecraft/world/item/BlockItem.java @@ -38,10 +39,10 @@ index a6638e626600e4304a973497a39e3fac52203b16..e68b7a1b03783e4f9de24c5ae8773fc3 BlockCanBuildEvent event = new BlockCanBuildEvent(CraftBlock.at(context.getLevel(), context.getClickedPos()), player, CraftBlockData.fromData(state), defaultReturn); diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index bb5d49a1b002fbe9109b2fe6c31c9d4f7c3f9ac8..df273fd4ffbaf8d25286e9ba713999ccab31af90 100644 +index f07e70ab26fffaec5055a7dd2571dc4d29c66d35..754e1667aadef89bbaccebc0f437197b1331b7f8 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -268,6 +268,45 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -274,6 +274,45 @@ public abstract class Level implements LevelAccessor, AutoCloseable { this.tileLimiter = new org.spigotmc.TickLimiter(spigotConfig.tileMaxTickTime); } @@ -88,7 +89,7 @@ index bb5d49a1b002fbe9109b2fe6c31c9d4f7c3f9ac8..df273fd4ffbaf8d25286e9ba713999cc public boolean isClientSide() { return this.isClientSide; diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index fab613b7c4ee48c3f0eac1405bca7bd53da19060..67d820fb9aa00a3275cc3e23461864b496d738aa 100644 +index 358040413015cff19fc8b1858726e2d856ebf911..c24e84e07f3f0d93da079ddf73e0e67b7d58fe8b 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -1267,6 +1267,14 @@ public class CraftEventFactory { diff --git a/patches/unapplied/server/0229-Allow-disabling-armour-stand-ticking.patch b/patches/server/0229-Allow-disabling-armour-stand-ticking.patch similarity index 91% rename from patches/unapplied/server/0229-Allow-disabling-armour-stand-ticking.patch rename to patches/server/0229-Allow-disabling-armour-stand-ticking.patch index 7d29dc99e7..861b4b3b1e 100644 --- a/patches/unapplied/server/0229-Allow-disabling-armour-stand-ticking.patch +++ b/patches/server/0229-Allow-disabling-armour-stand-ticking.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Allow disabling armour stand ticking diff --git a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java -index 3488c882c654a2cb7a470ed84066bcc0bbbbf9c4..f70f75867a8f03d42f240a0d007d2221269f2fdb 100644 +index 51acb26076d7de1f365f7aaf6a2ab274a4b87cdc..e38cbdff34479673f1640c46d727f1a807a609c7 100644 --- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java +++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java -@@ -92,9 +92,16 @@ public class ArmorStand extends LivingEntity { +@@ -93,9 +93,16 @@ public class ArmorStand extends LivingEntity { public Rotations leftLegPose; public Rotations rightLegPose; public boolean canMove = true; // Paper @@ -25,7 +25,7 @@ index 3488c882c654a2cb7a470ed84066bcc0bbbbf9c4..f70f75867a8f03d42f240a0d007d2221 this.handItems = NonNullList.withSize(2, ItemStack.EMPTY); this.armorItems = NonNullList.withSize(4, ItemStack.EMPTY); this.headPose = ArmorStand.DEFAULT_HEAD_POSE; -@@ -189,6 +196,7 @@ public class ArmorStand extends LivingEntity { +@@ -190,6 +197,7 @@ public class ArmorStand extends LivingEntity { this.onEquipItem(enumitemslot, (ItemStack) this.armorItems.set(enumitemslot.getIndex(), itemstack), itemstack, silent); // CraftBukkit } @@ -33,7 +33,7 @@ index 3488c882c654a2cb7a470ed84066bcc0bbbbf9c4..f70f75867a8f03d42f240a0d007d2221 } @Override -@@ -239,6 +247,7 @@ public class ArmorStand extends LivingEntity { +@@ -240,6 +248,7 @@ public class ArmorStand extends LivingEntity { } nbt.put("Pose", this.writePose()); @@ -41,7 +41,7 @@ index 3488c882c654a2cb7a470ed84066bcc0bbbbf9c4..f70f75867a8f03d42f240a0d007d2221 } @Override -@@ -270,6 +279,12 @@ public class ArmorStand extends LivingEntity { +@@ -271,6 +280,12 @@ public class ArmorStand extends LivingEntity { this.setNoBasePlate(nbt.getBoolean("NoBasePlate")); this.setMarker(nbt.getBoolean("Marker")); this.noPhysics = !this.hasPhysics(); @@ -54,7 +54,7 @@ index 3488c882c654a2cb7a470ed84066bcc0bbbbf9c4..f70f75867a8f03d42f240a0d007d2221 CompoundTag nbttagcompound1 = nbt.getCompound("Pose"); this.readPose(nbttagcompound1); -@@ -652,7 +667,29 @@ public class ArmorStand extends LivingEntity { +@@ -669,7 +684,29 @@ public class ArmorStand extends LivingEntity { @Override public void tick() { @@ -84,7 +84,7 @@ index 3488c882c654a2cb7a470ed84066bcc0bbbbf9c4..f70f75867a8f03d42f240a0d007d2221 Rotations vector3f = (Rotations) this.entityData.get(ArmorStand.DATA_HEAD_POSE); if (!this.headPose.equals(vector3f)) { -@@ -776,31 +813,37 @@ public class ArmorStand extends LivingEntity { +@@ -793,31 +830,37 @@ public class ArmorStand extends LivingEntity { public void setHeadPose(Rotations angle) { this.headPose = angle; this.entityData.set(ArmorStand.DATA_HEAD_POSE, angle); diff --git a/patches/unapplied/server/0230-SkeletonHorse-Additions.patch b/patches/server/0230-SkeletonHorse-Additions.patch similarity index 100% rename from patches/unapplied/server/0230-SkeletonHorse-Additions.patch rename to patches/server/0230-SkeletonHorse-Additions.patch diff --git a/patches/unapplied/server/0231-Don-t-call-getItemMeta-on-hasItemMeta.patch b/patches/server/0231-Don-t-call-getItemMeta-on-hasItemMeta.patch similarity index 95% rename from patches/unapplied/server/0231-Don-t-call-getItemMeta-on-hasItemMeta.patch rename to patches/server/0231-Don-t-call-getItemMeta-on-hasItemMeta.patch index b5a335b3cb..a1b4006dda 100644 --- a/patches/unapplied/server/0231-Don-t-call-getItemMeta-on-hasItemMeta.patch +++ b/patches/server/0231-Don-t-call-getItemMeta-on-hasItemMeta.patch @@ -11,10 +11,10 @@ Returns true if getDamage() == 0 or has damage tag or other tag is set. Check the `ItemMetaTest#testTaggedButNotMeta` method to see how this method behaves. diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -index 8b3cc7b9ea8ef3ddd619bc4a6affb5bb38cad8c3..f3fcaf02a7718e20c1779934687a718e28a1d55a 100644 +index 3726339bff55bafce9d985254c91241c0c20b4b7..f072f5ee75890650957b1c2ca27adc1a84c2bfa1 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -@@ -624,7 +624,7 @@ public final class CraftItemStack extends ItemStack { +@@ -631,7 +631,7 @@ public final class CraftItemStack extends ItemStack { @Override public boolean hasItemMeta() { diff --git a/patches/unapplied/server/0232-Implement-Expanded-ArmorStand-API.patch b/patches/server/0232-Implement-Expanded-ArmorStand-API.patch similarity index 100% rename from patches/unapplied/server/0232-Implement-Expanded-ArmorStand-API.patch rename to patches/server/0232-Implement-Expanded-ArmorStand-API.patch diff --git a/patches/unapplied/server/0233-AnvilDamageEvent.patch b/patches/server/0233-AnvilDamageEvent.patch similarity index 90% rename from patches/unapplied/server/0233-AnvilDamageEvent.patch rename to patches/server/0233-AnvilDamageEvent.patch index c20941bfde..677b0c90af 100644 --- a/patches/unapplied/server/0233-AnvilDamageEvent.patch +++ b/patches/server/0233-AnvilDamageEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] AnvilDamageEvent diff --git a/src/main/java/net/minecraft/world/inventory/AnvilMenu.java b/src/main/java/net/minecraft/world/inventory/AnvilMenu.java -index c5f1076a758b396a9d5726754cbfb470ff912f8b..eb22059fe008c3d3fc0364a7f85f91b4cca8b328 100644 +index e0d7fffdda14038907792fd73251d5dc41f94b3f..0a132fbbc58f52e51f50a44e887a3f20d2e0a61c 100644 --- a/src/main/java/net/minecraft/world/inventory/AnvilMenu.java +++ b/src/main/java/net/minecraft/world/inventory/AnvilMenu.java -@@ -89,6 +89,16 @@ public class AnvilMenu extends ItemCombinerMenu { +@@ -105,6 +105,16 @@ public class AnvilMenu extends ItemCombinerMenu { if (!player.getAbilities().instabuild && iblockdata.is(BlockTags.ANVIL) && player.getRandom().nextFloat() < 0.12F) { BlockState iblockdata1 = AnvilBlock.damage(iblockdata); diff --git a/patches/unapplied/server/0234-Add-TNTPrimeEvent.patch b/patches/server/0234-Add-TNTPrimeEvent.patch similarity index 95% rename from patches/unapplied/server/0234-Add-TNTPrimeEvent.patch rename to patches/server/0234-Add-TNTPrimeEvent.patch index 580d91bcd1..0bd63955cc 100644 --- a/patches/unapplied/server/0234-Add-TNTPrimeEvent.patch +++ b/patches/server/0234-Add-TNTPrimeEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add TNTPrimeEvent diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java -index 7bf3ad1ccef09b697655dc949abab9ab006a95a9..c9051e80d329f1b10fa04d21f8891e85c44b5200 100644 +index 55a8ab31a26a16adbe78b3b34366dc81851c02d4..da1e60206f300d64f68f5aedeba52a164829676e 100644 --- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java +++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java -@@ -532,6 +532,11 @@ public class EnderDragon extends Mob implements Enemy { +@@ -534,6 +534,11 @@ public class EnderDragon extends Mob implements Enemy { }); craftBlock.getNMS().spawnAfterBreak((ServerLevel) level, blockposition, ItemStack.EMPTY, false); } @@ -21,10 +21,10 @@ index 7bf3ad1ccef09b697655dc949abab9ab006a95a9..c9051e80d329f1b10fa04d21f8891e85 this.level.removeBlock(blockposition, false); diff --git a/src/main/java/net/minecraft/world/level/block/FireBlock.java b/src/main/java/net/minecraft/world/level/block/FireBlock.java -index e725168ebce3d1b2548a1bc5baa612a6e718e337..7e48326b6dc847a84e0aff2d393cadf9bace7979 100644 +index 48b30ead02b0379190f794c4f245affb684aa5b4..33ece83c6d41c65042356c44eee2c76934c07d0b 100644 --- a/src/main/java/net/minecraft/world/level/block/FireBlock.java +++ b/src/main/java/net/minecraft/world/level/block/FireBlock.java -@@ -290,12 +290,19 @@ public class FireBlock extends BaseFireBlock { +@@ -291,12 +291,19 @@ public class FireBlock extends BaseFireBlock { world.setBlock(blockposition, this.getStateWithAge(world, blockposition, l), 3); } else { diff --git a/patches/unapplied/server/0235-Break-up-and-make-tab-spam-limits-configurable.patch b/patches/server/0235-Break-up-and-make-tab-spam-limits-configurable.patch similarity index 92% rename from patches/unapplied/server/0235-Break-up-and-make-tab-spam-limits-configurable.patch rename to patches/server/0235-Break-up-and-make-tab-spam-limits-configurable.patch index c8460eb2c5..6e03bc9475 100644 --- a/patches/unapplied/server/0235-Break-up-and-make-tab-spam-limits-configurable.patch +++ b/patches/server/0235-Break-up-and-make-tab-spam-limits-configurable.patch @@ -22,10 +22,10 @@ to take the burden of this into their own hand without having to rely on plugins doing unsafe things. diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 0e4db13373a3e2eda7557b872b7e2eb9e8f2ee4f..23b56013e449ce4d6bd62096a20135adb87731eb 100644 +index e37a4e8654f20eb9600d675eec7a2fbbb338cdc2..974b74757551bc9ad94c7198783473bb72520712 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -261,6 +261,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -263,6 +263,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic private long keepAliveChallenge; // CraftBukkit start - multithreaded fields private final AtomicInteger chatSpamTickCount = new AtomicInteger(); @@ -33,7 +33,7 @@ index 0e4db13373a3e2eda7557b872b7e2eb9e8f2ee4f..23b56013e449ce4d6bd62096a20135ad // CraftBukkit end private int dropSpamTickCount; private double firstGoodX; -@@ -409,6 +410,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -411,6 +412,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic this.server.getProfiler().pop(); // CraftBukkit start for (int spam; (spam = this.chatSpamTickCount.get()) > 0 && !this.chatSpamTickCount.compareAndSet(spam, spam - 1); ) ; @@ -41,7 +41,7 @@ index 0e4db13373a3e2eda7557b872b7e2eb9e8f2ee4f..23b56013e449ce4d6bd62096a20135ad /* Use thread-safe field access instead if (this.chatSpamTickCount > 0) { --this.chatSpamTickCount; -@@ -785,7 +787,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -787,7 +789,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic public void handleCustomCommandSuggestions(ServerboundCommandSuggestionPacket packet) { // PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); // Paper - run this async // CraftBukkit start diff --git a/patches/unapplied/server/0236-Fix-NBT-type-issues.patch b/patches/server/0236-Fix-NBT-type-issues.patch similarity index 89% rename from patches/unapplied/server/0236-Fix-NBT-type-issues.patch rename to patches/server/0236-Fix-NBT-type-issues.patch index dc5aa5f3c1..9fd58bc72d 100644 --- a/patches/unapplied/server/0236-Fix-NBT-type-issues.patch +++ b/patches/server/0236-Fix-NBT-type-issues.patch @@ -8,7 +8,7 @@ Addresses two issues: - Allay duplication cooldown is saved and exposed as a long, but loaded as an int diff --git a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java -index cc3c1d6b76f66cd0f511c5fd57ffa606eba0d387..cf5c7e8557b0084039a94ef881a36aa9e3f58daf 100644 +index 28949deb54e89742541c1a14e8b69bb5b13848a9..2d3994de8e40eedc78c27ea842b6265b1c5ea822 100644 --- a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java +++ b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java @@ -287,7 +287,7 @@ public class ExperienceOrb extends Entity { @@ -30,10 +30,10 @@ index cc3c1d6b76f66cd0f511c5fd57ffa606eba0d387..cf5c7e8557b0084039a94ef881a36aa9 this.loadPaperNBT(nbt); // Paper } diff --git a/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java b/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java -index fec05f88720fa09ed9361fd24f5abfa134013d6c..c0084b1f146a4697194c421519537e612ff737c0 100644 +index cc8c99e8f260ffe5c2e3f81f928e15efdece6228..9b57d2b766f2de2d3fb4a3b5ef4df8d6756a1942 100644 --- a/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java +++ b/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java -@@ -521,7 +521,7 @@ public class Allay extends PathfinderMob implements InventoryCarrier { +@@ -516,7 +516,7 @@ public class Allay extends PathfinderMob implements InventoryCarrier { }); } diff --git a/patches/unapplied/server/0237-Remove-unnecessary-itemmeta-handling.patch b/patches/server/0237-Remove-unnecessary-itemmeta-handling.patch similarity index 85% rename from patches/unapplied/server/0237-Remove-unnecessary-itemmeta-handling.patch rename to patches/server/0237-Remove-unnecessary-itemmeta-handling.patch index 944c7dd125..440197b5f8 100644 --- a/patches/unapplied/server/0237-Remove-unnecessary-itemmeta-handling.patch +++ b/patches/server/0237-Remove-unnecessary-itemmeta-handling.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Remove unnecessary itemmeta handling diff --git a/src/main/java/net/minecraft/network/FriendlyByteBuf.java b/src/main/java/net/minecraft/network/FriendlyByteBuf.java -index 76914b08c17a62a117319d458a6693070fc46348..32ee4ed11aefd82dca2e3e78b3108f041fdc3695 100644 +index c2f56f4628e42c130e4c55030432cb43aa0d8458..9938bb90bef84cf784f9a1ceb02a1a45aa8b48a1 100644 --- a/src/main/java/net/minecraft/network/FriendlyByteBuf.java +++ b/src/main/java/net/minecraft/network/FriendlyByteBuf.java -@@ -641,7 +641,7 @@ public class FriendlyByteBuf extends ByteBuf { +@@ -688,7 +688,7 @@ public class FriendlyByteBuf extends ByteBuf { if (item.canBeDepleted() || item.shouldOverrideMultiplayerNbt()) { // Spigot start - filter stack = stack.copy(); @@ -17,7 +17,7 @@ index 76914b08c17a62a117319d458a6693070fc46348..32ee4ed11aefd82dca2e3e78b3108f04 // Spigot end nbttagcompound = stack.getTag(); } -@@ -662,7 +662,7 @@ public class FriendlyByteBuf extends ByteBuf { +@@ -709,7 +709,7 @@ public class FriendlyByteBuf extends ByteBuf { itemstack.setTag(this.readNbt()); // CraftBukkit start diff --git a/patches/unapplied/server/0238-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch b/patches/server/0238-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch similarity index 89% rename from patches/unapplied/server/0238-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch rename to patches/server/0238-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch index 91b3399fd1..5d33fb3bae 100644 --- a/patches/unapplied/server/0238-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch +++ b/patches/server/0238-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch @@ -8,10 +8,10 @@ Add -Ddebug.entities=true to your JVM flags to gain more information 1.17: Needs to be reworked for new entity storage system diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 61039a4b61317e293ea054a6a2c0e849e5a302f0..7b8a5efc73a7a0bfb51af7299341b0e2e988d4c1 100644 +index 526ffddc27d85237dd2f8a1028945fa58ffaefb2..27b646341bdae8918649c5e9fdf05708638ad835 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -896,6 +896,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -899,6 +899,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider } else { ChunkMap.TrackedEntity playerchunkmap_entitytracker = new ChunkMap.TrackedEntity(entity, i, j, entitytypes.trackDeltas()); @@ -19,7 +19,7 @@ index 61039a4b61317e293ea054a6a2c0e849e5a302f0..7b8a5efc73a7a0bfb51af7299341b0e2 this.entityMap.put(entity.getId(), playerchunkmap_entitytracker); playerchunkmap_entitytracker.updatePlayers(this.level.players()); if (entity instanceof ServerPlayer) { -@@ -938,7 +939,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -941,7 +942,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider if (playerchunkmap_entitytracker1 != null) { playerchunkmap_entitytracker1.broadcastRemoved(); } @@ -29,10 +29,10 @@ index 61039a4b61317e293ea054a6a2c0e849e5a302f0..7b8a5efc73a7a0bfb51af7299341b0e2 protected void tick() { diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 8b28de5755ad4fe50903837700feed32e4530afd..2daa8e2e64829df838bde981a56d6e407b8ee004 100644 +index 718a403799246228e085280cb539236b01720d4b..e46f18e342f2e682c4d5bbac22187a171df8eb33 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -219,6 +219,9 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -217,6 +217,9 @@ public class ServerLevel extends Level implements WorldGenLevel { public final LevelStorageSource.LevelStorageAccess convertable; public final UUID uuid; public boolean hasPhysicsEvent = true; // Paper @@ -42,7 +42,7 @@ index 8b28de5755ad4fe50903837700feed32e4530afd..2daa8e2e64829df838bde981a56d6e40 @Override public LevelChunk getChunkIfLoaded(int x, int z) { // Paper - this was added in world too but keeping here for NMS ABI return this.chunkSource.getChunk(x, z, false); -@@ -1271,7 +1274,28 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1270,7 +1273,28 @@ public class ServerLevel extends Level implements WorldGenLevel { // CraftBukkit start private boolean addEntity(Entity entity, CreatureSpawnEvent.SpawnReason spawnReason) { org.spigotmc.AsyncCatcher.catchOp("entity add"); // Spigot @@ -72,10 +72,10 @@ index 8b28de5755ad4fe50903837700feed32e4530afd..2daa8e2e64829df838bde981a56d6e40 return false; } else { diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 0ae266bea5be068ece32a5a2f9b677117680e67b..5116be3075c1249254524bf6a5b6bc28c61400e6 100644 +index c330d8e6894d9a4b6cabd36ccda7443bee33407e..8663ea3cc8d5672b03b4b8345d7d970fcbc6a80b 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -235,6 +235,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -237,6 +237,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { public com.destroystokyo.paper.loottable.PaperLootableInventoryData lootableData; // Paper private CraftEntity bukkitEntity; @@ -85,10 +85,10 @@ index 0ae266bea5be068ece32a5a2f9b677117680e67b..5116be3075c1249254524bf6a5b6bc28 if (this.bukkitEntity == null) { this.bukkitEntity = CraftEntity.getEntity(this.level.getCraftServer(), this); diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index df273fd4ffbaf8d25286e9ba713999ccab31af90..01e8a8c36645efc9b728c6c58e12f594d619f5a5 100644 +index 754e1667aadef89bbaccebc0f437197b1331b7f8..e7e069ea6b5fc20225e6fabd98e0ffb6de497ce2 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -147,6 +147,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -151,6 +151,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { public boolean pvpMode; public boolean keepSpawnInMemory = true; public org.bukkit.generator.ChunkGenerator generator; diff --git a/patches/unapplied/server/0239-Add-Early-Warning-Feature-to-WatchDog.patch b/patches/server/0239-Add-Early-Warning-Feature-to-WatchDog.patch similarity index 96% rename from patches/unapplied/server/0239-Add-Early-Warning-Feature-to-WatchDog.patch rename to patches/server/0239-Add-Early-Warning-Feature-to-WatchDog.patch index f02af4b990..229d7b349d 100644 --- a/patches/unapplied/server/0239-Add-Early-Warning-Feature-to-WatchDog.patch +++ b/patches/server/0239-Add-Early-Warning-Feature-to-WatchDog.patch @@ -9,11 +9,11 @@ thread dumps at an interval until the point of crash. This will help diagnose what was going on in that time before the crash. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index bb7da8b167b72f2b1fec2be8838545ae4ed71eb3..eef3b01d1304e06d0c9971df82af54d90676957a 100644 +index 163993cd4fe52c5bd89db656d61ff795b6ddc896..8c64c3c1e33cb289ac2eb1b55e1febf6920fd4c6 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -1051,6 +1051,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop