From cc56332b4ee7646907977a89080b35d329b3057d Mon Sep 17 00:00:00 2001 From: granny Date: Thu, 13 Jun 2024 16:27:38 -0700 Subject: [PATCH] Final 1.20.6 Paper Upstream \o/ Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@79e2cb6 Update upstream (Bukkit/CraftBukkit/Spigot) (#10875) --- gradle.properties | 2 +- patches/api/0004-Purpur-client-support.patch | 4 +- patches/api/0009-AFK-API.patch | 4 +- patches/api/0011-ExecuteCommandEvent.patch | 6 +-- .../0015-ItemStack-convenience-methods.patch | 8 ++-- ...e-to-recipe-s-ExactChoice-ingredient.patch | 8 ++-- .../0027-Fix-default-permission-system.patch | 10 ++--- ...0029-Clean-up-version-command-output.patch | 6 +-- .../api/0035-Add-local-difficulty-api.patch | 4 +- patches/api/0036-Remove-Timings.patch | 4 +- patches/api/0038-Debug-Marker-API.patch | 12 ++--- patches/api/0039-Add-death-screen-API.patch | 4 +- patches/server/0001-Rebrand.patch | 6 +-- patches/server/0002-Purpur-config-files.patch | 14 +++--- .../server/0003-Purpur-client-support.patch | 6 +-- patches/server/0006-Ridables.patch | 10 ++--- patches/server/0010-AFK-API.patch | 8 ++-- .../server/0011-Bring-back-server-name.patch | 4 +- patches/server/0013-Lagging-threshold.patch | 6 +-- ...-settings-suppressing-pointless-logs.patch | 8 ++-- ...able-loot-drops-on-death-by-cramming.patch | 6 +-- ...urable-void-damage-height-and-damage.patch | 4 +- ...0056-Add-5-second-tps-average-in-tps.patch | 6 +-- .../0057-Implement-elytra-settings.patch | 6 +-- .../0075-Totems-work-in-inventory.patch | 4 +- ...iefing-bypass-to-everything-affected.patch | 4 +- ...169-API-for-any-mob-to-burn-daylight.patch | 4 +- .../0191-Toggle-for-kinetic-damage.patch | 4 +- ...the-ability-to-add-combustible-items.patch | 4 +- ...fig-for-mob-last-hurt-by-player-time.patch | 6 +-- .../0252-Add-local-difficulty-api.patch | 4 +- patches/server/0254-Remove-Timings.patch | 8 ++-- .../server/0255-Remove-Mojang-Profiler.patch | 20 ++++----- patches/server/0258-Debug-Marker-API.patch | 12 ++--- .../server/0261-Add-death-screen-API.patch | 4 +- patches/server/0266-Language-API.patch | 4 +- .../server/0297-Adopt-MaterialRerouting.patch | 45 +++++++++++++++++++ 37 files changed, 162 insertions(+), 117 deletions(-) create mode 100644 patches/server/0297-Adopt-MaterialRerouting.patch diff --git a/gradle.properties b/gradle.properties index 83b68fe1b0..5feac6a430 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,7 +2,7 @@ group = org.purpurmc.purpur version = 1.20.6-R0.1-SNAPSHOT mcVersion = 1.20.6 -paperCommit = 906df69f05d0779906377abb809bfec9fc3c3546 +paperCommit = 79e2cb620ef03539390d97940824b38b707918f5 org.gradle.caching = true org.gradle.parallel = true diff --git a/patches/api/0004-Purpur-client-support.patch b/patches/api/0004-Purpur-client-support.patch index c5e33fa12c..51b04656d5 100644 --- a/patches/api/0004-Purpur-client-support.patch +++ b/patches/api/0004-Purpur-client-support.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Purpur client support diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index 6c327a07bf8a6aa11a2d7dad12b2830acc539484..d972cb242102a3ee7c017299aed64340628c79d8 100644 +index eb34f22e973fe46529eb93f435f5bf7f85091404..813096eee6a09419209baca9139d9aac1593d8ca 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -3806,4 +3806,13 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -3854,4 +3854,13 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @Override Spigot spigot(); // Spigot end diff --git a/patches/api/0009-AFK-API.patch b/patches/api/0009-AFK-API.patch index d805660fbf..5500c83f88 100644 --- a/patches/api/0009-AFK-API.patch +++ b/patches/api/0009-AFK-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] AFK API diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index d972cb242102a3ee7c017299aed64340628c79d8..972cca3e02296f94099f965a4f7662ec63a067ea 100644 +index 813096eee6a09419209baca9139d9aac1593d8ca..a03f473dee39eb160196e2468e4c26c6f8f6ce2a 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -3814,5 +3814,25 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -3862,5 +3862,25 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * @return True if Player uses Purpur Client */ public boolean usesPurpurClient(); diff --git a/patches/api/0011-ExecuteCommandEvent.patch b/patches/api/0011-ExecuteCommandEvent.patch index 8fd1af0a74..4d7aa00b82 100644 --- a/patches/api/0011-ExecuteCommandEvent.patch +++ b/patches/api/0011-ExecuteCommandEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] ExecuteCommandEvent diff --git a/src/main/java/org/bukkit/command/SimpleCommandMap.java b/src/main/java/org/bukkit/command/SimpleCommandMap.java -index c3a9cf65db73ed534bf20996c7f05b5eb0aaebe1..83f84a76cbfdf5138ecccf3a886d38151a500bf2 100644 +index 5df19bd701c67506689fc7f49d91f99ebfbc83f0..a09b5458191eb5df4787859b72a37fa1fa2bffba 100644 --- a/src/main/java/org/bukkit/command/SimpleCommandMap.java +++ b/src/main/java/org/bukkit/command/SimpleCommandMap.java -@@ -152,6 +152,19 @@ public class SimpleCommandMap implements CommandMap { +@@ -153,6 +153,19 @@ public class SimpleCommandMap implements CommandMap { return false; } @@ -28,7 +28,7 @@ index c3a9cf65db73ed534bf20996c7f05b5eb0aaebe1..83f84a76cbfdf5138ecccf3a886d3815 // Paper start - Plugins do weird things to workaround normal registration if (target.timings == null) { target.timings = co.aikar.timings.TimingsManager.getCommandTiming(null, target); -@@ -161,7 +174,7 @@ public class SimpleCommandMap implements CommandMap { +@@ -162,7 +175,7 @@ public class SimpleCommandMap implements CommandMap { try { try (co.aikar.timings.Timing ignored = target.timings.startTiming()) { // Paper - use try with resources // Note: we don't return the result of target.execute as thats success / failure, we return handled (true) or not handled (false) diff --git a/patches/api/0015-ItemStack-convenience-methods.patch b/patches/api/0015-ItemStack-convenience-methods.patch index 5d52b2610d..b61a1dc521 100644 --- a/patches/api/0015-ItemStack-convenience-methods.patch +++ b/patches/api/0015-ItemStack-convenience-methods.patch @@ -5,10 +5,10 @@ Subject: [PATCH] ItemStack convenience methods diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java -index 4f7f91b5e2903ce3b180c637cb463e01a860271e..5b14cea8d246f31c51b09baa731e673f305aea6e 100644 +index 762216a117145676d3df2b74036799b024461fb7..54c080d650f807b05e5d8347f78e2bc243791172 100644 --- a/src/main/java/org/bukkit/Material.java +++ b/src/main/java/org/bukkit/Material.java -@@ -5733,4 +5733,40 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla +@@ -5764,4 +5764,40 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla } return Registry.BLOCK.get(material.key); } @@ -50,7 +50,7 @@ index 4f7f91b5e2903ce3b180c637cb463e01a860271e..5b14cea8d246f31c51b09baa731e673f + // Purpur end } diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java -index c64413a6740b604282984dea2a8430a6e7478d68..5c609d916e2d2f08ba90ebd23f13c5c9a14bc73c 100644 +index 40cde68c7b73a0a92e2a96667a90138d67ce66ff..fee2469bdedff0e55ef4dcda410cac35c6319258 100644 --- a/src/main/java/org/bukkit/inventory/ItemStack.java +++ b/src/main/java/org/bukkit/inventory/ItemStack.java @@ -19,6 +19,17 @@ import org.bukkit.inventory.meta.ItemMeta; @@ -71,7 +71,7 @@ index c64413a6740b604282984dea2a8430a6e7478d68..5c609d916e2d2f08ba90ebd23f13c5c9 /** * Represents a stack of items. -@@ -1079,4 +1090,565 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat +@@ -1081,4 +1092,565 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat return Bukkit.getUnsafe().computeTooltipLines(this, tooltipContext, player); } // Paper end - expose itemstack tooltip lines diff --git a/patches/api/0019-Add-predicate-to-recipe-s-ExactChoice-ingredient.patch b/patches/api/0019-Add-predicate-to-recipe-s-ExactChoice-ingredient.patch index 4e2fba82c7..85ddb086f6 100644 --- a/patches/api/0019-Add-predicate-to-recipe-s-ExactChoice-ingredient.patch +++ b/patches/api/0019-Add-predicate-to-recipe-s-ExactChoice-ingredient.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add predicate to recipe's ExactChoice ingredient diff --git a/src/main/java/org/bukkit/inventory/RecipeChoice.java b/src/main/java/org/bukkit/inventory/RecipeChoice.java -index 1cd6601c9d2e86ef850011fcb9e59811207b4af7..81c563d44c311ea1b49425d93c57f46beb4a2ef9 100644 +index e7796054f3f65f5bea7f93c75320195f6c2f0561..1b1d05b77e93abe93ed782883f8d791f6559f778 100644 --- a/src/main/java/org/bukkit/inventory/RecipeChoice.java +++ b/src/main/java/org/bukkit/inventory/RecipeChoice.java -@@ -180,6 +180,7 @@ public interface RecipeChoice extends Predicate, Cloneable { +@@ -191,6 +191,7 @@ public interface RecipeChoice extends Predicate, Cloneable { public static class ExactChoice implements RecipeChoice { private List choices; @@ -16,7 +16,7 @@ index 1cd6601c9d2e86ef850011fcb9e59811207b4af7..81c563d44c311ea1b49425d93c57f46b public ExactChoice(@NotNull ItemStack stack) { this(Arrays.asList(stack)); -@@ -229,6 +230,7 @@ public interface RecipeChoice extends Predicate, Cloneable { +@@ -241,6 +242,7 @@ public interface RecipeChoice extends Predicate, Cloneable { @Override public boolean test(@NotNull ItemStack t) { @@ -24,7 +24,7 @@ index 1cd6601c9d2e86ef850011fcb9e59811207b4af7..81c563d44c311ea1b49425d93c57f46b for (ItemStack match : choices) { if (t.isSimilar(match)) { return true; -@@ -238,6 +240,17 @@ public interface RecipeChoice extends Predicate, Cloneable { +@@ -250,6 +252,17 @@ public interface RecipeChoice extends Predicate, Cloneable { return false; } diff --git a/patches/api/0027-Fix-default-permission-system.patch b/patches/api/0027-Fix-default-permission-system.patch index 754c4e1e36..83d8a54ee1 100644 --- a/patches/api/0027-Fix-default-permission-system.patch +++ b/patches/api/0027-Fix-default-permission-system.patch @@ -5,25 +5,25 @@ Subject: [PATCH] Fix default permission system diff --git a/src/main/java/org/bukkit/permissions/PermissibleBase.java b/src/main/java/org/bukkit/permissions/PermissibleBase.java -index cd3296fea01648592d2af89b3d80135acb6d0958..45797a6fbae1d8edc4211cb30def24ad4f59bd49 100644 +index 75b77cc4fe189b4b6baa1af3663dc492e992a266..30b98d1645c571ba5c18e5cc93b0bec3f74b1d3b 100644 --- a/src/main/java/org/bukkit/permissions/PermissibleBase.java +++ b/src/main/java/org/bukkit/permissions/PermissibleBase.java -@@ -168,7 +168,7 @@ public class PermissibleBase implements Permissible { +@@ -169,7 +169,7 @@ public class PermissibleBase implements Permissible { for (Permission perm : defaults) { - String name = perm.getName().toLowerCase(java.util.Locale.ENGLISH); + String name = perm.getName().toLowerCase(Locale.ROOT); - permissions.put(name, new PermissionAttachmentInfo(parent, name, null, true)); + permissions.put(name, new PermissionAttachmentInfo(parent, name, null, perm.getDefault().getValue(isOp()))); // Purpur Bukkit.getServer().getPluginManager().subscribeToPermission(name, parent); calculateChildPermissions(perm.getChildren(), false, null); } -@@ -196,7 +196,7 @@ public class PermissibleBase implements Permissible { +@@ -197,7 +197,7 @@ public class PermissibleBase implements Permissible { String name = entry.getKey(); Permission perm = Bukkit.getServer().getPluginManager().getPermission(name); - boolean value = entry.getValue() ^ invert; + boolean value = (entry.getValue() == null && perm != null ? perm.getDefault().getValue(isOp()) : entry.getValue()) ^ invert; // Purpur - String lname = name.toLowerCase(java.util.Locale.ENGLISH); + String lname = name.toLowerCase(Locale.ROOT); permissions.put(lname, new PermissionAttachmentInfo(parent, lname, attachment, value)); diff --git a/src/main/java/org/bukkit/util/permissions/DefaultPermissions.java b/src/main/java/org/bukkit/util/permissions/DefaultPermissions.java diff --git a/patches/api/0029-Clean-up-version-command-output.patch b/patches/api/0029-Clean-up-version-command-output.patch index 5e853fa92a..b71081eb64 100644 --- a/patches/api/0029-Clean-up-version-command-output.patch +++ b/patches/api/0029-Clean-up-version-command-output.patch @@ -22,10 +22,10 @@ index a736d7bcdc5861a01b66ba36158db1c716339346..22fc165fd9c95f0f3ae1be7a0857e48c @Override diff --git a/src/main/java/org/bukkit/command/defaults/VersionCommand.java b/src/main/java/org/bukkit/command/defaults/VersionCommand.java -index fd5d9881abfd930bb883120f018f76dc78b62b14..3d29c47ac0620af82d990faf5dfc266c6f0235f1 100644 +index e64bb57f74e6d6f78927be228825b3e0bdf41f48..c880d0010849ab733ad13bbd18fab3c864d0cf61 100644 --- a/src/main/java/org/bukkit/command/defaults/VersionCommand.java +++ b/src/main/java/org/bukkit/command/defaults/VersionCommand.java -@@ -214,7 +214,7 @@ public class VersionCommand extends BukkitCommand { +@@ -215,7 +215,7 @@ public class VersionCommand extends BukkitCommand { String version = Bukkit.getVersion(); // Paper start if (version.startsWith("null")) { // running from ide? @@ -34,7 +34,7 @@ index fd5d9881abfd930bb883120f018f76dc78b62b14..3d29c47ac0620af82d990faf5dfc266c return; } setVersionMessage(getVersionFetcher().getVersionMessage(version)); -@@ -255,9 +255,11 @@ public class VersionCommand extends BukkitCommand { +@@ -256,9 +256,11 @@ public class VersionCommand extends BukkitCommand { // Paper start private void setVersionMessage(final @NotNull Component msg) { lastCheck = System.currentTimeMillis(); diff --git a/patches/api/0035-Add-local-difficulty-api.patch b/patches/api/0035-Add-local-difficulty-api.patch index 46e1e14867..65a45e9929 100644 --- a/patches/api/0035-Add-local-difficulty-api.patch +++ b/patches/api/0035-Add-local-difficulty-api.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add local difficulty api diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index 97f97ea5c6aa513c439f86a9c82821e0f7d9cd1e..099516b90c504205b894b387542221e8c0c98b40 100644 +index fdb87adfb8d6eff2bfabe7a41398c53d15d4cd98..25a049040a982194e7337d283898b252568f09e0 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java -@@ -4249,6 +4249,16 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient +@@ -4276,6 +4276,16 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient @Nullable public DragonBattle getEnderDragonBattle(); diff --git a/patches/api/0036-Remove-Timings.patch b/patches/api/0036-Remove-Timings.patch index e6e555809a..debc2fc1b2 100644 --- a/patches/api/0036-Remove-Timings.patch +++ b/patches/api/0036-Remove-Timings.patch @@ -136,10 +136,10 @@ index e801e79fa57c44b2e5d359647c920f88064826f1..1abfcee0f6d632f4cd8d74b4994a90c9 new ArrayList(TIMINGS_SUBCOMMANDS.size())); } diff --git a/src/main/java/org/bukkit/command/SimpleCommandMap.java b/src/main/java/org/bukkit/command/SimpleCommandMap.java -index 83f84a76cbfdf5138ecccf3a886d38151a500bf2..fdedac32544be6534288c8ba28abe7f5c4c56f3b 100644 +index a09b5458191eb5df4787859b72a37fa1fa2bffba..7740ad53796d08584bb0110f99af5639993e4d71 100644 --- a/src/main/java/org/bukkit/command/SimpleCommandMap.java +++ b/src/main/java/org/bukkit/command/SimpleCommandMap.java -@@ -172,10 +172,10 @@ public class SimpleCommandMap implements CommandMap { +@@ -173,10 +173,10 @@ public class SimpleCommandMap implements CommandMap { // Paper end try { diff --git a/patches/api/0038-Debug-Marker-API.patch b/patches/api/0038-Debug-Marker-API.patch index 7621add2d4..13c2329876 100644 --- a/patches/api/0038-Debug-Marker-API.patch +++ b/patches/api/0038-Debug-Marker-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Debug Marker API diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index 0b298161d8b94d655113328ebc0cd19a65619c72..83b979fbb8c0dd64f0a19feef654af2b165bd603 100644 +index ad5f2a8991c3b7925626fd463110765ff964beb9..bb09c468ab1261ea4eaf59012d30a2e45199caf7 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java @@ -2951,5 +2951,89 @@ public final class Bukkit { @@ -99,7 +99,7 @@ index 0b298161d8b94d655113328ebc0cd19a65619c72..83b979fbb8c0dd64f0a19feef654af2b // Purpur end } diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index cecf7b49e3858359ae7eaa4318180d7f11728a7a..916db0d6096338c4f1b8707048eb38b50a2b027d 100644 +index e75cccea44c9a693dfe52a419c742da9a62da42a..36d8ce7a21513600ab10b7e6f47c9f1d2cc51947 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java @@ -2588,5 +2588,75 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi @@ -179,10 +179,10 @@ index cecf7b49e3858359ae7eaa4318180d7f11728a7a..916db0d6096338c4f1b8707048eb38b5 // Purpur end } diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index 099516b90c504205b894b387542221e8c0c98b40..83a5b68c785a88594e6e3824ed282844086f7f1a 100644 +index 25a049040a982194e7337d283898b252568f09e0..0f2f7cb8acb226d6f9a1085ec9cac3f8faa77813 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java -@@ -4257,6 +4257,76 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient +@@ -4284,6 +4284,76 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient * @return The local difficulty */ public float getLocalDifficultyAt(@NotNull Location location); @@ -260,10 +260,10 @@ index 099516b90c504205b894b387542221e8c0c98b40..83a5b68c785a88594e6e3824ed282844 /** diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index 972cca3e02296f94099f965a4f7662ec63a067ea..ec49be86fa9b2612ae2853f06f503bffa3a1271d 100644 +index a03f473dee39eb160196e2468e4c26c6f8f6ce2a..2443f32d5a832b8913cd00042b94fda96658a3c2 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -3834,5 +3834,75 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -3882,5 +3882,75 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * @deprecated Use {@link #resetIdleDuration()} instead */ void resetIdleTimer(); diff --git a/patches/api/0039-Add-death-screen-API.patch b/patches/api/0039-Add-death-screen-API.patch index 68f89598ed..30f3605f92 100644 --- a/patches/api/0039-Add-death-screen-API.patch +++ b/patches/api/0039-Add-death-screen-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add death screen API diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index ec49be86fa9b2612ae2853f06f503bffa3a1271d..d057743b8f6a463434c1f76398c7a98614b19d47 100644 +index 2443f32d5a832b8913cd00042b94fda96658a3c2..c41b5e13c519b3f48cbc866ad77b153cdde13136 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -3904,5 +3904,25 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -3952,5 +3952,25 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * Clears all debug block highlights */ void clearBlockHighlights(); diff --git a/patches/server/0001-Rebrand.patch b/patches/server/0001-Rebrand.patch index 663d5bedd5..052131c52c 100644 --- a/patches/server/0001-Rebrand.patch +++ b/patches/server/0001-Rebrand.patch @@ -199,7 +199,7 @@ index 4f3cc14d48690bb183d09bb7a5ba1e23e8a0c08a..c366d84518979e842a6f10f969a59515 stringbuilder.append(CrashReport.getErrorComment()); stringbuilder.append("\n\n"); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 0ed42fa899721f83b598db05be1b5f321af3614a..d42cd000684f6bed26a188bfcf2c633e49b51370 100644 +index 3751c2a077bd13bac330b93c6efc2a640a17f4f2..38d2dfcee9462aaf9aa4954effe2b40242d4bb76 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -956,7 +956,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 1.0E-5F) { -@@ -3484,8 +3485,10 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3478,8 +3479,10 @@ public abstract class LivingEntity extends Entity implements Attackable { this.pushEntities(); this.level().getProfiler().pop(); // Paper start - Add EntityMoveEvent @@ -245,7 +245,7 @@ index ce01fe82dc1eaaf06ca317ddbc62b7d1b87a48b2..de03ae0d49a9331c6e397c2a26114a93 Location from = new Location(this.level().getWorld(), this.xo, this.yo, this.zo, this.yRotO, this.xRotO); Location to = new Location(this.level().getWorld(), this.getX(), this.getY(), this.getZ(), this.getYRot(), this.getXRot()); io.papermc.paper.event.entity.EntityMoveEvent event = new io.papermc.paper.event.entity.EntityMoveEvent(this.getBukkitLivingEntity(), from, to.clone()); -@@ -3495,6 +3498,21 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3489,6 +3492,21 @@ public abstract class LivingEntity extends Entity implements Attackable { this.absMoveTo(event.getTo().getX(), event.getTo().getY(), event.getTo().getZ(), event.getTo().getYaw(), event.getTo().getPitch()); } } diff --git a/patches/server/0010-AFK-API.patch b/patches/server/0010-AFK-API.patch index fdfa7ea18e..25433b8aa4 100644 --- a/patches/server/0010-AFK-API.patch +++ b/patches/server/0010-AFK-API.patch @@ -78,7 +78,7 @@ index 5dd8c9f53ba50f160198a09dd2069edbac48230e..70838e5ee30733a71ad73330f69ea093 return this.stats; } diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index a33a724de4c408fcf23b8ec9206311fc25936f1c..d84f083ea335d4bfc021e11cbb86bcc17f9ba76c 100644 +index ac11226ca4b8d730871851d99491d598e41a0de6..5a62fb4e441b251c92534a09b2f4af39a2e8e34c 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -332,6 +332,20 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -192,7 +192,7 @@ index d2f0c3b26d4beedb49d86e0242d843590d469d02..7463eefb7d09ea55fe8780210e7e967c if (baseEntity == null) { if (this.isCombat && (!targetEntity.canBeSeenAsEnemy() || targetEntity.level().getDifficulty() == Difficulty.PEACEFUL)) { diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java -index a651b1ecca3133876486dab08627c67449b67005..91a52b49141c7d1e5b9553a4a7e33c85b95ce49f 100644 +index 5f87d625be6249c37a7397933b0edb22f67e5c39..7ddc0b1005433ef467e1a086a19acd1ab5c9fc24 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java @@ -201,6 +201,13 @@ public abstract class Player extends LivingEntity { @@ -223,7 +223,7 @@ index ea0aee88c7d901034427db201c1b2430f8a1d522..1f28bfb435c1e4d97da713f96c452aba if (range < 0.0 || d < range * range) { return true; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 497439478e20f2207e23e8e556ac7df80eb7e5c7..a0db237d748147280cd4ccfc6eaa601974f1f304 100644 +index 69de5167aeaa6f9cb66fa7c2daa63a2e72c93fd0..5ace17f1bc7b6c5c99849ac5a650de4205c7fbbd 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -574,10 +574,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -243,7 +243,7 @@ index 497439478e20f2207e23e8e556ac7df80eb7e5c7..a0db237d748147280cd4ccfc6eaa6019 if (this.getHandle().connection == null) return; // Paper - Updates are possible before the player has fully joined for (ServerPlayer player : (List) this.server.getHandle().players) { if (player.getBukkitEntity().canSee(this)) { -@@ -3525,5 +3530,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -3534,5 +3539,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { public boolean usesPurpurClient() { return getHandle().purpurClient; } diff --git a/patches/server/0011-Bring-back-server-name.patch b/patches/server/0011-Bring-back-server-name.patch index 017be150be..83168c5b16 100644 --- a/patches/server/0011-Bring-back-server-name.patch +++ b/patches/server/0011-Bring-back-server-name.patch @@ -17,10 +17,10 @@ index 9d10cdacb3aed2c00dc60aeb6f2cbeb48905e21f..842f382de43df5d5c321422372ec30cc public final boolean spawnNpcs = this.get("spawn-npcs", true); public final boolean pvp = this.get("pvp", true); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 934b942d1e8fdd0b9b3c1f704d514f06a9556623..635666762408b9e62ace15703c75f2dbcc768967 100644 +index 987cc39ebc9332ba0c974fb4e8b89ebbe05aff5f..72d3d80d29920fa3f6f98ac0f56ae8550fb69596 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -3272,4 +3272,11 @@ public final class CraftServer implements Server { +@@ -3295,4 +3295,11 @@ public final class CraftServer implements Server { return this.potionBrewer; } // Paper end diff --git a/patches/server/0013-Lagging-threshold.patch b/patches/server/0013-Lagging-threshold.patch index 9a555e3c38..bec2bfcb19 100644 --- a/patches/server/0013-Lagging-threshold.patch +++ b/patches/server/0013-Lagging-threshold.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Lagging threshold diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 6464cf3cf027d894d18d1a24495952d304151648..87957873de7f8cea2ae84abf04c99a42c8c3a815 100644 +index 51968d23424cf57264fbf343199b3f1f2b00a08a..c167d61c281cd9324c7fd741a5845792bcdbf56a 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -312,6 +312,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 0.0F) { this.playSound(this.getFallDamageSound((int) f3), 1.0F, 1.0F); diff --git a/patches/server/0203-Added-the-ability-to-add-combustible-items.patch b/patches/server/0203-Added-the-ability-to-add-combustible-items.patch index 7e75d97998..74015f81b5 100644 --- a/patches/server/0203-Added-the-ability-to-add-combustible-items.patch +++ b/patches/server/0203-Added-the-ability-to-add-combustible-items.patch @@ -51,10 +51,10 @@ index 08ff372334f32b9bfac2e7b7a405e43ecf0df959..d566924cc3f13475769d4c733ea8a779 private int maxStack = MAX_STACK; public List transaction = new java.util.ArrayList(); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 70e252cbd6d516875b0e6de1f51b9afb34c58f48..d78062e40bb4cec0f69c58de305527a640799a53 100644 +index cbe57d7b3282a76a427a64507a10a5aea767ff1c..8cdc91d8306a76514abd76c450044ffed5418787 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1571,6 +1571,19 @@ public final class CraftServer implements Server { +@@ -1594,6 +1594,19 @@ public final class CraftServer implements Server { return true; } diff --git a/patches/server/0237-Config-for-mob-last-hurt-by-player-time.patch b/patches/server/0237-Config-for-mob-last-hurt-by-player-time.patch index 365c19d2ac..d60df36799 100644 --- a/patches/server/0237-Config-for-mob-last-hurt-by-player-time.patch +++ b/patches/server/0237-Config-for-mob-last-hurt-by-player-time.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Config for mob last hurt by player time diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 7f717b3e8bb8a8eef98411216823f98ead912408..ceb420d3b9c5d3050b0d72ae612b8003d562202a 100644 +index 4744b0dd3f5e9e5f2d92bd8604610bc133977931..36102a9bafde35d30a5cf78999a1999daa05b7e1 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -1579,13 +1579,13 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -1573,13 +1573,13 @@ public abstract class LivingEntity extends Entity implements Attackable { if (entity1 instanceof net.minecraft.world.entity.player.Player) { net.minecraft.world.entity.player.Player entityhuman = (net.minecraft.world.entity.player.Player) entity1; @@ -25,7 +25,7 @@ index 7f717b3e8bb8a8eef98411216823f98ead912408..ceb420d3b9c5d3050b0d72ae612b8003 if (entityliving2 instanceof net.minecraft.world.entity.player.Player) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index fbb1b3672af69306c510f3a629bede548ba7a9fd..1284c941a4c863c287098a0a04efcc723e727bb3 100644 +index b95d355ede8689af1f7f5a0424b5274e38839756..3ed19f30f1cab9df3b1bfdf0b0caf7882a77c5f7 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java @@ -512,7 +512,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { diff --git a/patches/server/0252-Add-local-difficulty-api.patch b/patches/server/0252-Add-local-difficulty-api.patch index 512458afe9..a83b263a86 100644 --- a/patches/server/0252-Add-local-difficulty-api.patch +++ b/patches/server/0252-Add-local-difficulty-api.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add local difficulty api diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index f2b20ed5063a293f0b464548f590d652170cd1d8..b7a02ae4eda06cab8ffd1220259a061558981dec 100644 +index 6303760f10af17f1da1d92d6c4dc7dd6f5778f94..60924e7fbba91819f0794a44f0777158962f0d3f 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -2424,6 +2424,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -2449,6 +2449,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { return (this.getHandle().getDragonFight() == null) ? null : new CraftDragonBattle(this.getHandle().getDragonFight()); } diff --git a/patches/server/0254-Remove-Timings.patch b/patches/server/0254-Remove-Timings.patch index 44eda155bd..bbc010dd82 100644 --- a/patches/server/0254-Remove-Timings.patch +++ b/patches/server/0254-Remove-Timings.patch @@ -80,7 +80,7 @@ index 57e76b53e5e314c3e6b8856010f7a84188121582..8c134a642ccaf3530022f2e675a858d7 } catch (Exception exception) { if (exception instanceof ReportedException) { diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 5b0c0ddd60d133d52b0405ad86cabc1c94ea998c..f91739d3de41c20b352e159c7f4e12e6fdcab794 100644 +index f9d975002b7ed5dc6b31562d05f8be4c96b2d515..bf9e17659305680dc0262a0bc82246ec1f334fb9 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -1477,7 +1477,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop +Date: Thu, 13 Jun 2024 16:00:30 -0700 +Subject: [PATCH] Adopt MaterialRerouting + +Adopts the purpur-api to the material rerouting infrastructure introduced +by upstream's upstream. + +diff --git a/src/main/java/org/bukkit/craftbukkit/legacy/MaterialRerouting.java b/src/main/java/org/bukkit/craftbukkit/legacy/MaterialRerouting.java +index 9c004e7cb46841d874ab997bf2e3b63ae763aec7..36003e5c7c61d964f11e81fa56845a52a8785468 100644 +--- a/src/main/java/org/bukkit/craftbukkit/legacy/MaterialRerouting.java ++++ b/src/main/java/org/bukkit/craftbukkit/legacy/MaterialRerouting.java +@@ -678,4 +678,32 @@ public class MaterialRerouting { + return itemStack.withType(material); + } + // Paper end - register paper API specific material consumers in rerouting ++ // Purpur start ++ // Method added post 1.13, no-op (https://github.com/PurpurMC/Purpur/pull/570) ++ public static void addFuel(Server server, Material material, int burnTime) { ++ server.addFuel(material, burnTime); ++ } ++ ++ // Method added post 1.13, no-op (https://github.com/PurpurMC/Purpur/pull/570) ++ public static void removeFuel(Server server, Material material) { ++ server.removeFuel(material); ++ } ++ ++ // Method added post 1.13, no-op (https://github.com/PurpurMC/Purpur/pull/570) ++ @RerouteStatic("org/bukkit/Bukkit") ++ public static void addFuel(Material material, int burnTime) { ++ Bukkit.addFuel(material, burnTime); ++ } ++ ++ // Method added post 1.13, no-op (https://github.com/PurpurMC/Purpur/pull/570) ++ @RerouteStatic("org/bukkit/Bukkit") ++ public static void removeFuel(Material material) { ++ Bukkit.removeFuel(material); ++ } ++ ++ // Method added post 1.13, no-op (https://github.com/PurpurMC/Purpur/commit/607d909efba516893072b782c0393c53d048210e) ++ public static BlockData getBlockData(ItemStack itemStack, Material material) { ++ return itemStack.getBlockData(MaterialRerouting.transformToBlockType(material)); ++ } ++ // Purpur end + }