diff --git a/gradle.properties b/gradle.properties index 857da86b..ff8b19bf 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,7 @@ group = org.dreeam.leaf version = 1.19.4-R0.1-SNAPSHOT -galeCommit = fe9c2020271dabc44ea509776511f10e75512a64 +galeCommit = dad62237f8f020d6e48b4c639492f4918f905220 org.gradle.caching = true org.gradle.parallel = true diff --git a/patches/api/0002-Purpur-API-Changes.patch b/patches/api/0002-Purpur-API-Changes.patch index 2ee331bd..8bf3be65 100644 --- a/patches/api/0002-Purpur-API-Changes.patch +++ b/patches/api/0002-Purpur-API-Changes.patch @@ -151,10 +151,10 @@ index e801e79fa57c44b2e5d359647c920f88064826f1..1abfcee0f6d632f4cd8d74b4994a90c9 new ArrayList(TIMINGS_SUBCOMMANDS.size())); } diff --git a/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java b/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java -index 998f629852e1103767e005405d1f39c2251ecd28..3c05b03bb5ff3bfec6c69a5cc4b23f0633ab473f 100644 +index b7a2cecb334ce39fa09d8ab949a29eedbdc44c36..b1f35c68373edfe666ca05b50f0ec022a1859ce9 100644 --- a/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java +++ b/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java -@@ -200,6 +200,18 @@ public interface VanillaGoal extends Goal { +@@ -201,6 +201,18 @@ public interface VanillaGoal extends Goal { GoalKey CLIMB_ON_TOP_OF_POWDER_SNOW = GoalKey.of(Mob.class, NamespacedKey.minecraft("climb_on_top_of_powder_snow")); GoalKey WOLF_PANIC = GoalKey.of(Wolf.class, NamespacedKey.minecraft("wolf_panic")); @@ -191,10 +191,10 @@ index a736d7bcdc5861a01b66ba36158db1c716339346..22fc165fd9c95f0f3ae1be7a0857e48c @Override diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index bf33dfa921e0099490e5485ac85a0c84645929e7..ad5bee2433359f9a63546f0c06897011e014809a 100644 +index b5042ccfad1f99cce88b3a8878da15909333c3a0..7f21d70079a6b4006a41518f90b5f98d4067b5f6 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java -@@ -2514,4 +2514,127 @@ public final class Bukkit { +@@ -2536,4 +2536,127 @@ public final class Bukkit { public static Server.Spigot spigot() { return server.spigot(); } @@ -413,12 +413,12 @@ index ea4ceb643239c26851bacbf45fc3f2efef3bb4be..3b8395dcb73e3fb251adf7438cbc7e95 + // Purpur end } diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java -index adb2416887cc3b544ec36c552bdf7105328c24a5..d334c963e16590c68ecd9d1d27434c7af6f7e21c 100644 +index 9b290969b0e60f20450cd15e3fc6f37276f12ae6..77a885fd17f280649b95df758f1096fa38fe8d69 100644 --- a/src/main/java/org/bukkit/Material.java +++ b/src/main/java/org/bukkit/Material.java -@@ -11156,4 +11156,40 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla - public String getItemTranslationKey() { - return Bukkit.getUnsafe().getItemTranslationKey(this); +@@ -11166,4 +11166,40 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla + public boolean isEnabledByFeature(@NotNull World world) { + return Bukkit.getDataPackManager().isEnabledByFeature(this, world); } + + // Purpur start @@ -458,10 +458,10 @@ index adb2416887cc3b544ec36c552bdf7105328c24a5..d334c963e16590c68ecd9d1d27434c7a + // Purpur end } diff --git a/src/main/java/org/bukkit/OfflinePlayer.java b/src/main/java/org/bukkit/OfflinePlayer.java -index 69b50eee42e8c52063033705bd23a5ef5231ed83..3578ab0c3a413d56bc39af43b5d3201d20d7d13a 100644 +index 72175dcae49f75b494ab70958053ed994a8828f4..df642a55003517040be795b44a8bf107dd88810b 100644 --- a/src/main/java/org/bukkit/OfflinePlayer.java +++ b/src/main/java/org/bukkit/OfflinePlayer.java -@@ -455,4 +455,114 @@ public interface OfflinePlayer extends ServerOperator, AnimalTamer, Configuratio +@@ -460,4 +460,114 @@ public interface OfflinePlayer extends ServerOperator, AnimalTamer, Configuratio */ @Nullable public Location getLastDeathLocation(); @@ -577,10 +577,10 @@ index 69b50eee42e8c52063033705bd23a5ef5231ed83..3578ab0c3a413d56bc39af43b5d3201d + // Purpur end - OfflinePlayer API } diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index 6253e761c595c8b89d08f9d42fe3e19cadbf4918..bb4452abd1e6b169d03e77a6b6bdec813f300e1d 100644 +index 007e23a9383ab8eda12c6dffb385256215356040..61cd83e6797e84679063a31aff1609e1168352c5 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java -@@ -2021,6 +2021,18 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi +@@ -2047,6 +2047,18 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi // Paper end @@ -599,7 +599,7 @@ index 6253e761c595c8b89d08f9d42fe3e19cadbf4918..bb4452abd1e6b169d03e77a6b6bdec81 /** * Sends the component to the player * -@@ -2215,4 +2227,111 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi +@@ -2241,4 +2253,111 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi long getLastTickOversleepTime(); // Gale end - YAPFA - last tick time - API @@ -712,10 +712,10 @@ index 6253e761c595c8b89d08f9d42fe3e19cadbf4918..bb4452abd1e6b169d03e77a6b6bdec81 + // Purpur end } diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index 0b8776355f724927ada826735d5e73f3fb6897d5..cf8b93aa5787e96f54e2ffe2a0f157b0e53e2c5c 100644 +index 72f1576b8ce5b55b50f053f346ce42c52db4b568..adf8169d5baefa7a33c33ef066180a8116617756 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java -@@ -4018,6 +4018,86 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient +@@ -3974,6 +3974,86 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient @Nullable public DragonBattle getEnderDragonBattle(); @@ -800,8 +800,8 @@ index 0b8776355f724927ada826735d5e73f3fb6897d5..cf8b93aa5787e96f54e2ffe2a0f157b0 + // Purpur end + /** - * Represents various map environment types that a world may be - */ + * Get all {@link FeatureFlag} enabled in this world. + * diff --git a/src/main/java/org/bukkit/command/SimpleCommandMap.java b/src/main/java/org/bukkit/command/SimpleCommandMap.java index ac9a28922f8a556944a4c3649d74c32c622f0cb0..5349f16136d9348c374a7dfe5b89a71dfcb0e66d 100644 --- a/src/main/java/org/bukkit/command/SimpleCommandMap.java @@ -1159,10 +1159,10 @@ index bc84b892cae5fe7019a3ad481e9da79956efa1fe..48eb5b00c460cccde29d327cef1d63fc + // Purpur end } diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index af82b2d96080c0657371d80a36192f937c5975bb..f5e2e1bdd31e74fdc00da5b503b178350e8235cd 100644 +index 930086e164c1c8cef8ff27009736e6962357bc2b..18e38e028cb44b12e4e439175f67800e83512d2f 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -3047,4 +3047,139 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -3080,4 +3080,139 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @Override Spigot spigot(); // Spigot end @@ -1347,12 +1347,12 @@ index 3bc24457d143449e6a338d79becf7c39b9f81054..4a5edf4e72e81b22c1abb2ade244f7f4 + // Purpur end } diff --git a/src/main/java/org/bukkit/entity/Wither.java b/src/main/java/org/bukkit/entity/Wither.java -index a1b42ae35dda2da90ba00a2d6666514f7c5b11dd..3ccd61bf91d7746393589b0b35674361c2f1d133 100644 +index 14543c2238b45c526dd9aebea2aa5c22f5df54dc..5312daf33405704c74e2c9e109754285ea6cf734 100644 --- a/src/main/java/org/bukkit/entity/Wither.java +++ b/src/main/java/org/bukkit/entity/Wither.java -@@ -79,4 +79,20 @@ public interface Wither extends Monster, Boss, com.destroystokyo.paper.entity.Ra +@@ -107,4 +107,20 @@ public interface Wither extends Monster, Boss, com.destroystokyo.paper.entity.Ra */ - void setCanTravelThroughPortals(boolean value); + void enterInvulnerabilityPhase(); // Paper end + + // Purpur start @@ -2096,7 +2096,7 @@ index d15a74c38576c49df61cfab02c70fc5d8c0dd5f7..64055402076b62d32ba947830d935b79 + // Purpur end } diff --git a/src/main/java/org/bukkit/inventory/RecipeChoice.java b/src/main/java/org/bukkit/inventory/RecipeChoice.java -index 90208bc96085f05a3b657b9467b1670d00b03104..c59d5e4ef9641fd73463b177239226866272745b 100644 +index 523818cbb0d6c90481ec97123e7fe0e2ff4eea14..bfeb8171a723d84b94bfaacd8aaf7d4d48ecd051 100644 --- a/src/main/java/org/bukkit/inventory/RecipeChoice.java +++ b/src/main/java/org/bukkit/inventory/RecipeChoice.java @@ -10,6 +10,7 @@ import java.util.function.Predicate; @@ -2107,7 +2107,7 @@ index 90208bc96085f05a3b657b9467b1670d00b03104..c59d5e4ef9641fd73463b17723922686 /** * Represents a potential item match within a recipe. All choices within a -@@ -152,6 +153,7 @@ public interface RecipeChoice extends Predicate, Cloneable { +@@ -150,6 +151,7 @@ public interface RecipeChoice extends Predicate, Cloneable { public static class ExactChoice implements RecipeChoice { private List choices; @@ -2115,7 +2115,7 @@ index 90208bc96085f05a3b657b9467b1670d00b03104..c59d5e4ef9641fd73463b17723922686 public ExactChoice(@NotNull ItemStack stack) { this(Arrays.asList(stack)); -@@ -196,6 +198,7 @@ public interface RecipeChoice extends Predicate, Cloneable { +@@ -194,6 +196,7 @@ public interface RecipeChoice extends Predicate, Cloneable { @Override public boolean test(@NotNull ItemStack t) { @@ -2123,7 +2123,7 @@ index 90208bc96085f05a3b657b9467b1670d00b03104..c59d5e4ef9641fd73463b17723922686 for (ItemStack match : choices) { if (t.isSimilar(match)) { return true; -@@ -205,6 +208,17 @@ public interface RecipeChoice extends Predicate, Cloneable { +@@ -203,6 +206,17 @@ public interface RecipeChoice extends Predicate, Cloneable { return false; } diff --git a/patches/api/0003-Leaf-config-files.patch b/patches/api/0003-Leaf-config-files.patch index 8de06bbb..f3dcbc39 100644 --- a/patches/api/0003-Leaf-config-files.patch +++ b/patches/api/0003-Leaf-config-files.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Leaf config files diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index bb4452abd1e6b169d03e77a6b6bdec813f300e1d..d772a989c4bd2d7540f3f41c4576b36835d26f12 100644 +index 61cd83e6797e84679063a31aff1609e1168352c5..59f78d0fa224a416eed57bec85fad3bff71bdc56 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java -@@ -2033,6 +2033,14 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi +@@ -2059,6 +2059,14 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi } // Purpur end diff --git a/patches/api/0006-KeYi-Player-Skull-API.patch b/patches/api/0006-KeYi-Player-Skull-API.patch index 900557f0..6002c404 100644 --- a/patches/api/0006-KeYi-Player-Skull-API.patch +++ b/patches/api/0006-KeYi-Player-Skull-API.patch @@ -7,7 +7,7 @@ Original license: MIT Original project: https://github.com/KeYiMC/KeYi diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index f5e2e1bdd31e74fdc00da5b503b178350e8235cd..801ac3e3b75a92121d7f50d9df8e1e227abadbae 100644 +index 18e38e028cb44b12e4e439175f67800e83512d2f..db8f06deb894a2d986c2abf28aab7be17b44466c 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java @@ -4,7 +4,10 @@ import java.net.InetSocketAddress; @@ -22,7 +22,7 @@ index f5e2e1bdd31e74fdc00da5b503b178350e8235cd..801ac3e3b75a92121d7f50d9df8e1e22 import org.bukkit.DyeColor; import org.bukkit.Effect; import org.bukkit.GameMode; -@@ -3182,4 +3185,22 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -3215,4 +3218,22 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM */ void sendDeathScreen(@NotNull net.kyori.adventure.text.Component message, @Nullable Entity killer); // Purpur end diff --git a/patches/api/0007-Slice-Smooth-Teleports.patch b/patches/api/0007-Slice-Smooth-Teleports.patch index 4930e80d..3851cbb5 100644 --- a/patches/api/0007-Slice-Smooth-Teleports.patch +++ b/patches/api/0007-Slice-Smooth-Teleports.patch @@ -7,10 +7,10 @@ Original license: MIT Original project: https://github.com/Cryptite/Slice diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index 801ac3e3b75a92121d7f50d9df8e1e227abadbae..23b53929b3333bab04bd1aad1873d14e7d6ef54d 100644 +index db8f06deb894a2d986c2abf28aab7be17b44466c..2b909bf048af82d4ff97b01b5473911bf3a99c29 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -2932,6 +2932,19 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -2965,6 +2965,19 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM String getClientBrandName(); // Paper end diff --git a/patches/server/0001-Rebrand.patch b/patches/server/0001-Rebrand.patch index 7e2a979e..5c1ef13b 100644 --- a/patches/server/0001-Rebrand.patch +++ b/patches/server/0001-Rebrand.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Rebrand diff --git a/build.gradle.kts b/build.gradle.kts -index 0f0895ca1faa1e4bbd96614b497efd6a6ced5e00..a681913af54f11633d7b3fc2a833ae64028dd25d 100644 +index 539f11b179e0b6473ca9b38ba971bd0b659bbdb4..dcccde28176c8800257d338117b87c83cc2286ca 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -9,7 +9,7 @@ plugins { @@ -53,10 +53,10 @@ index 5db4312ed1973a2395af66975a43abe5beffa1cd..1c671eb71254172fe023eb81cda21976 // Gale start - base thread pool while (serverThread.isAlive()) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index f903aa3d94505af701bb7f16269f7a25e5ab3044..586bb5f9b98594d29731e52760c74b7390d330d5 100644 +index 841492478d64a10e722ec5ac98b5a8606a65669a..d9934a9cfccd324dc35c4225e4a859f70a5c083d 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -261,7 +261,7 @@ import javax.annotation.Nullable; // Paper +@@ -267,7 +267,7 @@ import javax.annotation.Nullable; // Paper import javax.annotation.Nonnull; // Paper public final class CraftServer implements Server { diff --git a/patches/server/0005-Pufferfish-Dynamic-Activation-of-Brain.patch b/patches/server/0005-Pufferfish-Dynamic-Activation-of-Brain.patch index 9d5180cf..3f7be609 100644 --- a/patches/server/0005-Pufferfish-Dynamic-Activation-of-Brain.patch +++ b/patches/server/0005-Pufferfish-Dynamic-Activation-of-Brain.patch @@ -42,7 +42,7 @@ index d3b8df0766d34e557806a7578f856184c0b3d437..ccedeb88e4cbf0e1088412e72ee317c2 if (false && this.shouldDiscardEntity(entity)) { // CraftBukkit - We prevent spawning in general, so this butchering is not needed entity.discard(); diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 5f5d5aad855c64719420b0c67f543a118ee761e4..39f39e1a16016a977edb4ce2f8fc383e0743a607 100644 +index 804c1f0377b66a9fa0eebd9ab80945e4ff6929d2..2e3ab61998d4174f231118e7a4bdc9e25563715f 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -125,6 +125,7 @@ import net.minecraft.world.phys.shapes.Shapes; @@ -53,7 +53,7 @@ index 5f5d5aad855c64719420b0c67f543a118ee761e4..39f39e1a16016a977edb4ce2f8fc383e import org.slf4j.Logger; import org.bukkit.Bukkit; import org.bukkit.Location; -@@ -417,6 +418,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -419,6 +420,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { } // Paper end diff --git a/patches/server/0007-Pufferfish-Entity-TTL.patch b/patches/server/0007-Pufferfish-Entity-TTL.patch index fc0074c4..28c7db5b 100644 --- a/patches/server/0007-Pufferfish-Entity-TTL.patch +++ b/patches/server/0007-Pufferfish-Entity-TTL.patch @@ -7,10 +7,10 @@ Original license: GPL v3 Original project: https://github.com/pufferfish-gg/Pufferfish diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 39f39e1a16016a977edb4ce2f8fc383e0743a607..bdda260856984a4258554ae99f6928bfe851c4c7 100644 +index 2e3ab61998d4174f231118e7a4bdc9e25563715f..101ce131804492779e34218c65879398794e2d7f 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -820,6 +820,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -822,6 +822,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { // CraftBukkit end public void baseTick() { diff --git a/patches/server/0009-Purpur-Server-Changes.patch b/patches/server/0009-Purpur-Server-Changes.patch index 6ae4559a..46b2d8b9 100644 --- a/patches/server/0009-Purpur-Server-Changes.patch +++ b/patches/server/0009-Purpur-Server-Changes.patch @@ -456,7 +456,7 @@ index 82bce6109d59cba30178a446f0ff129da6f3692f..eaa620ad86abfb151b43f697973cbc73 throw new IllegalStateException("Unable to get CCW facing of " + this); } diff --git a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java -index 9598aa381978194fee859721731196f0e6ee08fc..2db46452d374f9b53db7bd80be5fbd9c8fce2c3e 100644 +index 88d18d18d69876c98e199acb647c6cca9448d55d..da9cc93f560269a00f0093ad76aba3a05eedb046 100644 --- a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java +++ b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java @@ -52,6 +52,7 @@ import net.minecraft.world.item.SpawnEggItem; @@ -467,7 +467,7 @@ index 9598aa381978194fee859721731196f0e6ee08fc..2db46452d374f9b53db7bd80be5fbd9c import net.minecraft.world.level.block.BaseFireBlock; import net.minecraft.world.level.block.BeehiveBlock; import net.minecraft.world.level.block.Block; -@@ -1167,6 +1168,23 @@ public interface DispenseItemBehavior { +@@ -1168,6 +1169,23 @@ public interface DispenseItemBehavior { } } }); @@ -1268,10 +1268,10 @@ index ccedeb88e4cbf0e1088412e72ee317c2182cb277..393579dda853b6881ec9817da2a74cbd } // Paper end diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 3611844b0e925af88975d56ecf94b21b3bbbcb9f..e30d61edb6db9b8a127996bcb1ee3821e4685386 100644 +index 4ea43001ecbaa37b60b42b1a90b14f2ffac62f36..97f29244a4e7cf4edb346b9f0d8d61f320fe9ee0 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -276,6 +276,11 @@ public class ServerPlayer extends Player { +@@ -278,6 +278,11 @@ public class ServerPlayer extends Player { public final com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet cachedSingleHashSet; // Paper public PlayerNaturallySpawnCreaturesEvent playerNaturallySpawnedEvent; // Paper public org.bukkit.event.player.PlayerQuitEvent.QuitReason quitReason = null; // Paper - there are a lot of changes to do if we change all methods leading to the event @@ -1283,7 +1283,7 @@ index 3611844b0e925af88975d56ecf94b21b3bbbcb9f..e30d61edb6db9b8a127996bcb1ee3821 public ServerPlayer(MinecraftServer server, ServerLevel world, GameProfile profile) { super(world, world.getSharedSpawnPos(), world.getSharedSpawnAngle(), profile); -@@ -375,6 +380,7 @@ public class ServerPlayer extends Player { +@@ -377,6 +382,7 @@ public class ServerPlayer extends Player { this.bukkitPickUpLoot = true; this.maxHealthCache = this.getMaxHealth(); this.cachedSingleMobDistanceMap = new com.destroystokyo.paper.util.PooledHashSets.PooledObjectLinkedOpenHashSet<>(this); // Paper @@ -1291,7 +1291,7 @@ index 3611844b0e925af88975d56ecf94b21b3bbbcb9f..e30d61edb6db9b8a127996bcb1ee3821 } // Yes, this doesn't match Vanilla, but it's the best we can do for now. -@@ -514,6 +520,9 @@ public class ServerPlayer extends Player { +@@ -516,6 +522,9 @@ public class ServerPlayer extends Player { } } @@ -1301,7 +1301,7 @@ index 3611844b0e925af88975d56ecf94b21b3bbbcb9f..e30d61edb6db9b8a127996bcb1ee3821 } @Override -@@ -580,6 +589,9 @@ public class ServerPlayer extends Player { +@@ -582,6 +591,9 @@ public class ServerPlayer extends Player { } this.getBukkitEntity().setExtraData(nbt); // CraftBukkit @@ -1311,7 +1311,7 @@ index 3611844b0e925af88975d56ecf94b21b3bbbcb9f..e30d61edb6db9b8a127996bcb1ee3821 } // CraftBukkit start - World fallback code, either respawn location or global spawn -@@ -708,6 +720,15 @@ public class ServerPlayer extends Player { +@@ -710,6 +722,15 @@ public class ServerPlayer extends Player { this.trackStartFallingPosition(); this.trackEnteredOrExitedLavaOnVehicle(); this.advancements.flushDirty(this); @@ -1327,7 +1327,7 @@ index 3611844b0e925af88975d56ecf94b21b3bbbcb9f..e30d61edb6db9b8a127996bcb1ee3821 } public void doTick() { -@@ -946,6 +967,7 @@ public class ServerPlayer extends Player { +@@ -948,6 +969,7 @@ public class ServerPlayer extends Player { })); Team scoreboardteambase = this.getTeam(); @@ -1335,7 +1335,7 @@ index 3611844b0e925af88975d56ecf94b21b3bbbcb9f..e30d61edb6db9b8a127996bcb1ee3821 if (scoreboardteambase != null && scoreboardteambase.getDeathMessageVisibility() != Team.Visibility.ALWAYS) { if (scoreboardteambase.getDeathMessageVisibility() == Team.Visibility.HIDE_FOR_OTHER_TEAMS) { this.server.getPlayerList().broadcastSystemToTeam(this, ichatbasecomponent); -@@ -1047,14 +1069,30 @@ public class ServerPlayer extends Player { +@@ -1049,14 +1071,30 @@ public class ServerPlayer extends Player { } @@ -1367,7 +1367,7 @@ index 3611844b0e925af88975d56ecf94b21b3bbbcb9f..e30d61edb6db9b8a127996bcb1ee3821 return false; } else { Entity entity = source.getEntity(); -@@ -1195,6 +1233,7 @@ public class ServerPlayer extends Player { +@@ -1197,6 +1235,7 @@ public class ServerPlayer extends Player { playerlist.sendPlayerPermissionLevel(this); worldserver1.removePlayerImmediately(this, Entity.RemovalReason.CHANGED_DIMENSION); this.unsetRemoved(); @@ -1375,7 +1375,7 @@ index 3611844b0e925af88975d56ecf94b21b3bbbcb9f..e30d61edb6db9b8a127996bcb1ee3821 // CraftBukkit end this.setLevel(worldserver); -@@ -1230,6 +1269,7 @@ public class ServerPlayer extends Player { +@@ -1232,6 +1271,7 @@ public class ServerPlayer extends Player { } // Paper end @@ -1383,7 +1383,7 @@ index 3611844b0e925af88975d56ecf94b21b3bbbcb9f..e30d61edb6db9b8a127996bcb1ee3821 return this; } } -@@ -1351,7 +1391,7 @@ public class ServerPlayer extends Player { +@@ -1353,7 +1393,7 @@ public class ServerPlayer extends Player { return entitymonster.isPreventingPlayerRest(this); }); @@ -1392,7 +1392,7 @@ index 3611844b0e925af88975d56ecf94b21b3bbbcb9f..e30d61edb6db9b8a127996bcb1ee3821 return Either.left(Player.BedSleepingProblem.NOT_SAFE); } } -@@ -1487,6 +1527,7 @@ public class ServerPlayer extends Player { +@@ -1489,6 +1529,7 @@ public class ServerPlayer extends Player { @Override public void openTextEdit(SignBlockEntity sign) { @@ -1400,7 +1400,7 @@ index 3611844b0e925af88975d56ecf94b21b3bbbcb9f..e30d61edb6db9b8a127996bcb1ee3821 sign.setAllowedPlayerEditor(this.getUUID()); this.connection.send(new ClientboundBlockUpdatePacket(this.level, sign.getBlockPos())); this.connection.send(new ClientboundOpenSignEditorPacket(sign.getBlockPos())); -@@ -1723,6 +1764,26 @@ public class ServerPlayer extends Player { +@@ -1725,6 +1766,26 @@ public class ServerPlayer extends Player { this.lastSentExp = -1; // CraftBukkit - Added to reset } @@ -1427,7 +1427,7 @@ index 3611844b0e925af88975d56ecf94b21b3bbbcb9f..e30d61edb6db9b8a127996bcb1ee3821 @Override public void displayClientMessage(Component message, boolean overlay) { this.sendSystemMessage(message, overlay); -@@ -2028,6 +2089,7 @@ public class ServerPlayer extends Player { +@@ -2030,6 +2091,7 @@ public class ServerPlayer extends Player { } public void sendTexturePack(String url, String hash, boolean required, @Nullable Component resourcePackPrompt) { @@ -1435,7 +1435,7 @@ index 3611844b0e925af88975d56ecf94b21b3bbbcb9f..e30d61edb6db9b8a127996bcb1ee3821 this.connection.send(new ClientboundResourcePackPacket(url, hash, required, resourcePackPrompt)); } -@@ -2042,8 +2104,63 @@ public class ServerPlayer extends Player { +@@ -2044,8 +2106,63 @@ public class ServerPlayer extends Player { public void resetLastActionTime() { this.lastActionTime = Util.getMillis(); @@ -1499,7 +1499,7 @@ index 3611844b0e925af88975d56ecf94b21b3bbbcb9f..e30d61edb6db9b8a127996bcb1ee3821 public ServerStatsCounter getStats() { return this.stats; } -@@ -2504,8 +2621,16 @@ public class ServerPlayer extends Player { +@@ -2517,8 +2634,16 @@ public class ServerPlayer extends Player { @Override public boolean isImmobile() { @@ -1517,7 +1517,7 @@ index 3611844b0e925af88975d56ecf94b21b3bbbcb9f..e30d61edb6db9b8a127996bcb1ee3821 @Override public Scoreboard getScoreboard() { -@@ -2554,4 +2679,50 @@ public class ServerPlayer extends Player { +@@ -2567,4 +2692,50 @@ public class ServerPlayer extends Player { return (CraftPlayer) super.getBukkitEntity(); } // CraftBukkit end @@ -1626,10 +1626,10 @@ index 4c8275728175ebc1fdc8d0e8d0ba8398cefa0e17..87c52aeabcafe40b3014fe23b7a807bf + // Purpur end } diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 279d4599e504e2e260c9b91403c0094485a8070f..fb96e1fa99589405db0b583a39a7d778c72d7f36 100644 +index f5f9b500d3c0221ef2eb5d2f1a5321d0ace0bb95..5ee7fee40fd930424456f4f454e94bc88951b0d2 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -347,6 +347,20 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -348,6 +348,20 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic private boolean justTeleported = false; private boolean hasMoved; // Spigot @@ -1650,7 +1650,7 @@ index 279d4599e504e2e260c9b91403c0094485a8070f..fb96e1fa99589405db0b583a39a7d778 public CraftPlayer getCraftPlayer() { return (this.player == null) ? null : (CraftPlayer) this.player.getBukkitEntity(); } -@@ -460,6 +474,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -461,6 +475,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } if (this.player.getLastActionTime() > 0L && this.server.getPlayerIdleTimeout() > 0 && Util.getMillis() - this.player.getLastActionTime() > (long) (this.server.getPlayerIdleTimeout() * 1000 * 60) && !this.player.wonGame) { // Paper - Prevent AFK kick while watching end credits. @@ -1663,7 +1663,7 @@ index 279d4599e504e2e260c9b91403c0094485a8070f..fb96e1fa99589405db0b583a39a7d778 this.player.resetLastActionTime(); // CraftBukkit - SPIGOT-854 this.disconnect(Component.translatable("multiplayer.disconnect.idling"), org.bukkit.event.player.PlayerKickEvent.Cause.IDLING); // Paper - kick event cause } -@@ -771,6 +791,8 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -772,6 +792,8 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic this.lastYaw = to.getYaw(); this.lastPitch = to.getPitch(); @@ -1672,7 +1672,7 @@ index 279d4599e504e2e260c9b91403c0094485a8070f..fb96e1fa99589405db0b583a39a7d778 // Skip the first time we do this if (true) { // Spigot - don't skip any move events Location oldTo = to.clone(); -@@ -847,6 +869,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -848,6 +870,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic if (packet.getId() == this.awaitingTeleport) { if (this.awaitingPositionFromClient == null) { this.disconnect(Component.translatable("multiplayer.disconnect.invalid_player_movement"), org.bukkit.event.player.PlayerKickEvent.Cause.INVALID_PLAYER_MOVEMENT); // Paper - kick event cause @@ -1680,7 +1680,7 @@ index 279d4599e504e2e260c9b91403c0094485a8070f..fb96e1fa99589405db0b583a39a7d778 return; } -@@ -1254,10 +1277,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1255,10 +1278,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic int maxBookPageSize = io.papermc.paper.configuration.GlobalConfiguration.get().itemValidation.bookSize.pageMax; double multiplier = Math.max(0.3D, Math.min(1D, io.papermc.paper.configuration.GlobalConfiguration.get().itemValidation.bookSize.totalMultiplier)); long byteAllowed = maxBookPageSize; @@ -1693,7 +1693,7 @@ index 279d4599e504e2e260c9b91403c0094485a8070f..fb96e1fa99589405db0b583a39a7d778 ScheduledServerThreadTaskQueues.add(() -> this.disconnect("Book too large!", org.bukkit.event.player.PlayerKickEvent.Cause.ILLEGAL_ACTION), ScheduledServerThreadTaskQueues.KICK_FOR_BOOK_TOO_LARGE_PACKET_TASK_MAX_DELAY); // Paper - kick event cause // Gale - base thread pool return; } -@@ -1281,6 +1306,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1282,6 +1307,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic if (byteTotal > byteAllowed) { ServerGamePacketListenerImpl.LOGGER.warn(this.player.getScoreboardName() + " tried to send too large of a book. Book Size: " + byteTotal + " - Allowed: "+ byteAllowed + " - Pages: " + pageList.size()); @@ -1701,7 +1701,7 @@ index 279d4599e504e2e260c9b91403c0094485a8070f..fb96e1fa99589405db0b583a39a7d778 ScheduledServerThreadTaskQueues.add(() -> this.disconnect("Book too large!", org.bukkit.event.player.PlayerKickEvent.Cause.ILLEGAL_ACTION), ScheduledServerThreadTaskQueues.KICK_FOR_BOOK_TOO_LARGE_PACKET_TASK_MAX_DELAY); // Paper - kick event cause // Gale - base thread pool return; } -@@ -1334,13 +1360,16 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1335,13 +1361,16 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic itemstack1.setTag(nbttagcompound.copy()); } @@ -1721,7 +1721,7 @@ index 279d4599e504e2e260c9b91403c0094485a8070f..fb96e1fa99589405db0b583a39a7d778 this.updateBookPages(pages, (s) -> { return Component.Serializer.toJson(Component.literal(s)); -@@ -1352,10 +1381,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1353,10 +1382,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic private void updateBookPages(List list, UnaryOperator unaryoperator, ItemStack itemstack, int slot, ItemStack handItem) { // CraftBukkit ListTag nbttaglist = new ListTag(); @@ -1737,7 +1737,7 @@ index 279d4599e504e2e260c9b91403c0094485a8070f..fb96e1fa99589405db0b583a39a7d778 Objects.requireNonNull(nbttaglist); stream.forEach(nbttaglist::add); -@@ -1365,11 +1397,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1366,11 +1398,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic for (int j = list.size(); i < j; ++i) { FilteredText filteredtext = (FilteredText) list.get(i); @@ -1751,7 +1751,7 @@ index 279d4599e504e2e260c9b91403c0094485a8070f..fb96e1fa99589405db0b583a39a7d778 } } -@@ -1382,6 +1414,16 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1383,6 +1415,16 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic this.player.getInventory().setItem(slot, CraftEventFactory.handleEditBookEvent(player, slot, handItem, itemstack)); // CraftBukkit // Paper - Don't ignore result (see other callsite for handleEditBookEvent) } @@ -1768,7 +1768,7 @@ index 279d4599e504e2e260c9b91403c0094485a8070f..fb96e1fa99589405db0b583a39a7d778 @Override public void handleEntityTagQuery(ServerboundEntityTagQuery packet) { PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); -@@ -1411,8 +1453,16 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1412,8 +1454,16 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @Override public void handleMovePlayer(ServerboundMovePlayerPacket packet) { PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); @@ -1786,7 +1786,7 @@ index 279d4599e504e2e260c9b91403c0094485a8070f..fb96e1fa99589405db0b583a39a7d778 } else { ServerLevel worldserver = this.player.getLevel(); -@@ -1578,7 +1628,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1579,7 +1629,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic if (!this.player.isChangingDimension() && d11 > org.spigotmc.SpigotConfig.movedWronglyThreshold && !this.player.isSleeping() && !this.player.gameMode.isCreative() && this.player.gameMode.getGameModeForPlayer() != GameType.SPECTATOR) { // Spigot flag2 = true; // Paper - diff on change, this should be moved wrongly @@ -1795,7 +1795,7 @@ index 279d4599e504e2e260c9b91403c0094485a8070f..fb96e1fa99589405db0b583a39a7d778 } this.player.absMoveTo(d0, d1, d2, f, f1); -@@ -1629,6 +1679,8 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1630,6 +1680,8 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic this.lastYaw = to.getYaw(); this.lastPitch = to.getPitch(); @@ -1804,7 +1804,7 @@ index 279d4599e504e2e260c9b91403c0094485a8070f..fb96e1fa99589405db0b583a39a7d778 // Skip the first time we do this if (from.getX() != Double.MAX_VALUE) { Location oldTo = to.clone(); -@@ -1668,6 +1720,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1669,6 +1721,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic this.player.resetFallDistance(); } @@ -1818,7 +1818,7 @@ index 279d4599e504e2e260c9b91403c0094485a8070f..fb96e1fa99589405db0b583a39a7d778 this.player.checkMovementStatistics(this.player.getX() - d3, this.player.getY() - d4, this.player.getZ() - d5); this.lastGoodX = this.player.getX(); this.lastGoodY = this.player.getY(); -@@ -1701,6 +1760,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1702,6 +1761,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } // Paper end - optimise out extra getCubes @@ -1831,7 +1831,7 @@ index 279d4599e504e2e260c9b91403c0094485a8070f..fb96e1fa99589405db0b583a39a7d778 private boolean isPlayerCollidingWithAnythingNew(LevelReader world, AABB box) { Iterable iterable = world.getCollisions(this.player, this.player.getBoundingBox().deflate(9.999999747378752E-6D)); VoxelShape voxelshape = Shapes.create(box.deflate(9.999999747378752E-6D)); -@@ -2045,6 +2110,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2046,6 +2111,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic boolean cancelled; if (movingobjectposition == null || movingobjectposition.getType() != HitResult.Type.BLOCK) { @@ -1839,7 +1839,7 @@ index 279d4599e504e2e260c9b91403c0094485a8070f..fb96e1fa99589405db0b583a39a7d778 org.bukkit.event.player.PlayerInteractEvent event = CraftEventFactory.callPlayerInteractEvent(this.player, Action.RIGHT_CLICK_AIR, itemstack, enumhand); cancelled = event.useItemInHand() == Event.Result.DENY; } else { -@@ -2095,12 +2161,21 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2096,12 +2162,21 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @Override public void handleResourcePackResponse(ServerboundResourcePackPacket packet) { PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); @@ -1861,7 +1861,7 @@ index 279d4599e504e2e260c9b91403c0094485a8070f..fb96e1fa99589405db0b583a39a7d778 player.getBukkitEntity().setResourcePackStatus(packStatus); this.cserver.getPluginManager().callEvent(new PlayerResourcePackStatusEvent(this.getCraftPlayer(), packStatus)); // CraftBukkit // Paper end -@@ -2400,7 +2475,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2406,7 +2481,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic do { instant1 = (Instant) this.lastChatTimeStamp.get(); if (timestamp.isBefore(instant1)) { @@ -1870,7 +1870,7 @@ index 279d4599e504e2e260c9b91403c0094485a8070f..fb96e1fa99589405db0b583a39a7d778 } } while (!this.lastChatTimeStamp.compareAndSet(instant1, timestamp)); -@@ -2826,6 +2901,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2832,6 +2907,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic AABB axisalignedbb = entity.getBoundingBox(); if (axisalignedbb.distanceToSqr(this.player.getEyePosition()) < ServerGamePacketListenerImpl.getMaxInteractionDistanceSquared(this.player.level)) { // Gale - make max interaction distance configurable @@ -1878,7 +1878,7 @@ index 279d4599e504e2e260c9b91403c0094485a8070f..fb96e1fa99589405db0b583a39a7d778 packet.dispatch(new ServerboundInteractPacket.Handler() { private void performInteraction(InteractionHand enumhand, ServerGamePacketListenerImpl.EntityInteraction playerconnection_a, PlayerInteractEntityEvent event) { // CraftBukkit ItemStack itemstack = ServerGamePacketListenerImpl.this.player.getItemInHand(enumhand); -@@ -2839,6 +2915,8 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2845,6 +2921,8 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic ServerGamePacketListenerImpl.this.cserver.getPluginManager().callEvent(event); @@ -1887,7 +1887,7 @@ index 279d4599e504e2e260c9b91403c0094485a8070f..fb96e1fa99589405db0b583a39a7d778 // Entity in bucket - SPIGOT-4048 and SPIGOT-6859a if ((entity instanceof Bucketable && entity instanceof LivingEntity && origItem != null && origItem.asItem() == Items.WATER_BUCKET) && (event.isCancelled() || ServerGamePacketListenerImpl.this.player.getInventory().getSelected() == null || ServerGamePacketListenerImpl.this.player.getInventory().getSelected().getItem() != origItem)) { entity.getEntityData().resendPossiblyDesyncedEntity(player); // Paper - The entire mob gets deleted, so resend it. -@@ -3390,6 +3468,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3396,6 +3474,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } } } @@ -1900,7 +1900,7 @@ index 279d4599e504e2e260c9b91403c0094485a8070f..fb96e1fa99589405db0b583a39a7d778 boolean flag1 = packet.getSlotNum() >= 1 && packet.getSlotNum() <= 45; boolean flag2 = itemstack.isEmpty() || itemstack.getDamageValue() >= 0 && itemstack.getCount() <= 64 && !itemstack.isEmpty(); -@@ -3496,11 +3580,17 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3502,11 +3586,17 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic for (int i = 0; i < signText.size(); ++i) { FilteredText filteredtext = (FilteredText) signText.get(i); @@ -1921,7 +1921,7 @@ index 279d4599e504e2e260c9b91403c0094485a8070f..fb96e1fa99589405db0b583a39a7d778 } SignChangeEvent event = new SignChangeEvent((org.bukkit.craftbukkit.block.CraftBlock) player.getWorld().getBlockAt(x, y, z), this.player.getBukkitEntity(), lines); this.cserver.getPluginManager().callEvent(event); -@@ -3582,6 +3672,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3588,6 +3678,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic private static final ResourceLocation CUSTOM_UNREGISTER = new ResourceLocation("unregister"); private static final ResourceLocation MINECRAFT_BRAND = new ResourceLocation("brand"); // Paper - Brand support @@ -1929,7 +1929,7 @@ index 279d4599e504e2e260c9b91403c0094485a8070f..fb96e1fa99589405db0b583a39a7d778 @Override public void handleCustomPayload(ServerboundCustomPayloadPacket packet) { -@@ -3606,6 +3697,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3612,6 +3703,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic ServerGamePacketListenerImpl.LOGGER.error("Couldn\'t unregister custom payload", ex); this.disconnect("Invalid payload UNREGISTER!", org.bukkit.event.player.PlayerKickEvent.Cause.INVALID_PAYLOAD); // Paper - kick event cause } @@ -1966,10 +1966,10 @@ index 5b7c12db86be64433c65e31e3ecc0b444b0ddf48..5ed89ce9d2c29927f48c1f7f8f9288f3 } } catch (AuthenticationUnavailableException authenticationunavailableexception) { diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index b798495da37b9502f1ae93a9a1711411a5dfebf5..2071c117e51f13880e08bbe51ab3d69c06af277e 100644 +index f70d5167fad762c858f10ba19636ddb829dc9538..4e1db6c64254eeef8579d4cae5919b5a6a18d200 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -533,6 +533,7 @@ public abstract class PlayerList { +@@ -536,6 +536,7 @@ public abstract class PlayerList { scoreboard.addPlayerToTeam(player.getScoreboardName(), collideRuleTeam); } // Paper end @@ -1977,7 +1977,7 @@ index b798495da37b9502f1ae93a9a1711411a5dfebf5..2071c117e51f13880e08bbe51ab3d69c // CraftBukkit - Moved from above, added world if (GaleGlobalConfiguration.get().logToConsole.playerLoginLocations) { // Gale - JettPack - make logging login location configurable PlayerList.LOGGER.info("{}[{}] logged in with entity id {} at ([{}]{}, {}, {})", player.getName().getString(), s1, player.getId(), worldserver1.serverLevelData.getLevelName(), player.getX(), player.getY(), player.getZ()); -@@ -648,6 +649,8 @@ public abstract class PlayerList { +@@ -651,6 +652,8 @@ public abstract class PlayerList { } public net.kyori.adventure.text.Component remove(ServerPlayer entityplayer, net.kyori.adventure.text.Component leaveMessage) { // Paper end @@ -1986,7 +1986,7 @@ index b798495da37b9502f1ae93a9a1711411a5dfebf5..2071c117e51f13880e08bbe51ab3d69c ServerLevel worldserver = entityplayer.getLevel(); entityplayer.awardStat(Stats.LEAVE_GAME); -@@ -802,7 +805,7 @@ public abstract class PlayerList { +@@ -805,7 +808,7 @@ public abstract class PlayerList { event.disallow(PlayerLoginEvent.Result.KICK_BANNED, PaperAdventure.asAdventure(ichatmutablecomponent)); // Paper - Adventure } else { // return this.players.size() >= this.maxPlayers && !this.canBypassPlayerLimit(gameprofile) ? IChatBaseComponent.translatable("multiplayer.disconnect.server_full") : null; @@ -1995,7 +1995,7 @@ index b798495da37b9502f1ae93a9a1711411a5dfebf5..2071c117e51f13880e08bbe51ab3d69c event.disallow(PlayerLoginEvent.Result.KICK_FULL, net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(org.spigotmc.SpigotConfig.serverFullMessage)); // Spigot // Paper - Adventure } } -@@ -1042,6 +1045,8 @@ public abstract class PlayerList { +@@ -1045,6 +1048,8 @@ public abstract class PlayerList { } // Paper end @@ -2004,7 +2004,7 @@ index b798495da37b9502f1ae93a9a1711411a5dfebf5..2071c117e51f13880e08bbe51ab3d69c // CraftBukkit end return entityplayer1; } -@@ -1141,6 +1146,20 @@ public abstract class PlayerList { +@@ -1144,6 +1149,20 @@ public abstract class PlayerList { } // CraftBukkit end @@ -2025,7 +2025,7 @@ index b798495da37b9502f1ae93a9a1711411a5dfebf5..2071c117e51f13880e08bbe51ab3d69c public void broadcastAll(Packet packet, ResourceKey dimension) { Iterator iterator = this.players.iterator(); -@@ -1244,6 +1263,7 @@ public abstract class PlayerList { +@@ -1247,6 +1266,7 @@ public abstract class PlayerList { } else { b0 = (byte) (24 + permissionLevel); } @@ -2033,7 +2033,7 @@ index b798495da37b9502f1ae93a9a1711411a5dfebf5..2071c117e51f13880e08bbe51ab3d69c player.connection.send(new ClientboundEntityEventPacket(player, b0)); } -@@ -1252,6 +1272,27 @@ public abstract class PlayerList { +@@ -1255,6 +1275,27 @@ public abstract class PlayerList { player.getBukkitEntity().recalculatePermissions(); // CraftBukkit this.server.getCommands().sendCommands(player); } // Paper @@ -2313,10 +2313,10 @@ index 14fab63346d56c72cd7534a04760efd10eef4295..745e792482f61c571e2efbd4200dd1bd @Override diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index bdda260856984a4258554ae99f6928bfe851c4c7..f75fb8c70804be269d388afd40b13645e9374d93 100644 +index 101ce131804492779e34218c65879398794e2d7f..7fdcd4b78ff43050c157dea7e4fd7b9aad2cda5c 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -156,7 +156,7 @@ import org.bukkit.plugin.PluginManager; +@@ -157,7 +157,7 @@ import org.bukkit.plugin.PluginManager; // CraftBukkit end public abstract class Entity implements Nameable, EntityAccess, CommandSource { @@ -2325,7 +2325,7 @@ index bdda260856984a4258554ae99f6928bfe851c4c7..f75fb8c70804be269d388afd40b13645 // CraftBukkit start private static final int CURRENT_LEVEL = 2; public boolean preserveMotion = true; // Paper - keep initial motion on first setPositionRotation -@@ -321,7 +321,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -322,7 +322,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { public double xOld; public double yOld; public double zOld; @@ -2334,7 +2334,7 @@ index bdda260856984a4258554ae99f6928bfe851c4c7..f75fb8c70804be269d388afd40b13645 public boolean noPhysics; protected final RandomSource random; public int tickCount; -@@ -363,7 +363,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -364,7 +364,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { private final Set tags; private final double[] pistonDeltas; private long pistonDeltasGameTime; @@ -2343,7 +2343,7 @@ index bdda260856984a4258554ae99f6928bfe851c4c7..f75fb8c70804be269d388afd40b13645 private float eyeHeight; public boolean isInPowderSnow; public boolean wasInPowderSnow; -@@ -401,6 +401,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -403,6 +403,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { private UUID originWorld; public boolean freezeLocked = false; // Paper - Freeze Tick Lock API public boolean collidingWithWorldBorder; // Paper @@ -2351,7 +2351,7 @@ index bdda260856984a4258554ae99f6928bfe851c4c7..f75fb8c70804be269d388afd40b13645 public void setOrigin(@javax.annotation.Nonnull Location location) { this.origin = location.toVector(); -@@ -581,7 +582,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -583,7 +584,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { this.bb = Entity.INITIAL_AABB; this.stuckSpeedMultiplier = Vec3.ZERO; this.nextStep = 1.0F; @@ -2360,7 +2360,7 @@ index bdda260856984a4258554ae99f6928bfe851c4c7..f75fb8c70804be269d388afd40b13645 this.remainingFireTicks = -this.getFireImmuneTicks(); this.fluidHeight = new Object2DoubleArrayMap(2); this.fluidOnEyes = new HashSet(); -@@ -900,10 +901,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -902,10 +903,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { public void checkOutOfWorld() { // Paper start - Configurable nether ceiling damage @@ -2373,7 +2373,7 @@ index bdda260856984a4258554ae99f6928bfe851c4c7..f75fb8c70804be269d388afd40b13645 this.outOfWorld(); } -@@ -1689,7 +1691,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -1691,7 +1693,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { } public boolean fireImmune() { @@ -2382,7 +2382,7 @@ index bdda260856984a4258554ae99f6928bfe851c4c7..f75fb8c70804be269d388afd40b13645 } public boolean causeFallDamage(float fallDistance, float damageMultiplier, DamageSource damageSource) { -@@ -1758,7 +1760,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -1760,7 +1762,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { return this.isInWater() || flag; } @@ -2391,7 +2391,7 @@ index bdda260856984a4258554ae99f6928bfe851c4c7..f75fb8c70804be269d388afd40b13645 Entity entity = this.getVehicle(); if (entity instanceof Boat) { -@@ -2359,6 +2361,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -2361,6 +2363,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { nbt.putBoolean("Paper.FreezeLock", true); } // Paper end @@ -2403,7 +2403,7 @@ index bdda260856984a4258554ae99f6928bfe851c4c7..f75fb8c70804be269d388afd40b13645 return nbt; } catch (Throwable throwable) { CrashReport crashreport = CrashReport.forThrowable(throwable, "Saving entity NBT"); -@@ -2527,6 +2534,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -2529,6 +2536,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { freezeLocked = nbt.getBoolean("Paper.FreezeLock"); } // Paper end @@ -2415,7 +2415,7 @@ index bdda260856984a4258554ae99f6928bfe851c4c7..f75fb8c70804be269d388afd40b13645 } catch (Throwable throwable) { CrashReport crashreport = CrashReport.forThrowable(throwable, "Loading entity NBT"); -@@ -2843,6 +2855,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -2845,6 +2857,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { this.passengers = ImmutableList.copyOf(list); } @@ -2429,7 +2429,7 @@ index bdda260856984a4258554ae99f6928bfe851c4c7..f75fb8c70804be269d388afd40b13645 this.gameEvent(GameEvent.ENTITY_MOUNT, entity); } return true; // CraftBukkit -@@ -2884,6 +2903,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -2886,6 +2905,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { return false; } // Spigot end @@ -2444,7 +2444,7 @@ index bdda260856984a4258554ae99f6928bfe851c4c7..f75fb8c70804be269d388afd40b13645 if (this.passengers.size() == 1 && this.passengers.get(0) == entity) { this.passengers = ImmutableList.of(); } else { -@@ -2943,12 +2970,15 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -2945,12 +2972,15 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { return Vec3.directionFromRotation(this.getRotationVector()); } @@ -2461,7 +2461,7 @@ index bdda260856984a4258554ae99f6928bfe851c4c7..f75fb8c70804be269d388afd40b13645 } this.isInsidePortal = true; -@@ -2997,7 +3027,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -2999,7 +3029,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { } this.processPortalCooldown(); @@ -2470,7 +2470,7 @@ index bdda260856984a4258554ae99f6928bfe851c4c7..f75fb8c70804be269d388afd40b13645 } } -@@ -3179,7 +3209,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -3181,7 +3211,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { } public int getMaxAirSupply() { @@ -2479,7 +2479,7 @@ index bdda260856984a4258554ae99f6928bfe851c4c7..f75fb8c70804be269d388afd40b13645 } public int getAirSupply() { -@@ -3638,7 +3668,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -3640,7 +3670,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { } public boolean canChangeDimensions() { @@ -2488,7 +2488,7 @@ index bdda260856984a4258554ae99f6928bfe851c4c7..f75fb8c70804be269d388afd40b13645 } public float getBlockExplosionResistance(Explosion explosion, BlockGetter world, BlockPos pos, BlockState blockState, FluidState fluidState, float max) { -@@ -3940,6 +3970,20 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -3942,6 +3972,20 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { return SlotAccess.NULL; } @@ -2509,7 +2509,7 @@ index bdda260856984a4258554ae99f6928bfe851c4c7..f75fb8c70804be269d388afd40b13645 @Override public void sendSystemMessage(Component message) {} -@@ -4221,6 +4265,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -4223,6 +4267,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { this.yRotO = this.getYRot(); } @@ -2521,7 +2521,7 @@ index bdda260856984a4258554ae99f6928bfe851c4c7..f75fb8c70804be269d388afd40b13645 public boolean updateFluidHeightAndDoFluidPushing(TagKey tag, double speed) { if (false && this.touchingUnloadedChunk()) { // Gale - Airplane - reduce entity fluid lookups if no fluids - cost of a lookup here is the same cost as below, so skip return false; -@@ -4759,4 +4808,81 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -4761,4 +4810,81 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { return ((net.minecraft.server.level.ServerChunkCache) level.getChunkSource()).isPositionTicking(this); } // Paper end @@ -2676,10 +2676,10 @@ index 8af0918d3a62de58a4b2af55022c812bb0e46092..3fc26a8976f4bfa28c2c6a862aac997d } diff --git a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java -index 2d3994de8e40eedc78c27ea842b6265b1c5ea822..7043f15f84d6c847bf376025c8e2150bdf650457 100644 +index 89699aaccd45a5a928a97d1b3ad06f5de5b9fad1..04805693a0cbc64c96a023c4abbee1827e1c7b7b 100644 --- a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java +++ b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java -@@ -323,7 +323,7 @@ public class ExperienceOrb extends Entity { +@@ -324,7 +324,7 @@ public class ExperienceOrb extends Entity { } private int repairPlayerItems(Player player, int amount) { @@ -10655,7 +10655,7 @@ index 9258d0f7c5c27b6d3d8f99db947169d6800d8ea9..0099595a5daa9c0ca9e3fd35933038c1 } } diff --git a/src/main/java/net/minecraft/world/entity/monster/Shulker.java b/src/main/java/net/minecraft/world/entity/monster/Shulker.java -index 19657390ddb73992d7b68dc77776faa99c6f1b15..07c78a6c4804f48c948e40819e55654683789bd4 100644 +index 8cb910da17d75a9d9c7dbeb3c9e24b6de657a2f7..8b03a027bff592b2257e065f328da6d86e11db98 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Shulker.java +++ b/src/main/java/net/minecraft/world/entity/monster/Shulker.java @@ -22,6 +22,8 @@ import net.minecraft.tags.DamageTypeTags; @@ -10676,7 +10676,7 @@ index 19657390ddb73992d7b68dc77776faa99c6f1b15..07c78a6c4804f48c948e40819e556546 import net.minecraft.world.level.Level; import net.minecraft.world.level.ServerLevelAccessor; import net.minecraft.world.level.block.Blocks; -@@ -95,12 +99,59 @@ public class Shulker extends AbstractGolem implements VariantHolder getVariant() { @@ -10771,7 +10771,7 @@ index 19657390ddb73992d7b68dc77776faa99c6f1b15..07c78a6c4804f48c948e40819e556546 } @Nullable -@@ -608,7 +668,7 @@ public class Shulker extends AbstractGolem implements VariantHolder type, Level world, double x, double y, double z) { -@@ -333,6 +335,12 @@ public abstract class AbstractMinecart extends Entity { +@@ -334,6 +336,12 @@ public abstract class AbstractMinecart extends Entity { @Override public void tick() { @@ -13188,7 +13188,7 @@ index 9a80cf593bbdd7681bc9395daf4545a98e07636f..cd8239423d964ef9b708d283a329986c // CraftBukkit start double prevX = this.getX(); double prevY = this.getY(); -@@ -496,16 +504,63 @@ public abstract class AbstractMinecart extends Entity { +@@ -497,16 +505,63 @@ public abstract class AbstractMinecart extends Entity { public void activateMinecart(int x, int y, int z, boolean powered) {} @@ -13252,7 +13252,7 @@ index 9a80cf593bbdd7681bc9395daf4545a98e07636f..cd8239423d964ef9b708d283a329986c this.move(MoverType.SELF, this.getDeltaMovement()); if (!this.onGround) { -@@ -667,7 +722,7 @@ public abstract class AbstractMinecart extends Entity { +@@ -668,7 +723,7 @@ public abstract class AbstractMinecart extends Entity { if (d18 > 0.01D) { double d20 = 0.06D; @@ -13262,10 +13262,10 @@ index 9a80cf593bbdd7681bc9395daf4545a98e07636f..cd8239423d964ef9b708d283a329986c Vec3 vec3d5 = this.getDeltaMovement(); double d21 = vec3d5.x; diff --git a/src/main/java/net/minecraft/world/entity/vehicle/Boat.java b/src/main/java/net/minecraft/world/entity/vehicle/Boat.java -index 5095e47b4910167235afdd8f1a7e9c45124ecadb..33de7cca8063618466fe47417e700a5b15c8dc70 100644 +index 12e3209c5246ede89daaf8455fe70b4a517e12f6..06421017e3a7a0511c253e2ad4a028b0c156c9a8 100644 --- a/src/main/java/net/minecraft/world/entity/vehicle/Boat.java +++ b/src/main/java/net/minecraft/world/entity/vehicle/Boat.java -@@ -222,7 +222,13 @@ public class Boat extends Entity implements VariantHolder { +@@ -223,7 +223,13 @@ public class Boat extends Entity implements VariantHolder { } protected void destroy(DamageSource source) { @@ -13280,7 +13280,7 @@ index 5095e47b4910167235afdd8f1a7e9c45124ecadb..33de7cca8063618466fe47417e700a5b } @Override -@@ -540,6 +546,7 @@ public class Boat extends Entity implements VariantHolder { +@@ -541,6 +547,7 @@ public class Boat extends Entity implements VariantHolder { if (f > 0.0F) { this.landFriction = f; @@ -13776,10 +13776,10 @@ index ff770b9ce68a62418de0c7ed389650626fa1dcb2..102739c0089ff3f6b3432f954304d43a return itemstack; diff --git a/src/main/java/net/minecraft/world/inventory/PlayerEnderChestContainer.java b/src/main/java/net/minecraft/world/inventory/PlayerEnderChestContainer.java -index 59acb1aab21e2dce0f046942f124b50ac1cb8d0f..5058b30994fe38d8db2336267121476eaf4f1ff6 100644 +index 4703f23316f82a1a942907b46d2d6dcb7d70ec37..162798f57a05b78121fa6c4fadf5adee80fbe221 100644 --- a/src/main/java/net/minecraft/world/inventory/PlayerEnderChestContainer.java +++ b/src/main/java/net/minecraft/world/inventory/PlayerEnderChestContainer.java -@@ -29,11 +29,18 @@ public class PlayerEnderChestContainer extends SimpleContainer { +@@ -30,11 +30,18 @@ public class PlayerEnderChestContainer extends SimpleContainer { } public PlayerEnderChestContainer(Player owner) { @@ -14217,7 +14217,7 @@ index 180aec596110309aade13d2080f8824d152b07cb..c4aec1e5135a79837918b692e75a7b55 return InteractionResult.PASS; } diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index e501450728e72c7e69a9009a26efbb813ff9ff42..dfaab6f5c511fafbea1110547bf4164c30c5f2e6 100644 +index f0b08787846f2d787826990b0684c4a4bf5fb8e6..2c2c6bd022c7f7f8ec28799a2843c1a83c18b3c4 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java @@ -111,6 +111,7 @@ import org.bukkit.event.world.StructureGrowEvent; @@ -14709,7 +14709,7 @@ index 3b959f42d958bf0f426853aee56753d6c455fcdb..d17abb283ea818244df0379d6b57fc63 if (range < 0.0D || d < range * range) { return true; diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java -index 52fb1e0f43caca93d77bf398eb759b36b84ebaec..27f0ba6fca626a44865f52dd47b6bee10804f9c1 100644 +index c321215a39cf9f69e90c2c6e139963f60877286b..65ff0b7a3866c39ffa6a7b9c9b8fe4b35092ed22 100644 --- a/src/main/java/net/minecraft/world/level/Explosion.java +++ b/src/main/java/net/minecraft/world/level/Explosion.java @@ -86,7 +86,7 @@ public class Explosion { @@ -14909,7 +14909,7 @@ index 5c5a3b169795bf8a527b316c666cbc2105c66622..020afeca950d2c7fb6c7b179d424548f return InteractionResult.SUCCESS; } else { diff --git a/src/main/java/net/minecraft/world/level/block/AzaleaBlock.java b/src/main/java/net/minecraft/world/level/block/AzaleaBlock.java -index 023ed8441d629629828051b4098b09b06ce51a75..0123904a521be6b2f8d9056769e98982d9e14ffa 100644 +index 95b53450a807fccfa55b59852da52785b8cf3e3d..c69f1d23979a0759472d22760a18d986b2d979b6 100644 --- a/src/main/java/net/minecraft/world/level/block/AzaleaBlock.java +++ b/src/main/java/net/minecraft/world/level/block/AzaleaBlock.java @@ -43,6 +43,20 @@ public class AzaleaBlock extends BushBlock implements BonemealableBlock { @@ -14932,7 +14932,7 @@ index 023ed8441d629629828051b4098b09b06ce51a75..0123904a521be6b2f8d9056769e98982 + // Purpur end TREE_GROWER.growTree(world, world.getChunkSource().getGenerator(), pos, state, random); } - } + diff --git a/src/main/java/net/minecraft/world/level/block/BaseCoralPlantTypeBlock.java b/src/main/java/net/minecraft/world/level/block/BaseCoralPlantTypeBlock.java index 3d2b34c5a7c9b00c1164b4f89c2cbff81fc460eb..b5505e926e5cdb447de68e8eb8e46c97eb988e27 100644 --- a/src/main/java/net/minecraft/world/level/block/BaseCoralPlantTypeBlock.java @@ -15362,24 +15362,19 @@ index a6c25647fb37f59307de0d390f8e8cf55504d7d3..52aae8bd4023b2bb48f12983f54b20fa world.scheduleTick(pos, this, 1); return super.updateShape(state, direction, neighborState, world, pos, neighborPos); diff --git a/src/main/java/net/minecraft/world/level/block/ComposterBlock.java b/src/main/java/net/minecraft/world/level/block/ComposterBlock.java -index 1694b48cd979778027811e7be3c940dc473611b0..be4825a04fc9686e4004b63571c9b8ae4185e0b9 100644 +index 29aa7303ce5854a7f2b5ed5f9ff02ca7e00bf6c0..13fe64e6c29488ed95366588e7cf05a6482ba780 100644 --- a/src/main/java/net/minecraft/world/level/block/ComposterBlock.java +++ b/src/main/java/net/minecraft/world/level/block/ComposterBlock.java -@@ -230,26 +230,28 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder { +@@ -230,21 +230,28 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder { ItemStack itemstack = player.getItemInHand(hand); if (i < 8 && ComposterBlock.COMPOSTABLES.containsKey(itemstack.getItem())) { - if (i < 7 && !world.isClientSide) { -- // Paper start - EntityChangeBlockEvent -- double rand = world.getRandom().nextDouble(); -- BlockState dummyBlockState = ComposterBlock.addItem(player, state, org.bukkit.craftbukkit.util.DummyGeneratorAccess.INSTANCE, pos, itemstack, rand); -- if (dummyBlockState == null) { +- BlockState iblockdata1 = ComposterBlock.addItem(player, state, world, pos, itemstack); +- // Paper start - handle cancelled events +- if (iblockdata1 == null) { - return InteractionResult.PASS; - } -- if (state != dummyBlockState && org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(player, pos, dummyBlockState).isCancelled()) { // if block state will change and event cancelled -- return InteractionResult.sidedSuccess(world.isClientSide); -- } -- BlockState iblockdata1 = ComposterBlock.addItem(player, state, world, pos, itemstack, rand); - // Paper end - - world.levelEvent(1500, pos, state != iblockdata1 ? 1 : 0); @@ -15412,7 +15407,7 @@ index 1694b48cd979778027811e7be3c940dc473611b0..be4825a04fc9686e4004b63571c9b8ae return InteractionResult.sidedSuccess(world.isClientSide); } else if (i == 8) { ComposterBlock.extractProduce(player, state, world, pos); -@@ -259,6 +261,32 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder { +@@ -254,6 +261,32 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder { } } @@ -15458,10 +15453,10 @@ index 88faea00be60a519f56f975a5311df5e1eb3e6b8..cbb726ac367be81e27d3a86643baf7c4 int i = aenumdirection.length; diff --git a/src/main/java/net/minecraft/world/level/block/CropBlock.java b/src/main/java/net/minecraft/world/level/block/CropBlock.java -index 519d02a2009c4f09c9e8be7196a701f0f042012d..74620e6aee75334498d903c616c090caa615f0b4 100644 +index a140fed067e7e6c1c42e111f47d3678863ef95ce..3415cbb1def0700b5998a8a1db2e48146f4c2c1e 100644 --- a/src/main/java/net/minecraft/world/level/block/CropBlock.java +++ b/src/main/java/net/minecraft/world/level/block/CropBlock.java -@@ -164,7 +164,7 @@ public class CropBlock extends BushBlock implements BonemealableBlock { +@@ -168,7 +168,7 @@ public class CropBlock extends BushBlock implements BonemealableBlock { @Override public void entityInside(BlockState state, Level world, BlockPos pos, Entity entity) { if (!new io.papermc.paper.event.entity.EntityInsideBlockEvent(entity.getBukkitEntity(), org.bukkit.craftbukkit.block.CraftBlock.at(world, pos)).callEvent()) { return; } // Paper @@ -15470,7 +15465,7 @@ index 519d02a2009c4f09c9e8be7196a701f0f042012d..74620e6aee75334498d903c616c090ca world.destroyBlock(pos, true, entity); } -@@ -199,4 +199,15 @@ public class CropBlock extends BushBlock implements BonemealableBlock { +@@ -203,4 +203,15 @@ public class CropBlock extends BushBlock implements BonemealableBlock { protected void createBlockStateDefinition(StateDefinition.Builder builder) { builder.add(CropBlock.AGE); } @@ -16001,7 +15996,7 @@ index e55720c4d2fbdf6aae526910e87a67c29cf906fd..bf4485b4cad324d5aace657ebf284c4d + // Purpur end } diff --git a/src/main/java/net/minecraft/world/level/block/NoteBlock.java b/src/main/java/net/minecraft/world/level/block/NoteBlock.java -index 50ead76879398222a76f26c36e98800d2d1af167..0b5ce2db558e721807944d9d0f672a77ce2a7fe0 100644 +index a9c2d254bda5686a35ad2393534b85030dd8b136..c11752564ea48960232844ee735779aa95d82c12 100644 --- a/src/main/java/net/minecraft/world/level/block/NoteBlock.java +++ b/src/main/java/net/minecraft/world/level/block/NoteBlock.java @@ -62,11 +62,13 @@ public class NoteBlock extends Block { @@ -16102,15 +16097,15 @@ index 7fddb6fa8fd30ef88346a59f7867aae792f13772..40893e71fe8447b695350273bef9623b } else { int j = pos.getX(); diff --git a/src/main/java/net/minecraft/world/level/block/RespawnAnchorBlock.java b/src/main/java/net/minecraft/world/level/block/RespawnAnchorBlock.java -index bcea8af63b9911c36873290e5c34567b1eeaacf4..1ceae2668a72c96b83bc5a499ac8989fd794b1d3 100644 +index 2ed78cf83c0ae66a6ddba1ff307da89a24b0d0a8..ae17d6a54fad0bd2d71d306f418b5ced2f11b863 100644 --- a/src/main/java/net/minecraft/world/level/block/RespawnAnchorBlock.java +++ b/src/main/java/net/minecraft/world/level/block/RespawnAnchorBlock.java -@@ -127,7 +127,7 @@ public class RespawnAnchorBlock extends Block { - } +@@ -141,7 +141,7 @@ public class RespawnAnchorBlock extends Block { }; - Vec3 vec3 = explodedPos.getCenter(); -- world.explode((Entity)null, world.damageSources().badRespawnPointExplosion(vec3, explodedBlockState), explosionDamageCalculator, vec3, 5.0F, true, Level.ExplosionInteraction.BLOCK); -+ if (world.purpurConfig.respawnAnchorExplode)world.explode((Entity) null, world.damageSources().badRespawnPointExplosion(vec3, explodedBlockState), explosionDamageCalculator, vec3, (float) world.purpurConfig.respawnAnchorExplosionPower, world.purpurConfig.respawnAnchorExplosionFire, world.purpurConfig.respawnAnchorExplosionEffect); // Paper // Purpur + Vec3 vec3d = explodedPos.getCenter(); + +- world.explode((Entity) null, world.damageSources().badRespawnPointExplosion(vec3d, explodedBlockState), explosiondamagecalculator, vec3d, 5.0F, true, Level.ExplosionInteraction.BLOCK); // Paper ++ if (world.purpurConfig.respawnAnchorExplode)world.explode((Entity) null, world.damageSources().badRespawnPointExplosion(vec3d, explodedBlockState), explosiondamagecalculator, vec3d, (float) world.purpurConfig.respawnAnchorExplosionPower, world.purpurConfig.respawnAnchorExplosionFire, world.purpurConfig.respawnAnchorExplosionEffect); // Paper // Purpur } public static boolean canSetSpawn(Level world) { @@ -17432,11 +17427,11 @@ index 714afc98b5150907b45a00060be4e41582333204..312a6d90c0a09570aef24c205dc2ff27 + // Purpur end - OfflinePlayer API } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 586bb5f9b98594d29731e52760c74b7390d330d5..9a899983bd79d4994e1d2611c4450862a81c60a9 100644 +index d9934a9cfccd324dc35c4225e4a859f70a5c083d..aa276ff3319b7eda1cf84de40924236175febb66 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -322,6 +322,20 @@ public final class CraftServer implements Server { - this.structureManager = new CraftStructureManager(console.getStructureManager()); +@@ -330,6 +330,20 @@ public final class CraftServer implements Server { + this.dataPackManager = new CraftDataPackManager(this.getServer().getPackRepository()); Bukkit.setServer(this); + // Purpur start @@ -17456,7 +17451,7 @@ index 586bb5f9b98594d29731e52760c74b7390d330d5..9a899983bd79d4994e1d2611c4450862 // Register all the Enchantments and PotionTypes now so we can stop new registration immediately after Enchantments.SHARPNESS.getClass(); -@@ -962,6 +976,7 @@ public final class CraftServer implements Server { +@@ -985,6 +999,7 @@ public final class CraftServer implements Server { org.spigotmc.SpigotConfig.init((File) console.options.valueOf("spigot-settings")); // Spigot this.console.paperConfigurations.reloadConfigs(this.console); @@ -17464,7 +17459,7 @@ index 586bb5f9b98594d29731e52760c74b7390d330d5..9a899983bd79d4994e1d2611c4450862 this.console.galeConfigurations.reloadConfigs(this.console); // Gale - Gale configuration for (ServerLevel world : this.console.getAllLevelsArray()) { // Gale - base thread pool - optimize server levels // world.serverLevelData.setDifficulty(config.difficulty); // Paper - per level difficulty -@@ -978,6 +993,7 @@ public final class CraftServer implements Server { +@@ -1001,6 +1016,7 @@ public final class CraftServer implements Server { } } world.spigotConfig.init(); // Spigot @@ -17472,7 +17467,7 @@ index 586bb5f9b98594d29731e52760c74b7390d330d5..9a899983bd79d4994e1d2611c4450862 } Plugin[] pluginClone = pluginManager.getPlugins().clone(); // Paper -@@ -993,6 +1009,7 @@ public final class CraftServer implements Server { +@@ -1016,6 +1032,7 @@ public final class CraftServer implements Server { this.reloadData(); org.spigotmc.SpigotConfig.registerCommands(); // Spigot io.papermc.paper.command.PaperCommands.registerCommands(this.console); // Paper @@ -17480,7 +17475,7 @@ index 586bb5f9b98594d29731e52760c74b7390d330d5..9a899983bd79d4994e1d2611c4450862 this.overrideAllCommandBlockCommands = this.commandsConfiguration.getStringList("command-block-overrides").contains("*"); this.ignoreVanillaPermissions = this.commandsConfiguration.getBoolean("ignore-vanilla-permissions"); -@@ -1434,6 +1451,55 @@ public final class CraftServer implements Server { +@@ -1457,6 +1474,55 @@ public final class CraftServer implements Server { return true; } @@ -17536,7 +17531,7 @@ index 586bb5f9b98594d29731e52760c74b7390d330d5..9a899983bd79d4994e1d2611c4450862 @Override public List getRecipesFor(ItemStack result) { Validate.notNull(result, "Result cannot be null"); -@@ -2705,6 +2771,7 @@ public final class CraftServer implements Server { +@@ -2728,6 +2794,7 @@ public final class CraftServer implements Server { @Override public double[] getTPS() { return new double[] { @@ -17544,7 +17539,7 @@ index 586bb5f9b98594d29731e52760c74b7390d330d5..9a899983bd79d4994e1d2611c4450862 net.minecraft.server.MinecraftServer.getServer().tps1.getAverage(), net.minecraft.server.MinecraftServer.getServer().tps5.getAverage(), net.minecraft.server.MinecraftServer.getServer().tps15.getAverage() -@@ -2797,6 +2864,18 @@ public final class CraftServer implements Server { +@@ -2820,6 +2887,18 @@ public final class CraftServer implements Server { } // Gale end - Gale configuration - API @@ -17563,7 +17558,7 @@ index 586bb5f9b98594d29731e52760c74b7390d330d5..9a899983bd79d4994e1d2611c4450862 @Override public void restart() { org.spigotmc.RestartCommand.restart(); -@@ -2990,4 +3069,15 @@ public final class CraftServer implements Server { +@@ -3051,4 +3130,15 @@ public final class CraftServer implements Server { } // Gale end - YAPFA - last tick time - API @@ -17580,10 +17575,10 @@ index 586bb5f9b98594d29731e52760c74b7390d330d5..9a899983bd79d4994e1d2611c4450862 + // Purpur end } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 19c6d8ef623127c878a99dec0f8538e8d446ac6d..4f21b644292b53e0b3887c6926655d85ebf6b6b6 100644 +index 1cdcf0b7ec11c7bda92aeed2f3470e9419e1214e..d888994c07299c890c2fc6ee2dce0a1632bf1ea4 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -2261,6 +2261,48 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -2282,6 +2282,48 @@ public class CraftWorld extends CraftRegionAccessor implements World { return (this.getHandle().dragonFight() == null) ? null : new CraftDragonBattle(this.getHandle().dragonFight()); } @@ -17633,7 +17628,7 @@ index 19c6d8ef623127c878a99dec0f8538e8d446ac6d..4f21b644292b53e0b3887c6926655d85 public PersistentDataContainer getPersistentDataContainer() { return this.persistentDataContainer; diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index 74eee94f75391ef2d16a5becbfa498fde96526e7..5861f320b9ebb07bd4ae2ae0b5d9f8b0bf32d0ed 100644 +index de002d388bcf8e39407d1f84ae1286e8aede3d1d..a1f0af0a5f171ae80b7dc4dcf1c8669f0763da11 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -242,6 +242,20 @@ public class Main { @@ -17657,7 +17652,7 @@ index 74eee94f75391ef2d16a5becbfa498fde96526e7..5861f320b9ebb07bd4ae2ae0b5d9f8b0 // Paper start acceptsAll(asList("server-name"), "Name of the server") .withRequiredArg() -@@ -346,7 +360,7 @@ public class Main { +@@ -353,7 +367,7 @@ public class Main { System.setProperty(net.minecrell.terminalconsole.TerminalConsoleAppender.JLINE_OVERRIDE_PROPERTY, "false"); // Paper } @@ -17698,7 +17693,7 @@ index 75c7645fb5732c43d1da15181cf5c7ee4c3ecd6c..e7f5ea4d8d72672cf03483e720c63894 // Paper start @Override diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index 9dbfb5cb3b5b0bfa7a6b0dc871e86871e7f1b315..6631436fb7abf29f89ade7d4a5a647e41af70456 100644 +index 7b4f51358d36a52e90d2cda25cd884772f62d65b..68d64aeed647d58b981a18b21c42ed8d74708717 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java @@ -210,6 +210,11 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { @@ -17763,10 +17758,10 @@ index 9dbfb5cb3b5b0bfa7a6b0dc871e86871e7f1b315..6631436fb7abf29f89ade7d4a5a647e4 + // Purpur end } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -index c8cccfcf4d572a9e65fce09621aeed2a7045003c..d27916575c5cd380711e7ce1709d8fac429c39e2 100644 +index 1b008e5217c5bbf566a213abb92e1c7c43a3a7c2..468023414b4a9119a3418b8e8a5e38375bbd2407 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -@@ -265,6 +265,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -266,6 +266,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { @Override public void recalculatePermissions() { this.perm.recalculatePermissions(); @@ -17947,10 +17942,10 @@ index 4d7a2c4c1001aefe9fcd4be8dbcb414f721bfff9..2c7716a9d65ebda209a144b82c2126b6 + // Purpur end } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index c8d8ab8e5d8d0a986ff023ce1e195667472d7798..1ddb96be5644a8af51c2e3677e31773a61033aca 100644 +index be64633c8bcee96f2ad5247525cac965b7b031b1..e363891e8ab872ed24c557e3f94110f36c6fb277 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -529,10 +529,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -534,10 +534,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @Override public void setPlayerListName(String name) { @@ -17967,7 +17962,7 @@ index c8d8ab8e5d8d0a986ff023ce1e195667472d7798..1ddb96be5644a8af51c2e3677e31773a for (ServerPlayer player : (List) server.getHandle().players) { if (player.getBukkitEntity().canSee(this)) { player.connection.send(new ClientboundPlayerInfoUpdatePacket(ClientboundPlayerInfoUpdatePacket.Action.UPDATE_DISPLAY_NAME, this.getHandle())); -@@ -1359,6 +1364,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1358,6 +1363,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } if (entity.isVehicle() && !ignorePassengers) { // Paper - Teleport API @@ -17978,7 +17973,7 @@ index c8d8ab8e5d8d0a986ff023ce1e195667472d7798..1ddb96be5644a8af51c2e3677e31773a return false; } -@@ -2396,6 +2405,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2405,6 +2414,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player { return this.getHandle().getAbilities().walkingSpeed * 2f; } @@ -18007,7 +18002,7 @@ index c8d8ab8e5d8d0a986ff023ce1e195667472d7798..1ddb96be5644a8af51c2e3677e31773a private void validateSpeed(float value) { if (value < 0) { if (value < -1f) { -@@ -3188,4 +3219,97 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -3180,4 +3211,97 @@ public class CraftPlayer extends CraftHumanEntity implements Player { return this.spigot; } // Spigot end @@ -18128,10 +18123,10 @@ index 42b7058d93fab8cbee49dba130734e1df9910096..5c6f55527cc0016f09b443528463b390 + // Purpur end } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java -index a1a8ac55e572156671e47317ba061855be79e5ac..ec3fb8865211bd7625103c37af7b96df37163a07 100644 +index 4e880409b06086568627f3e930159f1abb979984..48fb7302b54f8e7f5c424210b550c03d4d071ea9 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java -@@ -222,4 +222,11 @@ public class CraftVillager extends CraftAbstractVillager implements Villager { +@@ -223,4 +223,11 @@ public class CraftVillager extends CraftAbstractVillager implements Villager { getHandle().getGossips().gossips.clear(); } // Paper end @@ -18144,11 +18139,11 @@ index a1a8ac55e572156671e47317ba061855be79e5ac..ec3fb8865211bd7625103c37af7b96df + // Purpur end } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftWither.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftWither.java -index 4cf3a374c9ee7c7bcf82e778aa094eb4f8463595..5c1bfd37d4494525d7890f6530a68ae47353e157 100644 +index 1a21d30620f13a48976da5ead7edab201ea68b21..a50a04dc2009515032058562627eba8e4406c5bb 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftWither.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftWither.java -@@ -88,4 +88,17 @@ public class CraftWither extends CraftMonster implements Wither, com.destroystok - getHandle().setCanTravelThroughPortals(value); +@@ -105,4 +105,17 @@ public class CraftWither extends CraftMonster implements Wither, com.destroystok + this.getHandle().makeInvulnerable(); } // Paper end + @@ -18187,10 +18182,10 @@ index e43fd3e59fd8c74828ae65965fade27f56beef65..b2f133c8baabba1cffa6e92ea0f85453 + // Purpur end } diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index dee0168b50c7fbaefb762939a04e8f51e7bc58f7..85180c61e6124989e227150e0fdd5484ae3ebf1c 100644 +index a153c134cf26e86d49ef419eca35994539af0db3..e9599e0f3d2122c3843ebde81743bc8d558bfd30 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -561,6 +561,15 @@ public class CraftEventFactory { +@@ -563,6 +563,15 @@ public class CraftEventFactory { // Paper end craftServer.getPluginManager().callEvent(event); @@ -18206,7 +18201,7 @@ index dee0168b50c7fbaefb762939a04e8f51e7bc58f7..85180c61e6124989e227150e0fdd5484 return event; } -@@ -998,6 +1007,7 @@ public class CraftEventFactory { +@@ -1000,6 +1009,7 @@ public class CraftEventFactory { damageCause = DamageCause.ENTITY_EXPLOSION; } event = new EntityDamageByEntityEvent(damager.getBukkitEntity(), entity.getBukkitEntity(), damageCause, modifiers, modifierFunctions, source.isCritical()); // Paper - add critical damage API @@ -18214,7 +18209,7 @@ index dee0168b50c7fbaefb762939a04e8f51e7bc58f7..85180c61e6124989e227150e0fdd5484 } event.setCancelled(cancelled); -@@ -1112,6 +1122,7 @@ public class CraftEventFactory { +@@ -1114,6 +1124,7 @@ public class CraftEventFactory { } else { entity.lastDamageCancelled = true; // SPIGOT-5339, SPIGOT-6252, SPIGOT-6777: Keep track if the event was canceled } @@ -18222,7 +18217,7 @@ index dee0168b50c7fbaefb762939a04e8f51e7bc58f7..85180c61e6124989e227150e0fdd5484 return event; } -@@ -1171,6 +1182,7 @@ public class CraftEventFactory { +@@ -1173,6 +1184,7 @@ public class CraftEventFactory { EntityDamageEvent event; if (damager != null) { event = new EntityDamageByEntityEvent(damager.getBukkitEntity(), damagee.getBukkitEntity(), cause, modifiers, modifierFunctions, critical); // Paper - add critical damage API @@ -18231,10 +18226,10 @@ index dee0168b50c7fbaefb762939a04e8f51e7bc58f7..85180c61e6124989e227150e0fdd5484 event = new EntityDamageEvent(damagee.getBukkitEntity(), cause, modifiers, modifierFunctions); } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java -index 191e8233deaa859d969d54242e297e722f3d947b..76e26542448d18750ce33d53d54c2a77c0590554 100644 +index 04088918e172eecb8d53b0e6de9be0071ccf33b5..eddd6073e0feb7b046db1d169020ca067fdf689c 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java -@@ -166,8 +166,19 @@ public class CraftContainer extends AbstractContainerMenu { +@@ -182,8 +182,19 @@ public class CraftContainer extends AbstractContainerMenu { case PLAYER: case CHEST: case ENDER_CHEST: diff --git a/patches/server/0010-Bump-Dependencies.patch b/patches/server/0010-Bump-Dependencies.patch index 8f9051d4..61b5308d 100644 --- a/patches/server/0010-Bump-Dependencies.patch +++ b/patches/server/0010-Bump-Dependencies.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Bump Dependencies diff --git a/build.gradle.kts b/build.gradle.kts -index 3c1e97fb031f7cdf73ecb6cf8ec662e08b78f96f..12b91410d3f0afd5882960563bf54b59e8c42b5e 100644 +index 586d7998918fdb8b1db3c433d10234b6d7943115..c068173108818b8b042e1c1f518cf60bbf25c9b3 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -11,13 +11,13 @@ dependencies { @@ -25,7 +25,7 @@ index 3c1e97fb031f7cdf73ecb6cf8ec662e08b78f96f..12b91410d3f0afd5882960563bf54b59 implementation("net.minecrell:terminalconsoleappender:1.3.0") /* Required to add the missing Log4j2Plugins.dat file from log4j-core -@@ -25,22 +25,24 @@ dependencies { +@@ -25,14 +25,16 @@ dependencies { all its classes to check if they are plugins. Scanning takes about 1-2 seconds so adding this speeds up the server start. */ @@ -49,8 +49,7 @@ index 3c1e97fb031f7cdf73ecb6cf8ec662e08b78f96f..12b91410d3f0afd5882960563bf54b59 implementation("org.spongepowered:configurate-yaml:4.1.2") // Paper - config files implementation("commons-lang:commons-lang:2.6") implementation("net.fabricmc:mapping-io:0.3.0") // Paper - needed to read mappings for stacktrace deobfuscation -- runtimeOnly("org.xerial:sqlite-jdbc:3.41.0.0") -+ runtimeOnly("org.xerial:sqlite-jdbc:3.41.2.1") // Leaf - Bump Dependencies +@@ -40,7 +42,7 @@ dependencies { runtimeOnly("com.mysql:mysql-connector-j:8.0.32") runtimeOnly("com.lmax:disruptor:3.4.4") // Paper // Paper start - Use Velocity cipher diff --git a/patches/server/0014-Remove-UseItemOnPacket-Too-Far-Check.patch b/patches/server/0014-Remove-UseItemOnPacket-Too-Far-Check.patch index 7966c530..e016c1e9 100644 --- a/patches/server/0014-Remove-UseItemOnPacket-Too-Far-Check.patch +++ b/patches/server/0014-Remove-UseItemOnPacket-Too-Far-Check.patch @@ -7,7 +7,7 @@ This Check is added in 1.17.x -> 1.18.x update by Mojang. By removing this check, it enable hackers to use some modules of hack clients. diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index d7c4cfa97306aa0511e21a58503babefdbfe1182..f731908eb34c3fc0bfd9df935257ab7877091ab6 100644 +index 5ee7fee40fd930424456f4f454e94bc88951b0d2..a157789fc6f3bdcbbf7321d5238c746833511630 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -190,6 +190,7 @@ import org.bukkit.craftbukkit.util.permissions.CraftDefaultPermissions; @@ -18,7 +18,7 @@ index d7c4cfa97306aa0511e21a58503babefdbfe1182..f731908eb34c3fc0bfd9df935257ab78 import org.slf4j.Logger; // CraftBukkit start -@@ -2043,7 +2044,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2044,7 +2045,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic Vec3 vec3d2 = vec3d.subtract(vec3d1); double d0 = 1.0000001D; diff --git a/patches/server/0016-KeYi-Player-Skull-API.patch b/patches/server/0016-KeYi-Player-Skull-API.patch index 8a85461b..e94043c4 100644 --- a/patches/server/0016-KeYi-Player-Skull-API.patch +++ b/patches/server/0016-KeYi-Player-Skull-API.patch @@ -7,7 +7,7 @@ Original license: MIT Original project: https://github.com/KeYiMC/KeYi diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 1ddb96be5644a8af51c2e3677e31773a61033aca..c8059ce5a3d8020c6e9264251fac83fd7e613511 100644 +index e363891e8ab872ed24c557e3f94110f36c6fb277..e61ce64d14e0c216f9462ebbf640b1b60fdfcd87 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -25,6 +25,11 @@ import java.util.Optional; @@ -22,7 +22,7 @@ index 1ddb96be5644a8af51c2e3677e31773a61033aca..c8059ce5a3d8020c6e9264251fac83fd import java.util.logging.Level; import java.util.logging.Logger; import javax.annotation.Nullable; -@@ -148,6 +153,7 @@ import org.bukkit.event.player.PlayerUnregisterChannelEvent; +@@ -153,6 +158,7 @@ import org.bukkit.event.player.PlayerUnregisterChannelEvent; import org.bukkit.inventory.EquipmentSlot; import org.bukkit.inventory.InventoryView.Property; import org.bukkit.inventory.ItemStack; @@ -30,7 +30,7 @@ index 1ddb96be5644a8af51c2e3677e31773a61033aca..c8059ce5a3d8020c6e9264251fac83fd import org.bukkit.map.MapCursor; import org.bukkit.map.MapView; import org.bukkit.metadata.MetadataValue; -@@ -3312,4 +3318,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -3304,4 +3310,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player { this.getHandle().connection.send(packet); } // Purpur end diff --git a/patches/server/0024-Slice-Smooth-Teleports.patch b/patches/server/0024-Slice-Smooth-Teleports.patch index 71472e45..d217a6d5 100644 --- a/patches/server/0024-Slice-Smooth-Teleports.patch +++ b/patches/server/0024-Slice-Smooth-Teleports.patch @@ -7,10 +7,10 @@ Original license: MIT Original project: https://github.com/Cryptite/Slice diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index e30d61edb6db9b8a127996bcb1ee3821e4685386..08a2ba1c8b3fdf0e0dbd1be5e8fdb5a43c6b924d 100644 +index 97f29244a4e7cf4edb346b9f0d8d61f320fe9ee0..ae1931d4756f237c3f3ad74eefabfc8de84cde40 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -281,6 +281,7 @@ public class ServerPlayer extends Player { +@@ -283,6 +283,7 @@ public class ServerPlayer extends Player { private boolean ramBar = false; // Purpur private boolean tpsBar = false; // Purpur private boolean compassBar = false; // Purpur @@ -19,10 +19,10 @@ index e30d61edb6db9b8a127996bcb1ee3821e4685386..08a2ba1c8b3fdf0e0dbd1be5e8fdb5a4 public ServerPlayer(MinecraftServer server, ServerLevel world, GameProfile profile) { super(world, world.getSharedSpawnPos(), world.getSharedSpawnAngle(), profile); diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 333f43e19741ce5db44e2090ceb56bdc5d77b997..2b633067308ab747c0e6da9635161c4e4d3b3610 100644 +index 4e1db6c64254eeef8579d4cae5919b5a6a18d200..297141cb63786dc356a70ee8af2614fe060b9373 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -986,12 +986,12 @@ public abstract class PlayerList { +@@ -989,12 +989,12 @@ public abstract class PlayerList { int i = flag ? 1 : 0; // CraftBukkit start LevelData worlddata = worldserver1.getLevelData(); @@ -32,16 +32,16 @@ index 333f43e19741ce5db44e2090ceb56bdc5d77b997..2b633067308ab747c0e6da9635161c4e entityplayer1.connection.send(new ClientboundSetSimulationDistancePacket(worldserver1.getChunkSource().chunkMap.playerChunkManager.getTargetTickViewDistance())); // Spigot // Paper - replace old player chunk management entityplayer1.spawnIn(worldserver1); entityplayer1.unsetRemoved(); -- entityplayer1.connection.teleport(new Location(worldserver1.getWorld(), entityplayer1.getX(), entityplayer1.getY(), entityplayer1.getZ(), entityplayer1.getYRot(), entityplayer1.getXRot())); -+ if (!entityplayer.smoothWorldTeleport) entityplayer1.connection.teleport(new Location(worldserver1.getWorld(), entityplayer1.getX(), entityplayer1.getY(), entityplayer1.getZ(), entityplayer1.getYRot(), entityplayer1.getXRot())); +- entityplayer1.connection.teleport(CraftLocation.toBukkit(entityplayer1.position(), worldserver1.getWorld(), entityplayer1.getYRot(), entityplayer1.getXRot())); ++ if (!entityplayer.smoothWorldTeleport) entityplayer1.connection.teleport(CraftLocation.toBukkit(entityplayer1.position(), worldserver1.getWorld(), entityplayer1.getYRot(), entityplayer1.getXRot())); entityplayer1.setShiftKeyDown(false); // entityplayer1.connection.teleport(entityplayer1.getX(), entityplayer1.getY(), entityplayer1.getZ(), entityplayer1.getYRot(), entityplayer1.getXRot()); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index e215f286bd7f6bb15442588860627aaa188acf7a..6198e1665e86f4b78f8ef444e42817395fe0f563 100644 +index e61ce64d14e0c216f9462ebbf640b1b60fdfcd87..8467f815b17e3a9ed28c525da63c0477a322462b 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1274,6 +1274,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1273,6 +1273,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { // Paper end } diff --git a/patches/server/0027-Leaves-Server-Utils.patch b/patches/server/0027-Leaves-Server-Utils.patch index d6dd2f49..8f465aca 100644 --- a/patches/server/0027-Leaves-Server-Utils.patch +++ b/patches/server/0027-Leaves-Server-Utils.patch @@ -33,10 +33,10 @@ index 46954db7ecd35ac4018fdf476df7c8020d7ce6c8..044c51ebb058fc36074fd178929e3279 public PlayerAreaMap() { super(); diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index f75fb8c70804be269d388afd40b13645e9374d93..a9b85a133072a1c7659112e20061e27995a44eb3 100644 +index 7fdcd4b78ff43050c157dea7e4fd7b9aad2cda5c..418686a2c3e64182558a7cc4204bdecd3fbbe564 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -402,6 +402,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -404,6 +404,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { public boolean freezeLocked = false; // Paper - Freeze Tick Lock API public boolean collidingWithWorldBorder; // Paper public @Nullable Boolean immuneToFire = null; // Purpur - Fire immune API @@ -44,7 +44,7 @@ index f75fb8c70804be269d388afd40b13645e9374d93..a9b85a133072a1c7659112e20061e279 public void setOrigin(@javax.annotation.Nonnull Location location) { this.origin = location.toVector(); -@@ -2366,6 +2367,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -2368,6 +2369,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { nbt.putBoolean("Purpur.FireImmune", immuneToFire); } // Purpur end @@ -52,7 +52,7 @@ index f75fb8c70804be269d388afd40b13645e9374d93..a9b85a133072a1c7659112e20061e279 return nbt; } catch (Throwable throwable) { CrashReport crashreport = CrashReport.forThrowable(throwable, "Saving entity NBT"); -@@ -2539,6 +2541,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -2541,6 +2543,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { immuneToFire = nbt.getBoolean("Purpur.FireImmune"); } // Purpur end @@ -64,7 +64,7 @@ index f75fb8c70804be269d388afd40b13645e9374d93..a9b85a133072a1c7659112e20061e279 } catch (Throwable throwable) { CrashReport crashreport = CrashReport.forThrowable(throwable, "Loading entity NBT"); -@@ -4885,4 +4892,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -4887,4 +4894,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { return false; } // Purpur end diff --git a/patches/server/0028-Leaves-Jade-Protocol.patch b/patches/server/0028-Leaves-Jade-Protocol.patch index f55fd418..d865e9c5 100644 --- a/patches/server/0028-Leaves-Jade-Protocol.patch +++ b/patches/server/0028-Leaves-Jade-Protocol.patch @@ -9,10 +9,10 @@ Original project: https://github.com/LeavesMC/Leaves This patch is Powered by Jade(https://github.com/Snownee/Jade) diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index f731908eb34c3fc0bfd9df935257ab7877091ab6..a1b6d6038fe2dad9821deaccec021a9ccfe14064 100644 +index a157789fc6f3bdcbbf7321d5238c746833511630..6d25421091018d1dc0c7bccbce31d8b4244639bb 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -249,6 +249,7 @@ import org.bukkit.inventory.CraftingInventory; +@@ -250,6 +250,7 @@ import org.bukkit.inventory.CraftingInventory; import org.bukkit.inventory.EquipmentSlot; import org.bukkit.inventory.InventoryView; import org.bukkit.inventory.SmithingInventory; @@ -20,7 +20,7 @@ index f731908eb34c3fc0bfd9df935257ab7877091ab6..a1b6d6038fe2dad9821deaccec021a9c // CraftBukkit end public class ServerGamePacketListenerImpl implements ServerPlayerConnection, TickablePacketListener, ServerGamePacketListener { -@@ -3719,6 +3720,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3725,6 +3726,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } // Paper end this.cserver.getMessenger().dispatchIncomingMessage(this.player.getBukkitEntity(), packet.identifier.toString(), data); @@ -31,10 +31,10 @@ index f731908eb34c3fc0bfd9df935257ab7877091ab6..a1b6d6038fe2dad9821deaccec021a9c ServerGamePacketListenerImpl.LOGGER.error("Couldn\'t dispatch custom payload", ex); this.disconnect("Invalid custom payload!", org.bukkit.event.player.PlayerKickEvent.Cause.INVALID_PAYLOAD); // Paper - kick event cause diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 2b633067308ab747c0e6da9635161c4e4d3b3610..691ecf14a8876bfbbc314fa62e65d4f4a7b4e2a3 100644 +index 297141cb63786dc356a70ee8af2614fe060b9373..e4be585e73f55ba0b2c8694df0694334e6573501 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -399,6 +399,8 @@ public abstract class PlayerList { +@@ -402,6 +402,8 @@ public abstract class PlayerList { player.didPlayerJoinEvent = true; // Gale - EMC - do not process chat/commands before player has joined @@ -57,10 +57,10 @@ index f85210c8d0d3e27398f52509f5e078f1d0d3eb93..911e83c6ce0166cea84dea92ae61d554 } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 9a899983bd79d4994e1d2611c4450862a81c60a9..0e80748d80aa26a43002082c59dfd6d42de9d971 100644 +index aa276ff3319b7eda1cf84de40924236175febb66..265b7272f20105bbe5eee6bb46022cb008ad9191 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -248,6 +248,7 @@ import org.bukkit.scoreboard.Criteria; +@@ -254,6 +254,7 @@ import org.bukkit.scoreboard.Criteria; import org.bukkit.structure.StructureManager; import org.bukkit.util.StringUtil; import org.bukkit.util.permissions.DefaultPermissions; @@ -68,7 +68,7 @@ index 9a899983bd79d4994e1d2611c4450862a81c60a9..0e80748d80aa26a43002082c59dfd6d4 import org.yaml.snakeyaml.LoaderOptions; import org.galemc.gale.configuration.GaleGlobalConfiguration; import org.galemc.gale.util.CPUCoresEstimation; -@@ -401,6 +402,7 @@ public final class CraftServer implements Server { +@@ -409,6 +410,7 @@ public final class CraftServer implements Server { MapPalette.setMapColorCache(new CraftMapColorCache(this.logger)); } datapackManager = new io.papermc.paper.datapack.PaperDatapackManager(console.getPackRepository()); // Paper @@ -76,7 +76,7 @@ index 9a899983bd79d4994e1d2611c4450862a81c60a9..0e80748d80aa26a43002082c59dfd6d4 } public boolean getCommandBlockOverride(String command) { -@@ -978,6 +980,11 @@ public final class CraftServer implements Server { +@@ -1001,6 +1003,11 @@ public final class CraftServer implements Server { this.console.paperConfigurations.reloadConfigs(this.console); org.purpurmc.purpur.PurpurConfig.init((File) console.options.valueOf("purpur-settings")); // Purpur this.console.galeConfigurations.reloadConfigs(this.console); // Gale - Gale configuration diff --git a/patches/server/0029-Leaves-Appleskin-Protocol.patch b/patches/server/0029-Leaves-Appleskin-Protocol.patch index d39fa36c..f42b2ed0 100644 --- a/patches/server/0029-Leaves-Appleskin-Protocol.patch +++ b/patches/server/0029-Leaves-Appleskin-Protocol.patch @@ -7,7 +7,7 @@ Original license: GPLv3 Original project: https://github.com/LeavesMC/Leaves diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 6582fdb6c14494c3fd39d25d4afcd88fb821d290..473f91ac6825bb7ebe6ff576db3bcc5485cfec62 100644 +index 44a31750f08bee7e44565739fa1eaf6a78f10b3b..2d4a9ffd947e57e399a09bb3881c5e1cf7d0b031 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -1637,6 +1637,7 @@ public abstract class MinecraftServer extends MinecraftServerBlockableEventLoop @@ -32,10 +32,10 @@ index 6582fdb6c14494c3fd39d25d4afcd88fb821d290..473f91ac6825bb7ebe6ff576db3bcc54 // Gale end - split tick steps MinecraftTimings.tickablesTimer.startTiming(); // Spigot // Paper diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 691ecf14a8876bfbbc314fa62e65d4f4a7b4e2a3..c14aa987cefbe80c0c0d48348b6e78e2e3e4ec7d 100644 +index e4be585e73f55ba0b2c8694df0694334e6573501..903b772e3ac5547d803809449dca9614f8d58805 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -400,6 +400,7 @@ public abstract class PlayerList { +@@ -403,6 +403,7 @@ public abstract class PlayerList { player.didPlayerJoinEvent = true; // Gale - EMC - do not process chat/commands before player has joined top.leavesmc.leaves.protocol.JadeProtocol.onPlayerJoin(player); // Leaves - Jade @@ -43,7 +43,7 @@ index 691ecf14a8876bfbbc314fa62e65d4f4a7b4e2a3..c14aa987cefbe80c0c0d48348b6e78e2 final net.kyori.adventure.text.Component jm = playerJoinEvent.joinMessage(); -@@ -650,6 +651,7 @@ public abstract class PlayerList { +@@ -653,6 +654,7 @@ public abstract class PlayerList { return this.remove(entityplayer, 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()))); } public net.kyori.adventure.text.Component remove(ServerPlayer entityplayer, net.kyori.adventure.text.Component leaveMessage) { @@ -52,10 +52,10 @@ index 691ecf14a8876bfbbc314fa62e65d4f4a7b4e2a3..c14aa987cefbe80c0c0d48348b6e78e2 org.purpurmc.purpur.task.BossBarTask.removeFromAll(entityplayer.getBukkitEntity()); // Purpur diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 0e80748d80aa26a43002082c59dfd6d42de9d971..6fd0a7800b3354374b977f706e97cf27039ff433 100644 +index 265b7272f20105bbe5eee6bb46022cb008ad9191..27a1d7c04ec228df0b0509e94c13ff58fe15ee2f 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -985,6 +985,13 @@ public final class CraftServer implements Server { +@@ -1008,6 +1008,13 @@ public final class CraftServer implements Server { top.leavesmc.leaves.protocol.JadeProtocol.enableAllPlayer(); } // Leaves end - Jade diff --git a/patches/server/0030-Leaves-Xaero-Map-Protocol.patch b/patches/server/0030-Leaves-Xaero-Map-Protocol.patch index 3744f255..0a49b88a 100644 --- a/patches/server/0030-Leaves-Xaero-Map-Protocol.patch +++ b/patches/server/0030-Leaves-Xaero-Map-Protocol.patch @@ -7,10 +7,10 @@ Original license: GPLv3 Original project: https://github.com/LeavesMC/Leaves diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index c14aa987cefbe80c0c0d48348b6e78e2e3e4ec7d..2f4a29bbfb1b182cbd205ea28089470e150f0abd 100644 +index 903b772e3ac5547d803809449dca9614f8d58805..e7c2914d14d10407cd6eee625718d9396d5fd77b 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -1397,6 +1397,7 @@ public abstract class PlayerList { +@@ -1400,6 +1400,7 @@ public abstract class PlayerList { player.connection.send(new ClientboundInitializeBorderPacket(worldborder)); player.connection.send(new ClientboundSetTimePacket(world.getGameTime(), world.getDayTime(), world.getGameRules().getBoolean(GameRules.RULE_DAYLIGHT))); player.connection.send(new ClientboundSetDefaultSpawnPositionPacket(world.getSharedSpawnPos(), world.getSharedSpawnAngle()));