diff options
author | Noah van der Aa <[email protected]> | 2024-08-09 01:29:22 +0200 |
---|---|---|
committer | Noah van der Aa <[email protected]> | 2024-08-09 01:52:20 +0200 |
commit | 2b5dc6db49f1c15f42255684274e92bac60b1f82 (patch) | |
tree | 07f89c38d8be42807bd9cf7b586313c66860bce7 | |
parent | 4e6a2a13a3e1f6fa1067a7821d2f018339395533 (diff) | |
download | Paper-2b5dc6db49f1c15f42255684274e92bac60b1f82.tar.gz Paper-2b5dc6db49f1c15f42255684274e92bac60b1f82.zip |
Update to 1.21.1
323 files changed, 954 insertions, 1113 deletions
@@ -40,7 +40,7 @@ How To (Plugin Developers) <dependency> <groupId>io.papermc.paper</groupId> <artifactId>paper-api</artifactId> - <version>1.21-R0.1-SNAPSHOT</version> + <version>1.21.1-R0.1-SNAPSHOT</version> <scope>provided</scope> </dependency> ``` @@ -53,7 +53,7 @@ repositories { } dependencies { - compileOnly("io.papermc.paper:paper-api:1.21-R0.1-SNAPSHOT") + compileOnly("io.papermc.paper:paper-api:1.21.1-R0.1-SNAPSHOT") } java { diff --git a/gradle.properties b/gradle.properties index 7aa001f7cc..a53b87b87b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,9 +1,9 @@ group=io.papermc.paper -version=1.21-R0.1-SNAPSHOT -mcVersion=1.21 +version=1.21.1-R0.1-SNAPSHOT +mcVersion=1.21.1 # Set to true while updating Minecraft version -updatingMinecraft=false +updatingMinecraft=true org.gradle.caching=true org.gradle.parallel=true diff --git a/patches/api/0001-Convert-project-to-Gradle.patch b/patches/api/0001-Convert-project-to-Gradle.patch index aa54057aba..339ca372f0 100644 --- a/patches/api/0001-Convert-project-to-Gradle.patch +++ b/patches/api/0001-Convert-project-to-Gradle.patch @@ -124,7 +124,7 @@ index 0000000000000000000000000000000000000000..6271e2bad0ed937c2c46a8c8fdf186c4 +} diff --git a/pom.xml b/pom.xml deleted file mode 100644 -index 86628114c1d111f6d256186ca739ba8a44b3412a..0000000000000000000000000000000000000000 +index 2c5ac393cffbe61330c5aa95115e7e906c0775d3..0000000000000000000000000000000000000000 --- a/pom.xml +++ /dev/null @@ -1,267 +0,0 @@ @@ -135,7 +135,7 @@ index 86628114c1d111f6d256186ca739ba8a44b3412a..00000000000000000000000000000000 - - <groupId>org.spigotmc</groupId> - <artifactId>spigot-api</artifactId> -- <version>1.21-R0.1-SNAPSHOT</version> +- <version>1.21.1-R0.1-SNAPSHOT</version> - <packaging>jar</packaging> - - <name>Spigot-API</name> diff --git a/patches/api/0006-Adventure.patch b/patches/api/0006-Adventure.patch index dbb8f58c58..e7fba0f826 100644 --- a/patches/api/0006-Adventure.patch +++ b/patches/api/0006-Adventure.patch @@ -4327,10 +4327,10 @@ index 5adbe0514129abf3cfbc4b29a213f522359fe2e1..72ebc29db42d08d1d0361dba462fc8a5 /** diff --git a/src/main/java/org/bukkit/inventory/InventoryView.java b/src/main/java/org/bukkit/inventory/InventoryView.java -index 5b479ff2abe8cdd5e889803c73a713bc9855bc0b..5954dff2134654bb0ccc3b4c3b51a8e1ca77f6c9 100644 +index 278259e211b926283ee6dfef6f96e11ddbcbf275..ebc14022c9ef9b0b3331ee53e96a32667e4762e0 100644 --- a/src/main/java/org/bukkit/inventory/InventoryView.java +++ b/src/main/java/org/bukkit/inventory/InventoryView.java -@@ -267,12 +267,26 @@ public interface InventoryView { +@@ -269,12 +269,26 @@ public interface InventoryView { */ public boolean setProperty(@NotNull Property prop, int value); diff --git a/patches/api/0012-Add-command-line-option-to-load-extra-plugin-jars-no.patch b/patches/api/0012-Add-command-line-option-to-load-extra-plugin-jars-no.patch index 8dc512dfb3..c73bf65b97 100644 --- a/patches/api/0012-Add-command-line-option-to-load-extra-plugin-jars-no.patch +++ b/patches/api/0012-Add-command-line-option-to-load-extra-plugin-jars-no.patch @@ -7,7 +7,7 @@ Subject: [PATCH] Add command line option to load extra plugin jars not in the ex: java -jar paperclip.jar nogui -add-plugin=/path/to/plugin.jar -add-plugin=/path/to/another/plugin_jar.jar diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index 6ecab28705afc0e3652677b516d8a5398e8b2666..db51751d2dc1ac419e8fac32466ad3a7727fa2fe 100644 +index 8d729fb196d83e01e4652fb1f77f5cab7b57cc31..d978c72cdbc10792f852a4ba372518073893d02b 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java @@ -83,6 +83,20 @@ public final class Bukkit { @@ -32,7 +32,7 @@ index 6ecab28705afc0e3652677b516d8a5398e8b2666..db51751d2dc1ac419e8fac32466ad3a7 * Attempts to set the {@link Server} singleton. * <p> diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index f4b2ad91c7a46af5fc16f31369d155e4e3ab3aae..638e98416fdf7ac065abe058d625b1c924be5abb 100644 +index 57c9b560c77a56588870598acb543469040ceec1..8949b8e29ae7f412481291630a5cb7b5b8809842 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java @@ -68,6 +68,18 @@ import org.jetbrains.annotations.Nullable; diff --git a/patches/api/0020-Graduate-bungeecord-chat-API-from-spigot-subclasses.patch b/patches/api/0020-Graduate-bungeecord-chat-API-from-spigot-subclasses.patch index d88bd2a236..f117cfe6c3 100644 --- a/patches/api/0020-Graduate-bungeecord-chat-API-from-spigot-subclasses.patch +++ b/patches/api/0020-Graduate-bungeecord-chat-API-from-spigot-subclasses.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Graduate bungeecord chat API from spigot subclasses Change Javadoc to be accurate diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index fe074fe9553f61bdd72b64830532a78415348781..4c5327da1468cb1f9af00a99e7e79f578c47ee2a 100644 +index 26f3ac9c15ff554becfe8ea53a48f67b2de60ed6..bd3fa2bcee24ab7e8f740722f55ed6294fdb294a 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java @@ -472,6 +472,30 @@ public final class Bukkit { @@ -41,7 +41,7 @@ index fe074fe9553f61bdd72b64830532a78415348781..4c5327da1468cb1f9af00a99e7e79f57 * Gets the name of the update folder. The update folder is used to safely * update plugins at the right moment on a plugin load. diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index 9545da2adacaf0bd719c2baef929588cd1042d25..19b75704ed9eee0c929df417e1e5d0ea3718e2f8 100644 +index d78481bf17818415524f14417caf86d5684b2235..067eb3a5f5676f3b1b3f49a65df9c4054c48a1e7 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java @@ -383,6 +383,30 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi diff --git a/patches/api/0053-Fix-upstream-javadocs.patch b/patches/api/0053-Fix-upstream-javadocs.patch index 25d3e035cf..7d51adc5a1 100644 --- a/patches/api/0053-Fix-upstream-javadocs.patch +++ b/patches/api/0053-Fix-upstream-javadocs.patch @@ -416,7 +416,7 @@ index 4e1fb0974d061d5bb64899cac576318d2e6f8bf6..539b3527d0c66611e21712f29b90fba9 public int getEntityId(); diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java -index 274f3ccbc39d4d6ff0665abf334d526317275dd0..a7bfaa874cbd3fc8d24fffe2f7f14594b37fa18c 100644 +index 8fdfa1d79daf464f8e364fd9e19d1de3a2a6848c..195a7fa0ea8e056cbde7b9152cc014d2c94353ff 100644 --- a/src/main/java/org/bukkit/entity/HumanEntity.java +++ b/src/main/java/org/bukkit/entity/HumanEntity.java @@ -22,6 +22,11 @@ import org.jetbrains.annotations.Nullable; @@ -687,7 +687,7 @@ index be0a2d1f234d8265d98e54e518a994957b1f3ab7..4e3c406ba883aae553e8d69b6b719b87 * than BLOCK_CANBUILD, as this refers to a player, not universe-physics * rule like cactus on dirt. diff --git a/src/main/java/org/bukkit/event/enchantment/PrepareItemEnchantEvent.java b/src/main/java/org/bukkit/event/enchantment/PrepareItemEnchantEvent.java -index fc2120e03737f5882d6ae916db93fdcf4939b2ba..f2edd4a9357832e9dec3fb0aafa006335d7b289b 100644 +index 035c647f4d4e3c34f171bb7d7fa6b2b7b3442669..7ae338bcecff2ce25939035181457ced505b3a49 100644 --- a/src/main/java/org/bukkit/event/enchantment/PrepareItemEnchantEvent.java +++ b/src/main/java/org/bukkit/event/enchantment/PrepareItemEnchantEvent.java @@ -81,7 +81,7 @@ public class PrepareItemEnchantEvent extends InventoryEvent implements Cancellab @@ -999,7 +999,7 @@ index 9013d043503d175004ad276799e5935b7fa59dc4..ceae092eb782698803c6c3df41267dde public class InventoryOpenEvent extends InventoryEvent implements Cancellable { private static final HandlerList handlers = new HandlerList(); diff --git a/src/main/java/org/bukkit/event/inventory/PrepareAnvilEvent.java b/src/main/java/org/bukkit/event/inventory/PrepareAnvilEvent.java -index 6782024735a885ba0b1b4dba4a576740c1410366..8977f7609431c3c46324a82de84d4a32f4b71c57 100644 +index 08a7c564fe5d3d232998d1789d4d4723a59c1430..8a5be3f0322ac19aeac3f00df54add0e73bc87ed 100644 --- a/src/main/java/org/bukkit/event/inventory/PrepareAnvilEvent.java +++ b/src/main/java/org/bukkit/event/inventory/PrepareAnvilEvent.java @@ -24,6 +24,20 @@ public class PrepareAnvilEvent extends PrepareInventoryResultEvent { @@ -1022,7 +1022,7 @@ index 6782024735a885ba0b1b4dba4a576740c1410366..8977f7609431c3c46324a82de84d4a32 + @NotNull @Override - public HandlerList getHandlers() { + public AnvilView getView() { diff --git a/src/main/java/org/bukkit/event/player/PlayerResourcePackStatusEvent.java b/src/main/java/org/bukkit/event/player/PlayerResourcePackStatusEvent.java index e4c32b21ab013703a6a1b07a1ad564d914ebe83f..e58fecf0fe54db06e0e944027923a352fd8005d8 100644 --- a/src/main/java/org/bukkit/event/player/PlayerResourcePackStatusEvent.java @@ -1430,7 +1430,7 @@ index f1918027c3a8735b31566856218611656b56db20..476fe14faa39f02444cab8ad95d44010 * @return the currently held item * @see #getItemInMainHand() diff --git a/src/main/java/org/bukkit/inventory/ShapedRecipe.java b/src/main/java/org/bukkit/inventory/ShapedRecipe.java -index a601bc38e322e5810cf883708541e2d199f09ebb..d89068a37de1dcad0b82dee09cc7829109921a05 100644 +index 16c10d75dd28f6bbe843935e8bc91f2bccbd360a..c414ccf03572d48f5c096516fc60a59bb1e8efd7 100644 --- a/src/main/java/org/bukkit/inventory/ShapedRecipe.java +++ b/src/main/java/org/bukkit/inventory/ShapedRecipe.java @@ -24,8 +24,6 @@ public class ShapedRecipe extends CraftingRecipe { @@ -1442,8 +1442,8 @@ index a601bc38e322e5810cf883708541e2d199f09ebb..d89068a37de1dcad0b82dee09cc78291 * @see ShapedRecipe#setIngredient(char, RecipeChoice) * @deprecated Recipes must have keys. Use {@link #ShapedRecipe(NamespacedKey, ItemStack)} * instead. -@@ -44,8 +42,6 @@ public class ShapedRecipe extends CraftingRecipe { - * @param result The item you want the recipe to create. +@@ -45,8 +43,6 @@ public class ShapedRecipe extends CraftingRecipe { + * @exception IllegalArgumentException if the {@code result} is an empty item (AIR) * @see ShapedRecipe#shape(String...) * @see ShapedRecipe#setIngredient(char, Material) - * @see ShapedRecipe#setIngredient(char, Material, int) @@ -1452,12 +1452,12 @@ index a601bc38e322e5810cf883708541e2d199f09ebb..d89068a37de1dcad0b82dee09cc78291 */ public ShapedRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result) { diff --git a/src/main/java/org/bukkit/inventory/ShapelessRecipe.java b/src/main/java/org/bukkit/inventory/ShapelessRecipe.java -index 3d50775da447175b2a94ed9056ef36aa1e69c2eb..03839302c94adc3175d0a88065cd230257ffd20d 100644 +index bc924ae23fa10d87537aebbfd126aa44f199b65c..b7f46a048633945dc71e8efec9a7ebeed5832fd7 100644 --- a/src/main/java/org/bukkit/inventory/ShapelessRecipe.java +++ b/src/main/java/org/bukkit/inventory/ShapelessRecipe.java -@@ -30,11 +30,8 @@ public class ShapelessRecipe extends CraftingRecipe { - * @param key the unique recipe key +@@ -31,11 +31,8 @@ public class ShapelessRecipe extends CraftingRecipe { * @param result The item you want the recipe to create. + * @exception IllegalArgumentException if the {@code result} is an empty item (AIR) * @see ShapelessRecipe#addIngredient(Material) - * @see ShapelessRecipe#addIngredient(MaterialData) - * @see ShapelessRecipe#addIngredient(Material,int) @@ -1467,8 +1467,8 @@ index 3d50775da447175b2a94ed9056ef36aa1e69c2eb..03839302c94adc3175d0a88065cd2302 + * @see ShapelessRecipe#addIngredient(RecipeChoice) */ public ShapelessRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result) { - super(key, result); -@@ -174,7 +171,7 @@ public class ShapelessRecipe extends CraftingRecipe { + super(key, checkResult(result)); +@@ -175,7 +172,7 @@ public class ShapelessRecipe extends CraftingRecipe { /** * Removes multiple instances of an ingredient from the list. If there are diff --git a/patches/api/0059-Shoulder-Entities-Release-API.patch b/patches/api/0059-Shoulder-Entities-Release-API.patch index b7f5537f79..6ac15e28ab 100644 --- a/patches/api/0059-Shoulder-Entities-Release-API.patch +++ b/patches/api/0059-Shoulder-Entities-Release-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Shoulder Entities Release API diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java -index a7bfaa874cbd3fc8d24fffe2f7f14594b37fa18c..8cc6f8547380d567aef7910ef309193bd79ced09 100644 +index 195a7fa0ea8e056cbde7b9152cc014d2c94353ff..85eec2e57b03c11f4737addb0fa88b7bf29dc9e5 100644 --- a/src/main/java/org/bukkit/entity/HumanEntity.java +++ b/src/main/java/org/bukkit/entity/HumanEntity.java -@@ -335,6 +335,26 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder +@@ -337,6 +337,26 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder */ public int getExpToLevel(); diff --git a/patches/api/0067-Allow-plugins-to-use-SLF4J-for-logging.patch b/patches/api/0067-Allow-plugins-to-use-SLF4J-for-logging.patch index 09c7835da1..6b4e030dc0 100644 --- a/patches/api/0067-Allow-plugins-to-use-SLF4J-for-logging.patch +++ b/patches/api/0067-Allow-plugins-to-use-SLF4J-for-logging.patch @@ -45,7 +45,7 @@ index 258d7010d24c529c9bbc76cc26adf226c641ee58..4da053d427f3f9c5e7fc144408836ebe "https://javadoc.io/doc/org.apache.maven.resolver/maven-resolver-api/1.7.3", // Paper ) diff --git a/src/main/java/org/bukkit/plugin/Plugin.java b/src/main/java/org/bukkit/plugin/Plugin.java -index 8c76716249e44ed8bf6be94c1f5c7b6d9bb35be2..4eb639fbb46a0848be207149ea433455550fae1c 100644 +index 68a0ed5f0ed25e98f4ab4d1e482ec2ccfda9cd3a..46fc37a36403c8fbc4c0c9f863d4d57eb3896bd4 100644 --- a/src/main/java/org/bukkit/plugin/Plugin.java +++ b/src/main/java/org/bukkit/plugin/Plugin.java @@ -198,6 +198,22 @@ public interface Plugin extends TabExecutor { diff --git a/patches/api/0068-Handle-plugin-prefixes-in-implementation-logging-con.patch b/patches/api/0068-Handle-plugin-prefixes-in-implementation-logging-con.patch index f80ceb6cb7..74e02036c1 100644 --- a/patches/api/0068-Handle-plugin-prefixes-in-implementation-logging-con.patch +++ b/patches/api/0068-Handle-plugin-prefixes-in-implementation-logging-con.patch @@ -17,7 +17,7 @@ The implementation should handle plugin prefixes by displaying logger names when appropriate. diff --git a/src/main/java/org/bukkit/plugin/java/JavaPlugin.java b/src/main/java/org/bukkit/plugin/java/JavaPlugin.java -index 2a14522c484febcd880d00197df4359a0020dddd..f81e335a4e533221529355bec2f5d588aa79e60c 100644 +index 7f17337b9f0fb60fa1c91c47af496c03290d1b1c..801578de8599d6b546cde63b3f2655fab48eee03 100644 --- a/src/main/java/org/bukkit/plugin/java/JavaPlugin.java +++ b/src/main/java/org/bukkit/plugin/java/JavaPlugin.java @@ -47,7 +47,7 @@ public abstract class JavaPlugin extends PluginBase { diff --git a/patches/api/0070-Add-workaround-for-plugins-modifying-the-parent-of-t.patch b/patches/api/0070-Add-workaround-for-plugins-modifying-the-parent-of-t.patch index 12d008b482..51237ab8d9 100644 --- a/patches/api/0070-Add-workaround-for-plugins-modifying-the-parent-of-t.patch +++ b/patches/api/0070-Add-workaround-for-plugins-modifying-the-parent-of-t.patch @@ -67,7 +67,7 @@ index 0000000000000000000000000000000000000000..087ee57fe5485bc760fadd45a176d4d9 + +} diff --git a/src/main/java/org/bukkit/plugin/java/JavaPlugin.java b/src/main/java/org/bukkit/plugin/java/JavaPlugin.java -index f81e335a4e533221529355bec2f5d588aa79e60c..d359ea9b02952f981b9cf9d778c56eb995454c60 100644 +index 801578de8599d6b546cde63b3f2655fab48eee03..2d64fc065d53dcd8c01d05215c3e63aaf4428177 100644 --- a/src/main/java/org/bukkit/plugin/java/JavaPlugin.java +++ b/src/main/java/org/bukkit/plugin/java/JavaPlugin.java @@ -292,10 +292,10 @@ public abstract class JavaPlugin extends PluginBase { diff --git a/patches/api/0075-Display-warning-on-deprecated-recipe-API.patch b/patches/api/0075-Display-warning-on-deprecated-recipe-API.patch index 94f1cdd1f2..c751b7334b 100644 --- a/patches/api/0075-Display-warning-on-deprecated-recipe-API.patch +++ b/patches/api/0075-Display-warning-on-deprecated-recipe-API.patch @@ -10,25 +10,25 @@ on the players login. Plugin authors need to define a key to keep it consistent between server restarts. diff --git a/src/main/java/org/bukkit/inventory/ShapedRecipe.java b/src/main/java/org/bukkit/inventory/ShapedRecipe.java -index 9f9c67e935940833bbfe58e6bfa398e6c86980d5..71e494177473c62449aafda1699b26a0c4c81a68 100644 +index c414ccf03572d48f5c096516fc60a59bb1e8efd7..e9bac744c5b173e6767e2de8480a6697969fdbb0 100644 --- a/src/main/java/org/bukkit/inventory/ShapedRecipe.java +++ b/src/main/java/org/bukkit/inventory/ShapedRecipe.java @@ -31,6 +31,7 @@ public class ShapedRecipe extends CraftingRecipe { @Deprecated public ShapedRecipe(@NotNull ItemStack result) { - super(NamespacedKey.randomKey(), result); + this(NamespacedKey.randomKey(), result); + new Throwable("Warning: A plugin is creating a recipe using a Deprecated method. This will cause you to receive warnings stating 'Tried to load unrecognized recipe: bukkit:<ID>'. Please ask the author to give their recipe a static key using NamespacedKey.").printStackTrace(); // Paper } /** diff --git a/src/main/java/org/bukkit/inventory/ShapelessRecipe.java b/src/main/java/org/bukkit/inventory/ShapelessRecipe.java -index 03839302c94adc3175d0a88065cd230257ffd20d..d6e38c7ccfe3b6e85eafb611da20b1a29fb74d97 100644 +index b7f46a048633945dc71e8efec9a7ebeed5832fd7..a7513c1aa09b88e3f99e7db40661fd83e682de96 100644 --- a/src/main/java/org/bukkit/inventory/ShapelessRecipe.java +++ b/src/main/java/org/bukkit/inventory/ShapelessRecipe.java @@ -20,6 +20,7 @@ public class ShapelessRecipe extends CraftingRecipe { @Deprecated public ShapelessRecipe(@NotNull ItemStack result) { - super(NamespacedKey.randomKey(), result); + this(NamespacedKey.randomKey(), result); + new Throwable("Warning: A plugin is creating a recipe using a Deprecated method. This will cause you to receive warnings stating 'Tried to load unrecognized recipe: bukkit:<ID>'. Please ask the author to give their recipe a static key using NamespacedKey.").printStackTrace(); // Paper } diff --git a/patches/api/0092-Add-openSign-method-to-HumanEntity.patch b/patches/api/0092-Add-openSign-method-to-HumanEntity.patch index d519918aba..3fdf10fbfc 100644 --- a/patches/api/0092-Add-openSign-method-to-HumanEntity.patch +++ b/patches/api/0092-Add-openSign-method-to-HumanEntity.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add openSign method to HumanEntity diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java -index 8cc6f8547380d567aef7910ef309193bd79ced09..48bb08cc7c0af6ebb905d1e175ada0fd7944ca48 100644 +index 85eec2e57b03c11f4737addb0fa88b7bf29dc9e5..58dbe34ab1b603c2cd53af1625c1f82f8890da01 100644 --- a/src/main/java/org/bukkit/entity/HumanEntity.java +++ b/src/main/java/org/bukkit/entity/HumanEntity.java -@@ -496,6 +496,26 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder +@@ -498,6 +498,26 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder */ @Deprecated public void setShoulderEntityRight(@Nullable Entity entity); diff --git a/patches/api/0114-LivingEntity-Active-Item-API.patch b/patches/api/0114-LivingEntity-Active-Item-API.patch index f98f5d9a7e..0081842496 100644 --- a/patches/api/0114-LivingEntity-Active-Item-API.patch +++ b/patches/api/0114-LivingEntity-Active-Item-API.patch @@ -9,10 +9,10 @@ such as a bow or eating food. Co-authored-by: Jake Potrebic <[email protected]> diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java -index 48bb08cc7c0af6ebb905d1e175ada0fd7944ca48..ee3086661e11d3d8faec30590be7131648d3b82a 100644 +index 58dbe34ab1b603c2cd53af1625c1f82f8890da01..9cbb9093e7d8cd21eef6a23c265d68d7d0ee97b8 100644 --- a/src/main/java/org/bukkit/entity/HumanEntity.java +++ b/src/main/java/org/bukkit/entity/HumanEntity.java -@@ -325,7 +325,9 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder +@@ -327,7 +327,9 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder * blocking). * * @return Whether their hand is raised diff --git a/patches/api/0117-InventoryCloseEvent-Reason-API.patch b/patches/api/0117-InventoryCloseEvent-Reason-API.patch index ed0568548a..1be4583340 100644 --- a/patches/api/0117-InventoryCloseEvent-Reason-API.patch +++ b/patches/api/0117-InventoryCloseEvent-Reason-API.patch @@ -7,10 +7,10 @@ Allows you to determine why an inventory was closed, enabling plugin developers to "confirm" things based on if it was player triggered close or not. diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java -index ee3086661e11d3d8faec30590be7131648d3b82a..25cd03f2f3dc0aaa67173c0f3ebfe56402489e24 100644 +index 9cbb9093e7d8cd21eef6a23c265d68d7d0ee97b8..3985798654a3085c128144e46f7113b7744b8d14 100644 --- a/src/main/java/org/bukkit/entity/HumanEntity.java +++ b/src/main/java/org/bukkit/entity/HumanEntity.java -@@ -185,6 +185,15 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder +@@ -187,6 +187,15 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder */ public void closeInventory(); diff --git a/patches/api/0160-Add-ItemStack-Recipe-API-helper-methods.patch b/patches/api/0160-Add-ItemStack-Recipe-API-helper-methods.patch index 14e94043d2..78e75fc75c 100644 --- a/patches/api/0160-Add-ItemStack-Recipe-API-helper-methods.patch +++ b/patches/api/0160-Add-ItemStack-Recipe-API-helper-methods.patch @@ -22,10 +22,10 @@ index a98fc2ffdae1a2f8f3a312bed95268e105f7f791..91bfeffcdbe47208c7d0ddbe013cd0f1 public static class ExactChoice implements RecipeChoice { diff --git a/src/main/java/org/bukkit/inventory/ShapedRecipe.java b/src/main/java/org/bukkit/inventory/ShapedRecipe.java -index 1ef513d4d03ce677ee9c77b91e2cc5553ab91e0b..1012656948e9bf2aa18867cc2409616f3f21501e 100644 +index e9bac744c5b173e6767e2de8480a6697969fdbb0..fa03cf187db29896f5af046b311f67881aee0ff4 100644 --- a/src/main/java/org/bukkit/inventory/ShapedRecipe.java +++ b/src/main/java/org/bukkit/inventory/ShapedRecipe.java -@@ -179,6 +179,13 @@ public class ShapedRecipe extends CraftingRecipe { +@@ -180,6 +180,13 @@ public class ShapedRecipe extends CraftingRecipe { return this; } @@ -40,10 +40,10 @@ index 1ef513d4d03ce677ee9c77b91e2cc5553ab91e0b..1012656948e9bf2aa18867cc2409616f * Get a copy of the ingredients map. * diff --git a/src/main/java/org/bukkit/inventory/ShapelessRecipe.java b/src/main/java/org/bukkit/inventory/ShapelessRecipe.java -index d6e38c7ccfe3b6e85eafb611da20b1a29fb74d97..b8ac602cd2718d615ec243ce648951a1a46c26ec 100644 +index a7513c1aa09b88e3f99e7db40661fd83e682de96..63a233cc819d8d6995d14b9dbfabc14d89af54cc 100644 --- a/src/main/java/org/bukkit/inventory/ShapelessRecipe.java +++ b/src/main/java/org/bukkit/inventory/ShapelessRecipe.java -@@ -131,6 +131,40 @@ public class ShapelessRecipe extends CraftingRecipe { +@@ -132,6 +132,40 @@ public class ShapelessRecipe extends CraftingRecipe { return this; } @@ -84,7 +84,7 @@ index d6e38c7ccfe3b6e85eafb611da20b1a29fb74d97..b8ac602cd2718d615ec243ce648951a1 /** * Removes an ingredient from the list. * -@@ -154,7 +188,7 @@ public class ShapelessRecipe extends CraftingRecipe { +@@ -155,7 +189,7 @@ public class ShapelessRecipe extends CraftingRecipe { */ @NotNull public ShapelessRecipe removeIngredient(@NotNull Material ingredient) { @@ -93,7 +93,7 @@ index d6e38c7ccfe3b6e85eafb611da20b1a29fb74d97..b8ac602cd2718d615ec243ce648951a1 } /** -@@ -181,7 +215,7 @@ public class ShapelessRecipe extends CraftingRecipe { +@@ -182,7 +216,7 @@ public class ShapelessRecipe extends CraftingRecipe { */ @NotNull public ShapelessRecipe removeIngredient(int count, @NotNull Material ingredient) { diff --git a/patches/api/0166-Fix-Spigot-annotation-mistakes.patch b/patches/api/0166-Fix-Spigot-annotation-mistakes.patch index da580bdf21..22026b5734 100644 --- a/patches/api/0166-Fix-Spigot-annotation-mistakes.patch +++ b/patches/api/0166-Fix-Spigot-annotation-mistakes.patch @@ -453,7 +453,7 @@ index 48aecc9421c500137bbef1dfe3bec8de277c3ff9..aff858346776386f1288b648b221404f return note; } diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java -index 3bd96bbd35b657a6030d744e86622e616c2c3b08..5529e227781cd2411de9c6581a1cb1255ce9bb20 100644 +index d1906d150a7d4c4852e085d6fd480aec317c22e4..e9edc8c17cbd29cfdad31df13acb15bab2304735 100644 --- a/src/main/java/org/bukkit/Registry.java +++ b/src/main/java/org/bukkit/Registry.java @@ -220,14 +220,12 @@ public interface Registry<T extends Keyed> extends Iterable<T> { @@ -1068,15 +1068,15 @@ index 53119742beda00a38111063243665bb995ae2188..2d084214e991fecc51f8e18e3d733e43 private static final HandlerList handlers = new HandlerList(); diff --git a/src/main/java/org/bukkit/event/enchantment/PrepareItemEnchantEvent.java b/src/main/java/org/bukkit/event/enchantment/PrepareItemEnchantEvent.java -index f2edd4a9357832e9dec3fb0aafa006335d7b289b..f05ce4fd6c4bbd79edc5f65e7edd1e4a63e93fb8 100644 +index 7ae338bcecff2ce25939035181457ced505b3a49..27564727edbd9f093e3a021ce6f30e1146a8ddbb 100644 --- a/src/main/java/org/bukkit/event/enchantment/PrepareItemEnchantEvent.java +++ b/src/main/java/org/bukkit/event/enchantment/PrepareItemEnchantEvent.java @@ -23,7 +23,7 @@ public class PrepareItemEnchantEvent extends InventoryEvent implements Cancellab private boolean cancelled; private final Player enchanter; -- public PrepareItemEnchantEvent(@NotNull final Player enchanter, @NotNull InventoryView view, @NotNull final Block table, @NotNull final ItemStack item, @NotNull final EnchantmentOffer[] offers, final int bonus) { -+ public PrepareItemEnchantEvent(@NotNull final Player enchanter, @NotNull InventoryView view, @NotNull final Block table, @NotNull final ItemStack item, @org.jetbrains.annotations.Nullable final EnchantmentOffer @NotNull [] offers, final int bonus) { // Paper - offers can contain null values +- public PrepareItemEnchantEvent(@NotNull final Player enchanter, @NotNull EnchantmentView view, @NotNull final Block table, @NotNull final ItemStack item, @NotNull final EnchantmentOffer[] offers, final int bonus) { ++ public PrepareItemEnchantEvent(@NotNull final Player enchanter, @NotNull EnchantmentView view, @NotNull final Block table, @NotNull final ItemStack item, @org.jetbrains.annotations.Nullable final EnchantmentOffer @NotNull [] offers, final int bonus) { // Paper - offers can contain null values super(view); this.enchanter = enchanter; this.table = table; @@ -1497,10 +1497,10 @@ index f1a48eab1a357ae64545e1f1dc941c383cff8707..466d1bd7089b76f48f953e1a51c611ec /** * Checks if the inventory contains any ItemStacks with the given diff --git a/src/main/java/org/bukkit/inventory/InventoryView.java b/src/main/java/org/bukkit/inventory/InventoryView.java -index 5954dff2134654bb0ccc3b4c3b51a8e1ca77f6c9..72f93377b60a3b6a08b8c8264ee7313e89c15da0 100644 +index ebc14022c9ef9b0b3331ee53e96a32667e4762e0..2b2c5faabce1628bd2e82a840dc97fe79bb57856 100644 --- a/src/main/java/org/bukkit/inventory/InventoryView.java +++ b/src/main/java/org/bukkit/inventory/InventoryView.java -@@ -121,9 +121,9 @@ public interface InventoryView { +@@ -123,9 +123,9 @@ public interface InventoryView { * Gets the id of this view. * * @return the id of this view @@ -1512,7 +1512,7 @@ index 5954dff2134654bb0ccc3b4c3b51a8e1ca77f6c9..72f93377b60a3b6a08b8c8264ee7313e public int getId() { return id; } -@@ -193,10 +193,10 @@ public interface InventoryView { +@@ -195,10 +195,10 @@ public interface InventoryView { /** * Get the item on the cursor of one of the viewing players. * @@ -1627,10 +1627,10 @@ index 476fe14faa39f02444cab8ad95d4401033dc6938..2c54660dc1fbc7c1232096797a23cae1 /** diff --git a/src/main/java/org/bukkit/inventory/ShapedRecipe.java b/src/main/java/org/bukkit/inventory/ShapedRecipe.java -index 1012656948e9bf2aa18867cc2409616f3f21501e..aa3b3070126f1c492f004ec7599eeb379b58f207 100644 +index fa03cf187db29896f5af046b311f67881aee0ff4..295d82dd73b600e9436d2bbec0e11dbeaf78bbf4 100644 --- a/src/main/java/org/bukkit/inventory/ShapedRecipe.java +++ b/src/main/java/org/bukkit/inventory/ShapedRecipe.java -@@ -106,8 +106,10 @@ public class ShapedRecipe extends CraftingRecipe { +@@ -107,8 +107,10 @@ public class ShapedRecipe extends CraftingRecipe { * @return The changed recipe, so you can chain calls. * @throws IllegalArgumentException if the {@code key} is a space character * @throws IllegalArgumentException if the {@code key} does not appear in the shape. @@ -1641,7 +1641,7 @@ index 1012656948e9bf2aa18867cc2409616f3f21501e..aa3b3070126f1c492f004ec7599eeb37 public ShapedRecipe setIngredient(char key, @NotNull MaterialData ingredient) { return setIngredient(key, ingredient.getItemType(), ingredient.getData()); } -@@ -190,7 +192,9 @@ public class ShapedRecipe extends CraftingRecipe { +@@ -191,7 +193,9 @@ public class ShapedRecipe extends CraftingRecipe { * Get a copy of the ingredients map. * * @return The mapping of character to ingredients. @@ -1652,10 +1652,10 @@ index 1012656948e9bf2aa18867cc2409616f3f21501e..aa3b3070126f1c492f004ec7599eeb37 public Map<Character, ItemStack> getIngredientMap() { HashMap<Character, ItemStack> result = new HashMap<Character, ItemStack>(); diff --git a/src/main/java/org/bukkit/inventory/ShapelessRecipe.java b/src/main/java/org/bukkit/inventory/ShapelessRecipe.java -index b8ac602cd2718d615ec243ce648951a1a46c26ec..beb798482479c58a8628c314b510ab6349576ce8 100644 +index 63a233cc819d8d6995d14b9dbfabc14d89af54cc..3bf5064cd6ceb05ea98b18993da46c67be140115 100644 --- a/src/main/java/org/bukkit/inventory/ShapelessRecipe.java +++ b/src/main/java/org/bukkit/inventory/ShapelessRecipe.java -@@ -43,8 +43,10 @@ public class ShapelessRecipe extends CraftingRecipe { +@@ -44,8 +44,10 @@ public class ShapelessRecipe extends CraftingRecipe { * * @param ingredient The ingredient to add. * @return The changed recipe, so you can chain calls. @@ -1666,7 +1666,7 @@ index b8ac602cd2718d615ec243ce648951a1a46c26ec..beb798482479c58a8628c314b510ab63 public ShapelessRecipe addIngredient(@NotNull MaterialData ingredient) { return addIngredient(1, ingredient); } -@@ -80,8 +82,10 @@ public class ShapelessRecipe extends CraftingRecipe { +@@ -81,8 +83,10 @@ public class ShapelessRecipe extends CraftingRecipe { * @param count How many to add (can't be more than 9!) * @param ingredient The ingredient to add. * @return The changed recipe, so you can chain calls. @@ -1677,7 +1677,7 @@ index b8ac602cd2718d615ec243ce648951a1a46c26ec..beb798482479c58a8628c314b510ab63 public ShapelessRecipe addIngredient(int count, @NotNull MaterialData ingredient) { return addIngredient(count, ingredient.getItemType(), ingredient.getData()); } -@@ -198,8 +202,10 @@ public class ShapelessRecipe extends CraftingRecipe { +@@ -199,8 +203,10 @@ public class ShapelessRecipe extends CraftingRecipe { * * @param ingredient The ingredient to remove * @return The changed recipe. @@ -1688,7 +1688,7 @@ index b8ac602cd2718d615ec243ce648951a1a46c26ec..beb798482479c58a8628c314b510ab63 public ShapelessRecipe removeIngredient(@NotNull MaterialData ingredient) { return removeIngredient(ingredient.getItemType(), ingredient.getData()); } -@@ -226,8 +232,10 @@ public class ShapelessRecipe extends CraftingRecipe { +@@ -227,8 +233,10 @@ public class ShapelessRecipe extends CraftingRecipe { * @param count The number of copies to remove. * @param ingredient The ingredient to remove. * @return The changed recipe. @@ -1699,7 +1699,7 @@ index b8ac602cd2718d615ec243ce648951a1a46c26ec..beb798482479c58a8628c314b510ab63 public ShapelessRecipe removeIngredient(int count, @NotNull MaterialData ingredient) { return removeIngredient(count, ingredient.getItemType(), ingredient.getData()); } -@@ -277,7 +285,9 @@ public class ShapelessRecipe extends CraftingRecipe { +@@ -278,7 +286,9 @@ public class ShapelessRecipe extends CraftingRecipe { * Get the list of ingredients used for this recipe. * * @return The input list diff --git a/patches/api/0173-Set-true-custom-payload-channel-size-limit.patch b/patches/api/0173-Set-true-custom-payload-channel-size-limit.patch index c524e2aaa0..e64cd78834 100644 --- a/patches/api/0173-Set-true-custom-payload-channel-size-limit.patch +++ b/patches/api/0173-Set-true-custom-payload-channel-size-limit.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Set true custom payload channel size limit This fixes compatibility with some mods that are sending very long channel names. Also gives developers the ability to send longer channel names. diff --git a/src/main/java/org/bukkit/plugin/messaging/Messenger.java b/src/main/java/org/bukkit/plugin/messaging/Messenger.java -index 9d2c68c826f3b867d407e7f13c6394a899cc8ee8..aec70aa740152c34297c42ad6e06c8b54523e78b 100644 +index c748a94523c8bc2140e1842ed7d8d462b52507d5..754fac6b2a45399efa34b06c6aa61f88c19e3d2b 100644 --- a/src/main/java/org/bukkit/plugin/messaging/Messenger.java +++ b/src/main/java/org/bukkit/plugin/messaging/Messenger.java @@ -24,7 +24,7 @@ public interface Messenger { diff --git a/patches/api/0185-Add-item-slot-convenience-methods.patch b/patches/api/0185-Add-item-slot-convenience-methods.patch index 20638212e8..8da43fffbf 100644 --- a/patches/api/0185-Add-item-slot-convenience-methods.patch +++ b/patches/api/0185-Add-item-slot-convenience-methods.patch @@ -6,12 +6,12 @@ Subject: [PATCH] Add item slot convenience methods Co-authored-by: Janet Blackquill <[email protected]> diff --git a/src/main/java/org/bukkit/inventory/AnvilInventory.java b/src/main/java/org/bukkit/inventory/AnvilInventory.java -index 52519cd877017704b53d36088d4d4c28f8f27397..c60be4fd24c7fdf65251dd6169e5e1ac3b588d95 100644 +index 4f484df010dabf03ac4712996a0fd4d8f3649b59..f1f97a85ec713c05c882d7588f4a3e4a017f4795 100644 --- a/src/main/java/org/bukkit/inventory/AnvilInventory.java +++ b/src/main/java/org/bukkit/inventory/AnvilInventory.java -@@ -63,4 +63,64 @@ public interface AnvilInventory extends Inventory { - * @param levels the maximum experience cost +@@ -78,4 +78,64 @@ public interface AnvilInventory extends Inventory { */ + @Deprecated(forRemoval = true, since = "1.21") void setMaximumRepairCost(int levels); + + // Paper start diff --git a/patches/api/0190-Potential-bed-API.patch b/patches/api/0190-Potential-bed-API.patch index 42350ac7bd..1cbb7daffa 100644 --- a/patches/api/0190-Potential-bed-API.patch +++ b/patches/api/0190-Potential-bed-API.patch @@ -8,10 +8,10 @@ Adds a new method to fetch the location of a player's bed without generating any getPotentialBedLocation - Gets the last known location of a player's bed. This does not preform any check if the bed is still valid and does not load any chunks. diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java -index 25cd03f2f3dc0aaa67173c0f3ebfe56402489e24..ccaaf2b6f6424ec7c7d298ceabdc3e60a7917705 100644 +index 3985798654a3085c128144e46f7113b7744b8d14..11c5846848a6631a9376934622caeadd448b0391 100644 --- a/src/main/java/org/bukkit/entity/HumanEntity.java +++ b/src/main/java/org/bukkit/entity/HumanEntity.java -@@ -275,6 +275,19 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder +@@ -277,6 +277,19 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder */ public int getSleepTicks(); diff --git a/patches/api/0196-Add-PrepareResultEvent-PrepareGrindstoneEvent.patch b/patches/api/0196-Add-PrepareResultEvent-PrepareGrindstoneEvent.patch index 95fb3a46ed..10dd96ba7d 100644 --- a/patches/api/0196-Add-PrepareResultEvent-PrepareGrindstoneEvent.patch +++ b/patches/api/0196-Add-PrepareResultEvent-PrepareGrindstoneEvent.patch @@ -93,7 +93,7 @@ index 0000000000000000000000000000000000000000..c305c606bef93866993095cec5f50e19 + } +} diff --git a/src/main/java/org/bukkit/event/inventory/PrepareAnvilEvent.java b/src/main/java/org/bukkit/event/inventory/PrepareAnvilEvent.java -index 8977f7609431c3c46324a82de84d4a32f4b71c57..d884ecf40af964e718168ac055dd6c672d108eb1 100644 +index 8a5be3f0322ac19aeac3f00df54add0e73bc87ed..d2b4b2e9385e7c1e0e1e42886481b99ecc8dcf8e 100644 --- a/src/main/java/org/bukkit/event/inventory/PrepareAnvilEvent.java +++ b/src/main/java/org/bukkit/event/inventory/PrepareAnvilEvent.java @@ -10,9 +10,9 @@ import org.jetbrains.annotations.Nullable; @@ -106,10 +106,10 @@ index 8977f7609431c3c46324a82de84d4a32f4b71c57..d884ecf40af964e718168ac055dd6c67 - private static final HandlerList handlers = new HandlerList(); + // Paper - move HandlerList to PrepareInventoryResultEvent - public PrepareAnvilEvent(@NotNull InventoryView inventory, @Nullable ItemStack result) { + public PrepareAnvilEvent(@NotNull AnvilView inventory, @Nullable ItemStack result) { super(inventory, result); -@@ -38,14 +38,5 @@ public class PrepareAnvilEvent extends PrepareInventoryResultEvent { - super.setResult(result); +@@ -44,14 +44,5 @@ public class PrepareAnvilEvent extends PrepareInventoryResultEvent { + return (AnvilView) super.getView(); } - @NotNull diff --git a/patches/api/0204-Add-additional-open-container-api-to-HumanEntity.patch b/patches/api/0204-Add-additional-open-container-api-to-HumanEntity.patch index c81c83391c..3fe46b8c28 100644 --- a/patches/api/0204-Add-additional-open-container-api-to-HumanEntity.patch +++ b/patches/api/0204-Add-additional-open-container-api-to-HumanEntity.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add additional open container api to HumanEntity diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java -index ccaaf2b6f6424ec7c7d298ceabdc3e60a7917705..b980d55b68ed9da78c5cd19f369bb00dccbf08e1 100644 +index 11c5846848a6631a9376934622caeadd448b0391..f20b0a439c4d5cd2c6caa70a46b1b49f8ab23425 100644 --- a/src/main/java/org/bukkit/entity/HumanEntity.java +++ b/src/main/java/org/bukkit/entity/HumanEntity.java -@@ -180,6 +180,92 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder +@@ -182,6 +182,92 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder @Nullable public InventoryView openMerchant(@NotNull Merchant merchant, boolean force); diff --git a/patches/api/0220-Expose-LivingEntity-hurt-direction.patch b/patches/api/0220-Expose-LivingEntity-hurt-direction.patch index 4d2cb26c38..d8800e48d1 100644 --- a/patches/api/0220-Expose-LivingEntity-hurt-direction.patch +++ b/patches/api/0220-Expose-LivingEntity-hurt-direction.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Expose LivingEntity hurt direction diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java -index b980d55b68ed9da78c5cd19f369bb00dccbf08e1..4d6ceca22d98a3e46aa26ef26176c5417a5ccf35 100644 +index f20b0a439c4d5cd2c6caa70a46b1b49f8ab23425..937c136f2499bd1660989d14c0f50a7ef9a1a2b6 100644 --- a/src/main/java/org/bukkit/entity/HumanEntity.java +++ b/src/main/java/org/bukkit/entity/HumanEntity.java -@@ -354,6 +354,16 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder +@@ -356,6 +356,16 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder */ public void setCooldown(@NotNull Material material, int ticks); diff --git a/patches/api/0236-Add-RegistryAccess-for-managing-registries.patch b/patches/api/0236-Add-RegistryAccess-for-managing-registries.patch index f0864c18fa..43afaf23b3 100644 --- a/patches/api/0236-Add-RegistryAccess-for-managing-registries.patch +++ b/patches/api/0236-Add-RegistryAccess-for-managing-registries.patch @@ -206,7 +206,7 @@ index e0f652117e585882693736de8165ae9c689e1d68..fbe14c327ee9c1ac07893853ca7c699e return server.getRegistry(tClass); } diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java -index 5529e227781cd2411de9c6581a1cb1255ce9bb20..f99e68f160deba42e2833fa0f81df4c17bf68ec7 100644 +index e9edc8c17cbd29cfdad31df13acb15bab2304735..987cde111d27638eb89105d2615a4da503de174b 100644 --- a/src/main/java/org/bukkit/Registry.java +++ b/src/main/java/org/bukkit/Registry.java @@ -102,7 +102,7 @@ public interface Registry<T extends Keyed> extends Iterable<T> { diff --git a/patches/api/0256-add-isDeeplySleeping-to-HumanEntity.patch b/patches/api/0256-add-isDeeplySleeping-to-HumanEntity.patch index e561fa1dba..14754cc21c 100644 --- a/patches/api/0256-add-isDeeplySleeping-to-HumanEntity.patch +++ b/patches/api/0256-add-isDeeplySleeping-to-HumanEntity.patch @@ -5,10 +5,10 @@ Subject: [PATCH] add isDeeplySleeping to HumanEntity diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java -index 4d6ceca22d98a3e46aa26ef26176c5417a5ccf35..58c842a1fd946d94ae29c7d2439aaf77e47f69b4 100644 +index 937c136f2499bd1660989d14c0f50a7ef9a1a2b6..b1b18886fc63a4854c2858ff9869da70e92dae26 100644 --- a/src/main/java/org/bukkit/entity/HumanEntity.java +++ b/src/main/java/org/bukkit/entity/HumanEntity.java -@@ -364,6 +364,15 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder +@@ -366,6 +366,15 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder void setHurtDirection(float hurtDirection); // Paper end diff --git a/patches/api/0277-Improve-item-default-attribute-API.patch b/patches/api/0277-Improve-item-default-attribute-API.patch index e7c6fb4cd2..c50dedd13c 100644 --- a/patches/api/0277-Improve-item-default-attribute-API.patch +++ b/patches/api/0277-Improve-item-default-attribute-API.patch @@ -72,7 +72,7 @@ index cc25734f3dcf6075eb44e39da01ed2f1b59b618e..8b04e0d81c56712057f1fee288b3609e * * @param slot the {@link EquipmentSlot} to check diff --git a/src/main/java/org/bukkit/inventory/ItemType.java b/src/main/java/org/bukkit/inventory/ItemType.java -index 5dd1c084e42ee93f3a358f58ed76b0a7d36f0713..94587a97fcea81a43b160b01d2c81cef2b7f4413 100644 +index 2b5a18fe7e885fa9b581c0afb299e31f3db2690c..a6d1dde422de98f178c0c9add99e01203a35e5cb 100644 --- a/src/main/java/org/bukkit/inventory/ItemType.java +++ b/src/main/java/org/bukkit/inventory/ItemType.java @@ -2261,6 +2261,21 @@ public interface ItemType extends Keyed, Translatable, net.kyori.adventure.trans diff --git a/patches/api/0329-More-PotionEffectType-API.patch b/patches/api/0329-More-PotionEffectType-API.patch index d80151aec0..dead62249f 100644 --- a/patches/api/0329-More-PotionEffectType-API.patch +++ b/patches/api/0329-More-PotionEffectType-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] More PotionEffectType API diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java -index a583d26883c8b7012203e128cd64113df94307c1..4d3e0b90579b33ff93fc565e8ee99a01b690c62b 100644 +index 987cde111d27638eb89105d2615a4da503de174b..4cfaf177052f40cc409f0a90272af147825e4b1f 100644 --- a/src/main/java/org/bukkit/Registry.java +++ b/src/main/java/org/bukkit/Registry.java @@ -321,6 +321,33 @@ public interface Registry<T extends Keyed> extends Iterable<T> { diff --git a/patches/api/0352-Add-Player-getFishHook.patch b/patches/api/0352-Add-Player-getFishHook.patch index 61c4560da5..0e0d38d513 100644 --- a/patches/api/0352-Add-Player-getFishHook.patch +++ b/patches/api/0352-Add-Player-getFishHook.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add Player#getFishHook diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java -index 58c842a1fd946d94ae29c7d2439aaf77e47f69b4..294de2c073167e7186fbf1d6885fe5951351cc9c 100644 +index b1b18886fc63a4854c2858ff9869da70e92dae26..773651350c17cae9058346a590eda758071b7447 100644 --- a/src/main/java/org/bukkit/entity/HumanEntity.java +++ b/src/main/java/org/bukkit/entity/HumanEntity.java -@@ -392,6 +392,13 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder +@@ -394,6 +394,13 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder @Nullable public Location getPotentialBedLocation(); // Paper end diff --git a/patches/api/0392-Add-Shearable-API.patch b/patches/api/0392-Add-Shearable-API.patch index 06e4cefb44..dcd0ffe7bd 100644 --- a/patches/api/0392-Add-Shearable-API.patch +++ b/patches/api/0392-Add-Shearable-API.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add Shearable API diff --git a/src/main/java/io/papermc/paper/entity/Shearable.java b/src/main/java/io/papermc/paper/entity/Shearable.java new file mode 100644 -index 0000000000000000000000000000000000000000..0d5793790ab6a47525ad33033517361205756338 +index 0000000000000000000000000000000000000000..b547922db418ff813ddb6a3b37dced0db393e1f5 --- /dev/null +++ b/src/main/java/io/papermc/paper/entity/Shearable.java -@@ -0,0 +1,43 @@ +@@ -0,0 +1,53 @@ +package io.papermc.paper.entity; + +import net.kyori.adventure.sound.Sound; @@ -52,17 +52,27 @@ index 0000000000000000000000000000000000000000..0d5793790ab6a47525ad330335173612 + * @return if the entity can be sheared + */ + boolean readyToBeSheared(); ++ ++ /** ++ * @return Whether the sheep is sheared. ++ */ ++ public boolean isSheared(); ++ ++ /** ++ * @param flag Whether to shear the sheep ++ */ ++ public void setSheared(boolean flag); +} diff --git a/src/main/java/org/bukkit/entity/Bogged.java b/src/main/java/org/bukkit/entity/Bogged.java -index a89f104aa2b2244c075a72c698a9b616c57eaf7c..a36bb84c17120bc578ab01d45f6f12fb1faf9548 100644 +index 8b75a505a55a96a5795ac31a2d37307add12cd9e..6296a6f3f3e794677fd3a626376f357c740ec356 100644 --- a/src/main/java/org/bukkit/entity/Bogged.java +++ b/src/main/java/org/bukkit/entity/Bogged.java @@ -6,5 +6,5 @@ import org.jetbrains.annotations.ApiStatus; * Represents a Bogged Skeleton. */ @ApiStatus.Experimental --public interface Bogged extends AbstractSkeleton { -+public interface Bogged extends AbstractSkeleton, io.papermc.paper.entity.Shearable { // Paper - Shear API +-public interface Bogged extends AbstractSkeleton, Shearable { ++public interface Bogged extends AbstractSkeleton, Shearable, io.papermc.paper.entity.Shearable { // Paper - Shear API } diff --git a/src/main/java/org/bukkit/entity/MushroomCow.java b/src/main/java/org/bukkit/entity/MushroomCow.java index cef1700834643fe28ed5737578d91ecefbe99e2f..86c0043ef4e1288b6fe2f68a9b6d01c3de2c3454 100644 @@ -78,18 +88,16 @@ index cef1700834643fe28ed5737578d91ecefbe99e2f..86c0043ef4e1288b6fe2f68a9b6d01c3 /** * Checks for the presence of custom potion effects to be applied to the diff --git a/src/main/java/org/bukkit/entity/Sheep.java b/src/main/java/org/bukkit/entity/Sheep.java -index f4ce312ccd927a8b64f4266b35a0a53b85e591f3..97388d46cee225dedc0b61a12e7b60b3424732c8 100644 +index 46bc1a0ed9ee320c68a38362c1fa1f31319f01d8..01a0e5b1bb18d7a28d68329c2e2ab78a8df45f8e 100644 --- a/src/main/java/org/bukkit/entity/Sheep.java +++ b/src/main/java/org/bukkit/entity/Sheep.java -@@ -5,7 +5,7 @@ import org.bukkit.material.Colorable; +@@ -5,5 +5,5 @@ import org.bukkit.material.Colorable; /** * Represents a Sheep. */ --public interface Sheep extends Animals, Colorable { -+public interface Sheep extends Animals, Colorable, io.papermc.paper.entity.Shearable { // Paper - Shear API - - /** - * @return Whether the sheep is sheared. +-public interface Sheep extends Animals, Colorable, Shearable { ++public interface Sheep extends Animals, Colorable, Shearable, io.papermc.paper.entity.Shearable { // Paper - Shear API + } diff --git a/src/main/java/org/bukkit/entity/Snowman.java b/src/main/java/org/bukkit/entity/Snowman.java index 10f8f6d45ae9280651c3ebddd1f90acbd7d6ff29..7fbfdb07585c7b28acea1f0c1f58ada0cc744441 100644 --- a/src/main/java/org/bukkit/entity/Snowman.java diff --git a/patches/api/0426-Attribute-Modifier-API-improvements.patch b/patches/api/0426-Attribute-Modifier-API-improvements.patch index dc2fb7fbe6..acf67fcd39 100644 --- a/patches/api/0426-Attribute-Modifier-API-improvements.patch +++ b/patches/api/0426-Attribute-Modifier-API-improvements.patch @@ -70,7 +70,7 @@ index f08ee26cc4d479e1bfc5264b8cbe721315de91f2..f1fa86ddf1f50a357c9e94cc61261d8c * Remove a modifier from this instance. * diff --git a/src/main/java/org/bukkit/attribute/AttributeModifier.java b/src/main/java/org/bukkit/attribute/AttributeModifier.java -index c6b8700d258b859d246118868167497397010292..3808f76d49e24c20156c013f68e00efa9351f1a3 100644 +index ee39c0b83e558681e8b006172d34c98e2c83cda2..c57690798108e9f91f8c552f39dcc2b080fe1b61 100644 --- a/src/main/java/org/bukkit/attribute/AttributeModifier.java +++ b/src/main/java/org/bukkit/attribute/AttributeModifier.java @@ -25,26 +25,32 @@ public class AttributeModifier implements ConfigurationSerializable, Keyed { diff --git a/patches/api/0430-Experimental-annotations-change.patch b/patches/api/0430-Experimental-annotations-change.patch index 59788de534..9ea8f3a126 100644 --- a/patches/api/0430-Experimental-annotations-change.patch +++ b/patches/api/0430-Experimental-annotations-change.patch @@ -104,7 +104,7 @@ index 60fbacee263e55f91ac977f020e390d46024723a..ecff691c3a0878659fb051926ef769ce /** diff --git a/src/main/java/org/bukkit/entity/Bogged.java b/src/main/java/org/bukkit/entity/Bogged.java -index a36bb84c17120bc578ab01d45f6f12fb1faf9548..719bccf8638f8ad358d37fa7eeccbc4c08d32868 100644 +index 6296a6f3f3e794677fd3a626376f357c740ec356..7d993f8bd18ec1d3260d12f0ff8078a86ee4867d 100644 --- a/src/main/java/org/bukkit/entity/Bogged.java +++ b/src/main/java/org/bukkit/entity/Bogged.java @@ -5,6 +5,5 @@ import org.jetbrains.annotations.ApiStatus; @@ -112,7 +112,7 @@ index a36bb84c17120bc578ab01d45f6f12fb1faf9548..719bccf8638f8ad358d37fa7eeccbc4c * Represents a Bogged Skeleton. */ - public interface Bogged extends AbstractSkeleton, io.papermc.paper.entity.Shearable { // Paper - Shear API + public interface Bogged extends AbstractSkeleton, Shearable, io.papermc.paper.entity.Shearable { // Paper - Shear API } diff --git a/src/main/java/org/bukkit/entity/Breeze.java b/src/main/java/org/bukkit/entity/Breeze.java index a75e725805c193a408683885cba83ca168347165..254bc6e18961a72f471334cc0535e3c7a9d70012 100644 diff --git a/patches/api/0432-Improve-Registry.patch b/patches/api/0432-Improve-Registry.patch index 4c5275651a..25dc918f6f 100644 --- a/patches/api/0432-Improve-Registry.patch +++ b/patches/api/0432-Improve-Registry.patch @@ -31,7 +31,7 @@ index 62d2b3f950860dee0898d77b0a29635c3f9a7e23..704dba92f9246ef398ed8d162ebee3cf @Override public @NotNull String translationKey() { diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java -index 4d3e0b90579b33ff93fc565e8ee99a01b690c62b..36a8f6082f111a1cbb25e0ff3c968a89f02611a0 100644 +index 4cfaf177052f40cc409f0a90272af147825e4b1f..7296bd71a5e3d4f977701d6fa1cdd3def63fcd54 100644 --- a/src/main/java/org/bukkit/Registry.java +++ b/src/main/java/org/bukkit/Registry.java @@ -357,6 +357,79 @@ public interface Registry<T extends Keyed> extends Iterable<T> { @@ -128,12 +128,12 @@ index 4d3e0b90579b33ff93fc565e8ee99a01b690c62b..36a8f6082f111a1cbb25e0ff3c968a89 } } diff --git a/src/main/java/org/bukkit/block/banner/PatternType.java b/src/main/java/org/bukkit/block/banner/PatternType.java -index 6a6be0287255cf38a735bfc83ec91644dc96b903..1883183157c875d87656fdc86a589e9b95dc4895 100644 +index 9e90572745909538e942b7fbe788b5286c6cc9a3..100f93358e0a1fa8507775a2afd29314ff353a87 100644 --- a/src/main/java/org/bukkit/block/banner/PatternType.java +++ b/src/main/java/org/bukkit/block/banner/PatternType.java -@@ -69,6 +69,13 @@ public enum PatternType implements Keyed { - this.key = NamespacedKey.minecraft(key); - } +@@ -56,6 +56,13 @@ public interface PatternType extends OldEnum<PatternType>, Keyed { + PatternType FLOW = getType("flow"); + PatternType GUSTER = getType("guster"); + // Paper start - deprecate getKey + /** @@ -144,7 +144,7 @@ index 6a6be0287255cf38a735bfc83ec91644dc96b903..1883183157c875d87656fdc86a589e9b + // Paper end - deprecate getKey @Override @NotNull - public NamespacedKey getKey() { + public NamespacedKey getKey(); diff --git a/src/main/java/org/bukkit/generator/structure/Structure.java b/src/main/java/org/bukkit/generator/structure/Structure.java index 1a766e68713d4014783b3224b9395644116784fa..978054ee364f9a3330525b9b50da5325ebb6ef57 100644 --- a/src/main/java/org/bukkit/generator/structure/Structure.java diff --git a/patches/api/0443-Add-Lifecycle-Event-system.patch b/patches/api/0443-Add-Lifecycle-Event-system.patch index 1cf5d6a813..65cbf1e41c 100644 --- a/patches/api/0443-Add-Lifecycle-Event-system.patch +++ b/patches/api/0443-Add-Lifecycle-Event-system.patch @@ -8,7 +8,7 @@ meant for managing resources across reloads and from points in the PluginBootstrap. diff --git a/src/main/java/io/papermc/paper/plugin/bootstrap/BootstrapContext.java b/src/main/java/io/papermc/paper/plugin/bootstrap/BootstrapContext.java -index 08f2050356acaf74e3210416760e3873c2dafd2c..37dfdcfcbd14947e0550e7528aca68f452e53eb6 100644 +index 70d5f9802f90605a5120ff2a000a2e9395f0aecc..c319f3bbfabdd39ee571c59d7bfc144c58232abc 100644 --- a/src/main/java/io/papermc/paper/plugin/bootstrap/BootstrapContext.java +++ b/src/main/java/io/papermc/paper/plugin/bootstrap/BootstrapContext.java @@ -1,6 +1,9 @@ diff --git a/patches/api/0469-Fix-issues-with-recipe-API.patch b/patches/api/0469-Fix-issues-with-recipe-API.patch index 2635c201c9..1718a050de 100644 --- a/patches/api/0469-Fix-issues-with-recipe-API.patch +++ b/patches/api/0469-Fix-issues-with-recipe-API.patch @@ -40,18 +40,18 @@ index f7fa79393aef40027446b78bac8e9490cfafd8bc..07906ca1a9b39fcc6774870daa498402 } diff --git a/src/main/java/org/bukkit/inventory/CraftingRecipe.java b/src/main/java/org/bukkit/inventory/CraftingRecipe.java -index e4bf772f7e06f38215bee68f089b15a4fcb12817..37024b4736dd3897490ca51d08cf07901b01d59f 100644 +index 1b7b07715067014bf3d35002ae1655793248b426..9575e40c7ef3e1d86d10d83b33d9e68f0ed7406f 100644 --- a/src/main/java/org/bukkit/inventory/CraftingRecipe.java +++ b/src/main/java/org/bukkit/inventory/CraftingRecipe.java -@@ -18,7 +18,7 @@ public abstract class CraftingRecipe implements Recipe, Keyed { - - protected CraftingRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result) { - Preconditions.checkArgument(key != null, "key cannot be null"); +@@ -99,7 +99,7 @@ public abstract class CraftingRecipe implements Recipe, Keyed { + @ApiStatus.Internal + @NotNull + protected static ItemStack checkResult(@NotNull ItemStack result) { - Preconditions.checkArgument(result.getType() != Material.AIR, "Recipe must have non-AIR result."); -+ Preconditions.checkArgument(!result.isEmpty(), "Recipe cannot have an empty result."); // Paper - this.key = key; - this.output = new ItemStack(result); ++ Preconditions.checkArgument(result.isEmpty(), "Recipe cannot have an empty result"); // Paper + return result; } + } diff --git a/src/main/java/org/bukkit/inventory/EmptyRecipeChoice.java b/src/main/java/org/bukkit/inventory/EmptyRecipeChoice.java new file mode 100644 index 0000000000000000000000000000000000000000..ed0ab6163f47ec843ba4f7ea4a98bb2fa315eaa1 @@ -211,10 +211,10 @@ index 91bfeffcdbe47208c7d0ddbe013cd0f11fddfa32..e7796054f3f65f5bea7f93c75320195f } } diff --git a/src/main/java/org/bukkit/inventory/ShapedRecipe.java b/src/main/java/org/bukkit/inventory/ShapedRecipe.java -index aa3b3070126f1c492f004ec7599eeb379b58f207..1815de38654dd134abde3dd9bd0b018b91247bd5 100644 +index 295d82dd73b600e9436d2bbec0e11dbeaf78bbf4..c0105d716985acef497d60b5c631a56b4ca5847b 100644 --- a/src/main/java/org/bukkit/inventory/ShapedRecipe.java +++ b/src/main/java/org/bukkit/inventory/ShapedRecipe.java -@@ -177,14 +177,15 @@ public class ShapedRecipe extends CraftingRecipe { +@@ -178,14 +178,15 @@ public class ShapedRecipe extends CraftingRecipe { Preconditions.checkArgument(key != ' ', "Space in recipe shape must represent no ingredient"); Preconditions.checkArgument(ingredients.containsKey(key), "Symbol does not appear in the shape:", key); @@ -233,10 +233,10 @@ index aa3b3070126f1c492f004ec7599eeb379b58f207..1815de38654dd134abde3dd9bd0b018b // Paper end diff --git a/src/main/java/org/bukkit/inventory/ShapelessRecipe.java b/src/main/java/org/bukkit/inventory/ShapelessRecipe.java -index beb798482479c58a8628c314b510ab6349576ce8..8251170314ab25c26270208e453b4e3909435754 100644 +index 3bf5064cd6ceb05ea98b18993da46c67be140115..79db6dbc0367de2eaa397674624c765d5aeb8fa5 100644 --- a/src/main/java/org/bukkit/inventory/ShapelessRecipe.java +++ b/src/main/java/org/bukkit/inventory/ShapelessRecipe.java -@@ -131,7 +131,7 @@ public class ShapelessRecipe extends CraftingRecipe { +@@ -132,7 +132,7 @@ public class ShapelessRecipe extends CraftingRecipe { public ShapelessRecipe addIngredient(@NotNull RecipeChoice ingredient) { Preconditions.checkArgument(ingredients.size() + 1 <= 9, "Shapeless recipes cannot have more than 9 ingredients"); @@ -245,7 +245,7 @@ index beb798482479c58a8628c314b510ab6349576ce8..8251170314ab25c26270208e453b4e39 return this; } -@@ -144,6 +144,8 @@ public class ShapelessRecipe extends CraftingRecipe { +@@ -145,6 +145,8 @@ public class ShapelessRecipe extends CraftingRecipe { @NotNull public ShapelessRecipe addIngredient(int count, @NotNull ItemStack item) { Preconditions.checkArgument(ingredients.size() + count <= 9, "Shapeless recipes cannot have more than 9 ingredients"); diff --git a/patches/api/0470-Fix-equipment-slot-and-group-API.patch b/patches/api/0470-Fix-equipment-slot-and-group-API.patch index 0601373657..d8e0a08ce1 100644 --- a/patches/api/0470-Fix-equipment-slot-and-group-API.patch +++ b/patches/api/0470-Fix-equipment-slot-and-group-API.patch @@ -10,7 +10,7 @@ Adds the following: Co-authored-by: SoSeDiK <[email protected]> diff --git a/src/main/java/org/bukkit/attribute/AttributeModifier.java b/src/main/java/org/bukkit/attribute/AttributeModifier.java -index 3808f76d49e24c20156c013f68e00efa9351f1a3..e14b64d3b178791dacc7849e97f2ed95f1919c55 100644 +index c57690798108e9f91f8c552f39dcc2b080fe1b61..bfa378fe3d074bafbc0af2c4d858e2a34d3126bd 100644 --- a/src/main/java/org/bukkit/attribute/AttributeModifier.java +++ b/src/main/java/org/bukkit/attribute/AttributeModifier.java @@ -118,6 +118,7 @@ public class AttributeModifier implements ConfigurationSerializable, Keyed { diff --git a/patches/api/0475-Registry-Modification-API.patch b/patches/api/0475-Registry-Modification-API.patch index b364107ae4..5c2b4b90a8 100644 --- a/patches/api/0475-Registry-Modification-API.patch +++ b/patches/api/0475-Registry-Modification-API.patch @@ -790,7 +790,7 @@ index 0000000000000000000000000000000000000000..11d19e339c7c62f2eb4467277552c27e +record TagKeyImpl<T>(RegistryKey<T> registryKey, Key key) implements TagKey<T> { +} diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java -index fcc9664fd1fe081c9c70bcd7e511c60d987b44f9..8e306d05e372855929d30456ed2d27a04d55ac42 100644 +index 7296bd71a5e3d4f977701d6fa1cdd3def63fcd54..a9fc57327d40779f1657567b265529ab5c8ed9c3 100644 --- a/src/main/java/org/bukkit/Registry.java +++ b/src/main/java/org/bukkit/Registry.java @@ -356,6 +356,27 @@ public interface Registry<T extends Keyed> extends Iterable<T> { diff --git a/patches/api/0476-Introduce-registry-entry-and-builders.patch b/patches/api/0476-Introduce-registry-entry-and-builders.patch index e97c9cef4e..02fe71f495 100644 --- a/patches/api/0476-Introduce-registry-entry-and-builders.patch +++ b/patches/api/0476-Introduce-registry-entry-and-builders.patch @@ -480,7 +480,7 @@ index 6c9689baca1763e2ef79495d38618d587e792434..4583092c2d1ffe95be2831c5d5f0e904 + // Paper end } diff --git a/src/main/java/org/bukkit/inventory/ItemType.java b/src/main/java/org/bukkit/inventory/ItemType.java -index 94587a97fcea81a43b160b01d2c81cef2b7f4413..6bc1853ada3ea38bc36cb31fbb5ce246347fe5d4 100644 +index a6d1dde422de98f178c0c9add99e01203a35e5cb..885a37af013b7934768fb4a742b0a69e0b6f034c 100644 --- a/src/main/java/org/bukkit/inventory/ItemType.java +++ b/src/main/java/org/bukkit/inventory/ItemType.java @@ -46,7 +46,7 @@ import org.jetbrains.annotations.Nullable; diff --git a/patches/api/0481-Move-CraftComplexRecipe-to-extend-CraftingRecipe.patch b/patches/api/0481-Move-CraftComplexRecipe-to-extend-CraftingRecipe.patch index 7bf99722cc..02a7c4f9ff 100644 --- a/patches/api/0481-Move-CraftComplexRecipe-to-extend-CraftingRecipe.patch +++ b/patches/api/0481-Move-CraftComplexRecipe-to-extend-CraftingRecipe.patch @@ -8,10 +8,10 @@ CraftingRecipe. As such, this complex recipe should also be a crafting recipe. diff --git a/src/main/java/org/bukkit/inventory/CraftingRecipe.java b/src/main/java/org/bukkit/inventory/CraftingRecipe.java -index 37024b4736dd3897490ca51d08cf07901b01d59f..afa3de9ab78d01c448d450d8afbc7b1e7e62754c 100644 +index 9575e40c7ef3e1d86d10d83b33d9e68f0ed7406f..e8c3afda92d4ae5430d622ea18500985d6cc00f2 100644 --- a/src/main/java/org/bukkit/inventory/CraftingRecipe.java +++ b/src/main/java/org/bukkit/inventory/CraftingRecipe.java -@@ -11,8 +11,11 @@ import org.jetbrains.annotations.NotNull; +@@ -12,8 +12,11 @@ import org.jetbrains.annotations.NotNull; * Represents a shaped or shapeless crafting recipe. */ public abstract class CraftingRecipe implements Recipe, Keyed { diff --git a/patches/api/0482-Add-CrafterCraftEvent.patch b/patches/api/0482-Add-CrafterCraftEvent.patch deleted file mode 100644 index c91ab8393d..0000000000 --- a/patches/api/0482-Add-CrafterCraftEvent.patch +++ /dev/null @@ -1,97 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: ploppyperson <[email protected]> -Date: Thu, 18 Jul 2024 16:37:58 +0200 -Subject: [PATCH] Add CrafterCraftEvent - -Ports the currently proposed CrafterCraftEvent -from upstream. -The type is experimental to account for spigot -potentially changing some api contracts, however -the event is required for a stable release and -waiting on spigot's PR queue is not an option. - -See: https://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/pull-requests/1044/overview - -diff --git a/src/main/java/org/bukkit/event/block/CrafterCraftEvent.java b/src/main/java/org/bukkit/event/block/CrafterCraftEvent.java -new file mode 100644 -index 0000000000000000000000000000000000000000..8dec6d16aa3c3579eadd77f637c9afa54ee9a90f ---- /dev/null -+++ b/src/main/java/org/bukkit/event/block/CrafterCraftEvent.java -@@ -0,0 +1,77 @@ -+package org.bukkit.event.block; -+ -+import org.bukkit.block.Block; -+import org.bukkit.event.Cancellable; -+import org.bukkit.event.HandlerList; -+import org.bukkit.inventory.CraftingRecipe; -+import org.bukkit.inventory.ItemStack; -+import org.jetbrains.annotations.NotNull; -+ -+/** -+ * Event called when a Crafter is about to craft an item -+ * @apiNote Currently still experimental as it is ported from an open, not merged, spigot PR. -+ * The event was pulled to allow protection plugins and the likes to properly manage crafters. -+ * The type remains experimental as upstream *may* change the event before pulling it, resulting in a breaking change. -+ */ -+public class CrafterCraftEvent extends BlockEvent implements Cancellable { -+ -+ private static final HandlerList handlers = new HandlerList(); -+ private boolean cancelled; -+ private ItemStack result; -+ private final CraftingRecipe recipe; -+ -+ @org.jetbrains.annotations.ApiStatus.Internal // Paper - internal constructor. -+ public CrafterCraftEvent(@NotNull Block theBlock, @NotNull CraftingRecipe recipe, @NotNull ItemStack result) { -+ super(theBlock); -+ this.result = result; -+ this.recipe = recipe; -+ } -+ -+ /** -+ * Gets the result for the craft -+ * @return the result for the craft -+ */ -+ @NotNull -+ public ItemStack getResult() { -+ return result.clone(); -+ } -+ -+ /** -+ * Sets the result of the craft -+ * @param result the result of the craft -+ */ -+ public void setResult(@NotNull ItemStack result) { -+ this.result = result.clone(); -+ } -+ -+ /** -+ * The recipe that was used to craft this item -+ * @return the recipe that was used to craft this item -+ */ -+ @NotNull -+ public CraftingRecipe getRecipe() { -+ return recipe; -+ } -+ -+ @NotNull -+ @Override -+ public HandlerList getHandlers() { -+ return handlers; -+ } -+ -+ @Override -+ public boolean isCancelled() { -+ return cancelled; -+ } -+ -+ @Override -+ public void setCancelled(boolean cancel) { -+ this.cancelled = cancel; -+ } -+ -+ @NotNull -+ public static HandlerList getHandlerList() { -+ return handlers; -+ } -+} diff --git a/patches/api/0483-Fix-PickupStatus-getting-reset.patch b/patches/api/0482-Fix-PickupStatus-getting-reset.patch index 6473947708..6473947708 100644 --- a/patches/api/0483-Fix-PickupStatus-getting-reset.patch +++ b/patches/api/0482-Fix-PickupStatus-getting-reset.patch diff --git a/patches/server/0001-Setup-Gradle-project.patch b/patches/server/0001-Setup-Gradle-project.patch index 8cdbf973d7..d8dace80ea 100644 --- a/patches/server/0001-Setup-Gradle-project.patch +++ b/patches/server/0001-Setup-Gradle-project.patch @@ -160,7 +160,7 @@ index 0000000000000000000000000000000000000000..9ea079d14a92367629dc8fb30d1be043 +} diff --git a/pom.xml b/pom.xml deleted file mode 100644 -index e6f88c20b3a3ba28b917bea9a671b2709d32b3cd..0000000000000000000000000000000000000000 +index 5abcca1894a0d7795d394834f56c189c0bbeb82f..0000000000000000000000000000000000000000 --- a/pom.xml +++ /dev/null @@ -1,604 +0,0 @@ @@ -170,7 +170,7 @@ index e6f88c20b3a3ba28b917bea9a671b2709d32b3cd..00000000000000000000000000000000 - <groupId>org.spigotmc</groupId> - <artifactId>spigot</artifactId> - <packaging>jar</packaging> -- <version>1.21-R0.1-SNAPSHOT</version> +- <version>1.21.1-R0.1-SNAPSHOT</version> - <name>Spigot</name> - <url>https://www.spigotmc.org/</url> - diff --git a/patches/server/0003-Build-system-changes.patch b/patches/server/0003-Build-system-changes.patch index 505d9bbbb0..3e04e97c06 100644 --- a/patches/server/0003-Build-system-changes.patch +++ b/patches/server/0003-Build-system-changes.patch @@ -131,10 +131,10 @@ index feca36209fd2405fab70f564f63e627b8b78ac18..396ec10a76bdadbf5be2f0e15e88eed4 public static PackRepository createPackRepository(Path dataPacksPath, DirectoryValidator symlinkFinder) { diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index 82b8485a4781105bce874485119110576d1e2d63..a07e26caf48acf9ef193a74497a201166bfbe098 100644 +index 9bae4835882a7c1b5a623d57330c36cc61b9b6d1..273a6658deacbf00f6cc498cf3fcd20d144bd9e4 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java -@@ -210,7 +210,7 @@ public class Main { +@@ -199,7 +199,7 @@ public class Main { } if (Main.class.getPackage().getImplementationVendor() != null && System.getProperty("IReallyKnowWhatIAmDoingISwear") == null) { diff --git a/patches/server/0005-Paper-config-files.patch b/patches/server/0005-Paper-config-files.patch index 8fa709f084..43dda1421c 100644 --- a/patches/server/0005-Paper-config-files.patch +++ b/patches/server/0005-Paper-config-files.patch @@ -5053,7 +5053,7 @@ index e433037a03ffafabb952887ae3980e1d51411d4c..c061813d275fbc48d7629cc59d90dbb4 this.world = new CraftWorld((ServerLevel) this, gen, biomeProvider, env); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index e8fac2863c5feb875cf0c78f062b4b87acbcb49b..751900e0c2a946ba4291174c81b2bdbdbe994e94 100644 +index 3c0691ef65c8db1002b76984f4ddfe2072d793c9..b3c4cdd9cfff6857f3007fbd91a280bcc53ab072 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -962,6 +962,7 @@ public final class CraftServer implements Server { @@ -5065,7 +5065,7 @@ index e8fac2863c5feb875cf0c78f062b4b87acbcb49b..751900e0c2a946ba4291174c81b2bdbd world.serverLevelData.setDifficulty(config.difficulty); world.setSpawnSettings(config.spawnMonsters, config.spawnAnimals); diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index a07e26caf48acf9ef193a74497a201166bfbe098..dbcde37cfdeb6141c3f5c4f8b95d60fca91c7977 100644 +index 273a6658deacbf00f6cc498cf3fcd20d144bd9e4..cf06abf508fab734f5945e1d292c01512a50749e 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -142,6 +142,19 @@ public class Main { diff --git a/patches/server/0008-CB-fixes.patch b/patches/server/0008-CB-fixes.patch index 000d9843e7..0c11a7f526 100644 --- a/patches/server/0008-CB-fixes.patch +++ b/patches/server/0008-CB-fixes.patch @@ -83,7 +83,7 @@ index 85c7f3027978b1d7d6c31b7ad21b3377cdda5925..e34deaf398dc6722c3128bdd6b9bc16d + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 751900e0c2a946ba4291174c81b2bdbdbe994e94..f04c0f8b3905b488aac221fedde335a54ad1ff58 100644 +index b3c4cdd9cfff6857f3007fbd91a280bcc53ab072..a094eb1348509fea0c3d253cddfe409998dcbf23 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -2522,7 +2522,13 @@ public final class CraftServer implements Server { @@ -102,7 +102,7 @@ index 751900e0c2a946ba4291174c81b2bdbdbe994e94..f04c0f8b3905b488aac221fedde335a5 @Override diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index dbcde37cfdeb6141c3f5c4f8b95d60fca91c7977..2122d7316f55ab5bec7058fe1b8ee3ceb42deea7 100644 +index cf06abf508fab734f5945e1d292c01512a50749e..42a1a0588e2b506082499ac9791d039089a64631 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -123,6 +123,7 @@ public class Main { @@ -134,7 +134,7 @@ index 905adf97c0d1f0d1c774a6835a5dffcfea884e58..c017ce2ca1bc535795c958a2e509af2a public class CraftScheduler implements BukkitScheduler { diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index cfb4cf66aa5f32a96a15886c6cf4a3946bd232ec..aa6a9dcd5528df38dddc0c661334c35658a19cee 100644 +index b0cc506f1b3eb53e8e2299787071de707a036df0..eeffc4be4ae7168c9f69edbbff6642fd4c214b3d 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java @@ -240,7 +240,7 @@ public final class CraftMagicNumbers implements UnsafeValues { diff --git a/patches/server/0009-MC-Utils.patch b/patches/server/0009-MC-Utils.patch index 1cda21bd7d..1fc2a2627a 100644 --- a/patches/server/0009-MC-Utils.patch +++ b/patches/server/0009-MC-Utils.patch @@ -5064,7 +5064,7 @@ index 12db4c5db3d7951df984db03d09d14d808e58699..44d4aee059d74676bffb8b6bc6f6ad4d @Override public float getBukkitYaw() { diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index 15f0b0977fe7b41e29346df9d49120f14f02ea43..b6cb1de08e955dfc99a0cb736b2ed456c99fde5c 100644 +index d7a3f704cce228c50d26f1ecd98e819eca561bfc..3457e1c9791b294b5e4dab478d90cdd1a1cf7fef 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java @@ -953,6 +953,25 @@ public final class ItemStack implements DataComponentHolder { @@ -5351,10 +5351,10 @@ index 497792978bdf0e6a53d772304770e8df3e7416ea..c5454b92ca2565461c799d7340160f9f public WorldBorder getWorldBorder() { return this.level.getWorldBorder(); diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java -index 9569d9d1c8f809420e08038e5bc38c2c7887ff90..d5d638d955dbcc1034bc79aace77d43e20db5995 100644 +index e0594a1c381487b43bfc55212044e1b3122cee66..59fcaca90b67c03e1a6799e58061dbae3b1f1ceb 100644 --- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java +++ b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java -@@ -834,12 +834,14 @@ public abstract class BlockBehaviour implements FeatureElement { +@@ -841,12 +841,14 @@ public abstract class BlockBehaviour implements FeatureElement { } } @@ -5369,7 +5369,7 @@ index 9569d9d1c8f809420e08038e5bc38c2c7887ff90..d5d638d955dbcc1034bc79aace77d43e this.legacySolid = this.calculateSolid(); } -@@ -886,8 +888,8 @@ public abstract class BlockBehaviour implements FeatureElement { +@@ -893,8 +895,8 @@ public abstract class BlockBehaviour implements FeatureElement { return this.getBlock().getOcclusionShape(this.asState(), world, pos); } @@ -5421,7 +5421,7 @@ index a52077f0d93c94b0ea644bc14b9b28e84fd1b154..dcc0acd259920463a4464213b9a5e793 @Nullable @Override diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -index b537e7a079497db428db405edfccde74f32f4208..c664021dbfffcf0db3247041270ce9a1ee6940de 100644 +index 5b73fcfe278f57de249f3a96da58dc08eda7aff6..25380a44e5cc94f3924cfee6a03c3091fea04ae2 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java @@ -116,6 +116,10 @@ public class LevelChunk extends ChunkAccess { @@ -5480,7 +5480,7 @@ index b537e7a079497db428db405edfccde74f32f4208..c664021dbfffcf0db3247041270ce9a1 @Override public FluidState getFluidState(BlockPos pos) { return this.getFluidState(pos.getX(), pos.getY(), pos.getZ()); -@@ -549,7 +582,11 @@ public class LevelChunk extends ChunkAccess { +@@ -554,7 +587,11 @@ public class LevelChunk extends ChunkAccess { // CraftBukkit start public void loadCallback() { @@ -5492,7 +5492,7 @@ index b537e7a079497db428db405edfccde74f32f4208..c664021dbfffcf0db3247041270ce9a1 if (server != null) { /* * If it's a new world, the first few chunks are generated inside -@@ -590,6 +627,10 @@ public class LevelChunk extends ChunkAccess { +@@ -595,6 +632,10 @@ public class LevelChunk extends ChunkAccess { server.getPluginManager().callEvent(unloadEvent); // note: saving can be prevented, but not forced if no saving is actually required this.mustNotSave = !unloadEvent.isSaveChunk(); @@ -5563,7 +5563,7 @@ index 34933c5324126f9afdc5cba9dea997ace8f01806..1cfc906317f07a44f06a4adf021c44e3 return false; } else { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index f04c0f8b3905b488aac221fedde335a54ad1ff58..7f8864da8a6f9c2410191851add1ba566b8c171c 100644 +index a094eb1348509fea0c3d253cddfe409998dcbf23..2ea3ad9ab43dec0555d6716bebefbc3bb6553f1a 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -2601,4 +2601,9 @@ public final class CraftServer implements Server { diff --git a/patches/server/0010-Adventure.patch b/patches/server/0010-Adventure.patch index 1b2fc84f62..79f042ca14 100644 --- a/patches/server/0010-Adventure.patch +++ b/patches/server/0010-Adventure.patch @@ -2191,10 +2191,10 @@ index f30cdfa5fd294479e35680b2f758b3295f659b74..ec34e402104d7a696ea95e0b11ee7018 public CommandSourceStack(CommandSource output, Vec3 pos, Vec2 rot, ServerLevel world, int level, String name, Component displayName, MinecraftServer server, @Nullable Entity entity) { this(output, pos, rot, world, level, name, displayName, server, entity, false, CommandResultCallback.EMPTY, EntityAnchorArgument.Anchor.FEET, CommandSigningContext.ANONYMOUS, TaskChainer.immediate(server)); diff --git a/src/main/java/net/minecraft/commands/arguments/MessageArgument.java b/src/main/java/net/minecraft/commands/arguments/MessageArgument.java -index 0047fd758ad43cc7b13355b60c410a9bcc37bec0..982b2bab27e3d55d0ba07060862c0c3183ad91b0 100644 +index 8381042c0dc0cf5ab574904bb1de923461684aca..1e0eb806b729f8de23e1c3a6e068d63c68dbe2a1 100644 --- a/src/main/java/net/minecraft/commands/arguments/MessageArgument.java +++ b/src/main/java/net/minecraft/commands/arguments/MessageArgument.java -@@ -53,17 +53,21 @@ public class MessageArgument implements SignedArgument<MessageArgument.Message> +@@ -54,17 +54,21 @@ public class MessageArgument implements SignedArgument<MessageArgument.Message> private static void resolveSignedMessage(Consumer<PlayerChatMessage> callback, CommandSourceStack source, PlayerChatMessage message) { MinecraftServer minecraftServer = source.getServer(); CompletableFuture<FilteredText> completableFuture = filterPlainText(source, message); @@ -3242,7 +3242,7 @@ index ed54c81a3269360acce674aa4e1d54ccb2461841..c9c849534c3998cfcab7ddcb12a71ccb } diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index b6cb1de08e955dfc99a0cb736b2ed456c99fde5c..abf502b8395bb0a8a32c1fdcd62532790deb1c6e 100644 +index 3457e1c9791b294b5e4dab478d90cdd1a1cf7fef..1138d238caa18171b6562cc748c92cec03bfbb97 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java @@ -183,7 +183,15 @@ public final class ItemStack implements DataComponentHolder { @@ -3327,7 +3327,7 @@ index 49c037e961c5ca5ba8d6a870cb32ffe8719adc91..2772c19f58a35713d61aab24f6f0d6f5 } } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 7f8864da8a6f9c2410191851add1ba566b8c171c..bec1fdabbc3727c1f7297b2d23914a5179f4adcb 100644 +index 2ea3ad9ab43dec0555d6716bebefbc3bb6553f1a..be068650a568fc1d0d3b9c5acd040adafb2344e1 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -644,8 +644,10 @@ public final class CraftServer implements Server { @@ -3628,7 +3628,7 @@ index 69c62699e3412f2730e3db65f196099d77698980..4878a1b085a83dd4a8ffdc86250b8fb4 // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index 2122d7316f55ab5bec7058fe1b8ee3ceb42deea7..43790f555743e9945c1b82cf8f2f4719feedc165 100644 +index 42a1a0588e2b506082499ac9791d039089a64631..9c1fab8db74757e1fb57d4f47099ba6e1536cd6d 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -20,6 +20,12 @@ public class Main { @@ -4677,10 +4677,10 @@ index 5725b0281ac53a2354b233223259d6784353bc6e..9ef939b76d06874b856e0c850addb364 @Override public int getLineWidth() { diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 39aad2d00227d94aa1d24c27a10d916b7d64888d..63e20db8ad84b332a4962d5cea83f1064b7c1a3d 100644 +index 938a7ee49a727d5929d1d049c61d2881cf24ff9c..78f4bb474c85e32448a385e108707d92082bfe02 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -911,7 +911,7 @@ public class CraftEventFactory { +@@ -915,7 +915,7 @@ public class CraftEventFactory { return event; } @@ -4689,7 +4689,7 @@ index 39aad2d00227d94aa1d24c27a10d916b7d64888d..63e20db8ad84b332a4962d5cea83f106 CraftPlayer entity = victim.getBukkitEntity(); CraftDamageSource bukkitDamageSource = new CraftDamageSource(damageSource); PlayerDeathEvent event = new PlayerDeathEvent(entity, bukkitDamageSource, drops, victim.getExpReward(damageSource.getEntity()), 0, deathMessage); -@@ -944,7 +944,7 @@ public class CraftEventFactory { +@@ -948,7 +948,7 @@ public class CraftEventFactory { * Server methods */ public static ServerListPingEvent callServerListPingEvent(SocketAddress address, String motd, int numPlayers, int maxPlayers) { @@ -4803,10 +4803,10 @@ index c9cc23757a9fcc58d30b2915d4c5cfbc7d1c767a..fc0e1212022d1aa3506699b60ef33819 return this.title; } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryView.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryView.java -index 6871fbde3498f18274029638e0cd27d1a78bb1d7..5888a44d7f1f06e6308b068e57c295de366061cd 100644 +index 07d406de7123593dc470af2723f2a9a2dc2157b0..01fbd8a55866af3e371c8a2eef23ef6e9ca3226d 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryView.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryView.java -@@ -73,6 +73,13 @@ public class CraftInventoryView extends CraftAbstractInventoryView { +@@ -73,6 +73,13 @@ public class CraftInventoryView<T extends AbstractContainerMenu> extends CraftAb return CraftItemStack.asCraftMirror(this.container.getSlot(slot).getItem()); } @@ -5165,10 +5165,10 @@ index c71a4971f127fdfc753306019313ce1a31201120..fd3b12477c30d1eabdbe57ea77902793 + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index e56e6d07f297491c8f92598b8105bfebead7a0a1..86a5e4f7b2a0d50d0a58d88e10a277cfbd09bf9d 100644 +index 1c5d63fb6a9ed5cc40d735793cf5889e189feadf..568d6fab743039b20715d8181555f52baa05f0f3 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -@@ -952,6 +952,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -959,6 +959,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { return !(this.hasDisplayName() || this.hasItemName() || this.hasLocalizedName() || this.hasEnchants() || (this.lore != null) || this.hasCustomModelData() || this.hasBlockData() || this.hasRepairCost() || !this.unhandledTags.build().isEmpty() || !this.removedTags.isEmpty() || !this.persistentDataContainer.isEmpty() || this.hideFlag != 0 || this.isHideTooltip() || this.isUnbreakable() || this.hasEnchantmentGlintOverride() || this.isFireResistant() || this.hasMaxStackSize() || this.hasRarity() || this.hasFood() || this.hasTool() || this.hasDamage() || this.hasMaxDamage() || this.hasAttributeModifiers() || this.customTag != null); } @@ -5187,7 +5187,7 @@ index e56e6d07f297491c8f92598b8105bfebead7a0a1..86a5e4f7b2a0d50d0a58d88e10a277cf @Override public String getDisplayName() { return CraftChatMessage.fromComponent(this.displayName); -@@ -982,6 +994,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -989,6 +1001,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { return this.itemName != null; } @@ -5206,7 +5206,7 @@ index e56e6d07f297491c8f92598b8105bfebead7a0a1..86a5e4f7b2a0d50d0a58d88e10a277cf @Override public String getLocalizedName() { return this.getDisplayName(); -@@ -1001,6 +1025,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1008,6 +1032,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { return this.lore != null && !this.lore.isEmpty(); } @@ -5589,7 +5589,7 @@ index ff040613083c015d9c52c0995591b64305fd5018..1b552b3f05ac7fc44450de4b1ec78907 boolean hadFormat = false; diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index aa6a9dcd5528df38dddc0c661334c35658a19cee..5a89b9ca6a62f0bfb5fe01ed4097870788cf5d83 100644 +index eeffc4be4ae7168c9f69edbbff6642fd4c214b3d..b64be3f292d88fa60746a3fe542740ef8ad2b41c 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java @@ -77,6 +77,43 @@ public final class CraftMagicNumbers implements UnsafeValues { diff --git a/patches/server/0011-Use-TerminalConsoleAppender-for-console-improvements.patch b/patches/server/0011-Use-TerminalConsoleAppender-for-console-improvements.patch index 05265dfcf1..7494116ea3 100644 --- a/patches/server/0011-Use-TerminalConsoleAppender-for-console-improvements.patch +++ b/patches/server/0011-Use-TerminalConsoleAppender-for-console-improvements.patch @@ -396,7 +396,7 @@ index e9109526880159e2341cc97b53939ba2bcfaeaf9..9dcfcea63f57f45a5584bb80c34fe445 this.bans = new UserBanList(PlayerList.USERBANLIST_FILE); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index bec1fdabbc3727c1f7297b2d23914a5179f4adcb..17df1085e29429b202a6f9003343b15b15e2f8f7 100644 +index be068650a568fc1d0d3b9c5acd040adafb2344e1..acb58c6262b91735324dc0bfcb5f63c5685f46d8 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -43,7 +43,7 @@ import java.util.logging.Level; @@ -423,7 +423,7 @@ index bec1fdabbc3727c1f7297b2d23914a5179f4adcb..17df1085e29429b202a6f9003343b15b @Override public PluginCommand getPluginCommand(String name) { diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index 43790f555743e9945c1b82cf8f2f4719feedc165..26dfb02286e836cad0242c71f743265d55d9d032 100644 +index 9c1fab8db74757e1fb57d4f47099ba6e1536cd6d..3eecea2e6df217ccf2c432d02022c53443a37014 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -13,7 +13,6 @@ import java.util.logging.Logger; @@ -434,7 +434,7 @@ index 43790f555743e9945c1b82cf8f2f4719feedc165..26dfb02286e836cad0242c71f743265d public class Main { public static boolean useJline = true; -@@ -207,6 +206,8 @@ public class Main { +@@ -196,6 +195,8 @@ public class Main { } try { @@ -443,7 +443,7 @@ index 43790f555743e9945c1b82cf8f2f4719feedc165..26dfb02286e836cad0242c71f743265d // This trick bypasses Maven Shade's clever rewriting of our getProperty call when using String literals String jline_UnsupportedTerminal = new String(new char[]{'j', 'l', 'i', 'n', 'e', '.', 'U', 'n', 's', 'u', 'p', 'p', 'o', 'r', 't', 'e', 'd', 'T', 'e', 'r', 'm', 'i', 'n', 'a', 'l'}); String jline_terminal = new String(new char[]{'j', 'l', 'i', 'n', 'e', '.', 't', 'e', 'r', 'm', 'i', 'n', 'a', 'l'}); -@@ -224,9 +225,18 @@ public class Main { +@@ -213,9 +214,18 @@ public class Main { // This ensures the terminal literal will always match the jline implementation System.setProperty(jline.TerminalFactory.JLINE_TERMINAL, jline.UnsupportedTerminal.class.getName()); } @@ -462,7 +462,7 @@ index 43790f555743e9945c1b82cf8f2f4719feedc165..26dfb02286e836cad0242c71f743265d } if (Main.class.getPackage().getImplementationVendor() != null && System.getProperty("IReallyKnowWhatIAmDoingISwear") == null) { -@@ -242,6 +252,7 @@ public class Main { +@@ -231,6 +241,7 @@ public class Main { } } diff --git a/patches/server/0017-Paper-command.patch b/patches/server/0017-Paper-command.patch index c38bec538a..ccbe1c0f84 100644 --- a/patches/server/0017-Paper-command.patch +++ b/patches/server/0017-Paper-command.patch @@ -617,7 +617,7 @@ index bb59986c211f7d6ea50b1ad4bd5565227bec8a6c..9c950fc1de15b5039e34a9fdf893e97a this.setPvpAllowed(dedicatedserverproperties.pvp); this.setFlightAllowed(dedicatedserverproperties.allowFlight); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 17df1085e29429b202a6f9003343b15b15e2f8f7..29f94e574e39714caec95af5c176c9dba481728e 100644 +index acb58c6262b91735324dc0bfcb5f63c5685f46d8..73844f5da55b8b837718bddbe85f639a0a1b1c0e 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -986,6 +986,7 @@ public final class CraftServer implements Server { diff --git a/patches/server/0018-Paper-Metrics.patch b/patches/server/0018-Paper-Metrics.patch index 46c111b03f..a5e5dbf631 100644 --- a/patches/server/0018-Paper-Metrics.patch +++ b/patches/server/0018-Paper-Metrics.patch @@ -710,7 +710,7 @@ index 9c950fc1de15b5039e34a9fdf893e97a8cc13237..6ba90739c20995362a5275e2259cac9e this.setPvpAllowed(dedicatedserverproperties.pvp); this.setFlightAllowed(dedicatedserverproperties.allowFlight); diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index b717c9d8b6edc2cafc9281140913b7bdb6108cf0..ba621fdc82896245f6ce448e084847edc4d3fe08 100644 +index 744edd40128c910c3ad2f3657bde995612e0a1e4..d9e73e37b54e2f6e13313977c76cb4212c240992 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java @@ -83,6 +83,7 @@ public class SpigotConfig diff --git a/patches/server/0019-Paper-Plugins.patch b/patches/server/0019-Paper-Plugins.patch index 11ab0c0b9a..57791695ac 100644 --- a/patches/server/0019-Paper-Plugins.patch +++ b/patches/server/0019-Paper-Plugins.patch @@ -7257,7 +7257,7 @@ index 5b4ac7b4fd0077e900e9f788963f1613bbc9a5d0..6afede80c10503a261d0f735c351d943 Bootstrap.validate(); Util.startTimerHackThread(); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 29f94e574e39714caec95af5c176c9dba481728e..b532c72ec2c048554e496b4b63afa0e9f9932416 100644 +index 73844f5da55b8b837718bddbe85f639a0a1b1c0e..03d908d0a43adddae9ace97da484c933f86196e7 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -277,7 +277,8 @@ public final class CraftServer implements Server { @@ -7329,7 +7329,7 @@ index 29f94e574e39714caec95af5c176c9dba481728e..b532c72ec2c048554e496b4b63afa0e9 this.enablePlugins(PluginLoadOrder.STARTUP); this.enablePlugins(PluginLoadOrder.POSTWORLD); diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 5a89b9ca6a62f0bfb5fe01ed4097870788cf5d83..a6de88625aeb2c5ababd476e804e9b45b1185efe 100644 +index b64be3f292d88fa60746a3fe542740ef8ad2b41c..57342ba582fae0259a214e75b651a83be5cc269f 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java @@ -395,6 +395,16 @@ public final class CraftMagicNumbers implements UnsafeValues { diff --git a/patches/server/0020-Plugin-remapping.patch b/patches/server/0020-Plugin-remapping.patch index cebc8c0281..e99e4a51e9 100644 --- a/patches/server/0020-Plugin-remapping.patch +++ b/patches/server/0020-Plugin-remapping.patch @@ -1904,7 +1904,7 @@ index 0000000000000000000000000000000000000000..73b20a92f330311e3fef8f03b51a0985 + } +} diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index b532c72ec2c048554e496b4b63afa0e9f9932416..7839e34cbd42e1b77c533b0dede42e0a19daf2a4 100644 +index 03d908d0a43adddae9ace97da484c933f86196e7..ee63b8134b8b3187a65d2b99962cfacbee18ff9f 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -1000,6 +1000,7 @@ public final class CraftServer implements Server { diff --git a/patches/server/0021-Hook-into-CB-plugin-rewrites.patch b/patches/server/0021-Hook-into-CB-plugin-rewrites.patch index 6c6939c01e..8f4c15153f 100644 --- a/patches/server/0021-Hook-into-CB-plugin-rewrites.patch +++ b/patches/server/0021-Hook-into-CB-plugin-rewrites.patch @@ -8,7 +8,7 @@ our own relocation. Also lets us rewrite NMS calls for when we're debugging in an IDE pre-relocate. diff --git a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java -index 4afaab8978d4c4d9b0e9339f1bea9a9a9963d20d..421ddf6ca955215dff77655a7eda62eb9d90aa92 100644 +index f80625a2b1dc266131ba3bfda9a918c72a592d82..ebc160fd4c8aed95087130bb6fddc1d4f83c6f87 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java +++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java @@ -11,6 +11,7 @@ import java.util.Arrays; @@ -27,7 +27,7 @@ index 4afaab8978d4c4d9b0e9339f1bea9a9a9963d20d..421ddf6ca955215dff77655a7eda62eb import joptsimple.OptionParser; import joptsimple.OptionSet; import joptsimple.OptionSpec; -@@ -99,6 +101,40 @@ public class Commodore { +@@ -100,6 +102,40 @@ public class Commodore { private static final Map<String, RerouteMethodData> METHOD_REROUTE = Commodore.createReroutes(MethodRerouting.class); private static final Map<String, RerouteMethodData> ENUM_METHOD_REROUTE = Commodore.createReroutes(EnumEvil.class); @@ -68,7 +68,7 @@ index 4afaab8978d4c4d9b0e9339f1bea9a9a9963d20d..421ddf6ca955215dff77655a7eda62eb public static void main(String[] args) { OptionParser parser = new OptionParser(); OptionSpec<File> inputFlag = parser.acceptsAll(Arrays.asList("i", "input")).withRequiredArg().ofType(File.class).required(); -@@ -252,9 +288,49 @@ public class Commodore { +@@ -253,9 +289,49 @@ public class Commodore { } return new MethodVisitor(this.api, super.visitMethod(access, name, desc, signature, exceptions)) { @@ -118,7 +118,7 @@ index 4afaab8978d4c4d9b0e9339f1bea9a9a9963d20d..421ddf6ca955215dff77655a7eda62eb name = FieldRename.rename(pluginVersion, owner, name); if (modern) { -@@ -374,6 +450,13 @@ public class Commodore { +@@ -375,6 +451,13 @@ public class Commodore { return; } @@ -132,7 +132,7 @@ index 4afaab8978d4c4d9b0e9339f1bea9a9a9963d20d..421ddf6ca955215dff77655a7eda62eb if (modern) { if (owner.equals("org/bukkit/Material") || (instantiatedMethodType != null && instantiatedMethodType.getDescriptor().startsWith("(Lorg/bukkit/Material;)"))) { switch (name) { -@@ -470,6 +553,13 @@ public class Commodore { +@@ -471,6 +554,13 @@ public class Commodore { @Override public void visitLdcInsn(Object value) { @@ -146,7 +146,7 @@ index 4afaab8978d4c4d9b0e9339f1bea9a9a9963d20d..421ddf6ca955215dff77655a7eda62eb if (value instanceof String && ((String) value).equals("com.mysql.jdbc.Driver")) { super.visitLdcInsn("com.mysql.cj.jdbc.Driver"); return; -@@ -480,6 +570,14 @@ public class Commodore { +@@ -481,6 +571,14 @@ public class Commodore { @Override public void visitInvokeDynamicInsn(String name, String descriptor, Handle bootstrapMethodHandle, Object... bootstrapMethodArguments) { @@ -161,7 +161,7 @@ index 4afaab8978d4c4d9b0e9339f1bea9a9a9963d20d..421ddf6ca955215dff77655a7eda62eb if (bootstrapMethodHandle.getOwner().equals("java/lang/invoke/LambdaMetafactory") && bootstrapMethodHandle.getName().equals("metafactory") && bootstrapMethodArguments.length == 3) { Type samMethodType = (Type) bootstrapMethodArguments[0]; -@@ -496,7 +594,7 @@ public class Commodore { +@@ -497,7 +595,7 @@ public class Commodore { methodArgs.add(new Handle(newOpcode, newOwner, newName, newDescription, newItf)); methodArgs.add(newInstantiated); @@ -170,7 +170,7 @@ index 4afaab8978d4c4d9b0e9339f1bea9a9a9963d20d..421ddf6ca955215dff77655a7eda62eb }, implMethod.getTag(), implMethod.getOwner(), implMethod.getName(), implMethod.getDesc(), implMethod.isInterface(), samMethodType, instantiatedMethodType); return; } -@@ -547,6 +645,12 @@ public class Commodore { +@@ -548,6 +646,12 @@ public class Commodore { @Override public FieldVisitor visitField(int access, String name, String descriptor, String signature, Object value) { diff --git a/patches/server/0022-Remap-reflection-calls-in-plugins-using-internals.patch b/patches/server/0022-Remap-reflection-calls-in-plugins-using-internals.patch index ed625b27de..bebe4a4833 100644 --- a/patches/server/0022-Remap-reflection-calls-in-plugins-using-internals.patch +++ b/patches/server/0022-Remap-reflection-calls-in-plugins-using-internals.patch @@ -645,10 +645,10 @@ index 242811578a786e3807a1a7019d472d5a68f87116..0b65fdf53124f3dd042b2363b1b8df8e return traceElements; } diff --git a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java -index 421ddf6ca955215dff77655a7eda62eb9d90aa92..8a1570ceb4755a1872911751943c84b8f06eb4c2 100644 +index ebc160fd4c8aed95087130bb6fddc1d4f83c6f87..65f64de05a88844e62b5a0dd1e2f53edfb4e0c1f 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java +++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java -@@ -102,36 +102,26 @@ public class Commodore { +@@ -103,36 +103,26 @@ public class Commodore { private static final Map<String, RerouteMethodData> ENUM_METHOD_REROUTE = Commodore.createReroutes(EnumEvil.class); // Paper start - Plugin rewrites @@ -696,7 +696,7 @@ index 421ddf6ca955215dff77655a7eda62eb9d90aa92..8a1570ceb4755a1872911751943c84b8 } // Paper end - Plugin rewrites -@@ -214,6 +204,7 @@ public class Commodore { +@@ -215,6 +205,7 @@ public class Commodore { visitor = new LimitedClassRemapper(cw, new SimpleRemapper(Commodore.ENUM_RENAMES)); } @@ -705,7 +705,7 @@ index 421ddf6ca955215dff77655a7eda62eb9d90aa92..8a1570ceb4755a1872911751943c84b8 final Set<RerouteMethodData> rerouteMethodData = new HashSet<>(); String className; diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index a6de88625aeb2c5ababd476e804e9b45b1185efe..fa2e43020fafc283a9c063d10a82280158c7f93d 100644 +index 57342ba582fae0259a214e75b651a83be5cc269f..6aa5b1e05893bcf61a91cb4de578d8996ca0a868 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java @@ -74,6 +74,7 @@ import org.bukkit.potion.PotionType; diff --git a/patches/server/0023-Timings-v2.patch b/patches/server/0023-Timings-v2.patch index 0d0d81a7a8..3ed1a69960 100644 --- a/patches/server/0023-Timings-v2.patch +++ b/patches/server/0023-Timings-v2.patch @@ -1526,7 +1526,7 @@ index d1cfcc8a36964f006f1af6764c52b5ca458b478d..def3e28edc206e0ba41111e26332db46 private String descriptionId; @Nullable diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java -index e6c586eb85c6c477a3c130e1e1a37b41f17c30c8..6e35709f2a7c32050908e7e5af5529c9f342b787 100644 +index 18220f5658b940d918bfd9b8d083c5e53490837b..0f4c87870a87cbaa1d98127300d57e28b2486a9c 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java @@ -34,10 +34,12 @@ import org.bukkit.inventory.InventoryHolder; @@ -1544,10 +1544,10 @@ index e6c586eb85c6c477a3c130e1e1a37b41f17c30c8..6e35709f2a7c32050908e7e5af5529c9 private static final CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new CraftPersistentDataTypeRegistry(); public CraftPersistentDataContainer persistentDataContainer; diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -index c664021dbfffcf0db3247041270ce9a1ee6940de..332351b78fa22cd354b916c4a29bea5b4b223e40 100644 +index 25380a44e5cc94f3924cfee6a03c3091fea04ae2..418ba374886d93f69afd614e4be05f6561e1f897 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -@@ -597,6 +597,7 @@ public class LevelChunk extends ChunkAccess { +@@ -602,6 +602,7 @@ public class LevelChunk extends ChunkAccess { server.getPluginManager().callEvent(new org.bukkit.event.world.ChunkLoadEvent(bukkitChunk, this.needsDecoration)); if (this.needsDecoration) { @@ -1555,7 +1555,7 @@ index c664021dbfffcf0db3247041270ce9a1ee6940de..332351b78fa22cd354b916c4a29bea5b this.needsDecoration = false; java.util.Random random = new java.util.Random(); random.setSeed(this.level.getSeed()); -@@ -616,6 +617,7 @@ public class LevelChunk extends ChunkAccess { +@@ -621,6 +622,7 @@ public class LevelChunk extends ChunkAccess { } } server.getPluginManager().callEvent(new org.bukkit.event.world.ChunkPopulateEvent(bukkitChunk)); @@ -1590,7 +1590,7 @@ index 46a090123e205394791cdbde2af84c58ce55f7e1..47f5f3d58bb3bf85cf35f9baae77df7f }; } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 7839e34cbd42e1b77c533b0dede42e0a19daf2a4..f2355612b497079f1de84e953c36720794da51d8 100644 +index ee63b8134b8b3187a65d2b99962cfacbee18ff9f..29bb34e9207bd6c49cfbe58d4b598dcd35b7a65c 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -376,7 +376,7 @@ public final class CraftServer implements Server { @@ -1985,7 +1985,7 @@ index f97eccb6a17c7876e1e002d798eb67bbe80571a0..76effc345d362047e64d064eb64a5222 + } // Paper } diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index fa2e43020fafc283a9c063d10a82280158c7f93d..9576cabff99d154ef77595b074082adf9212698d 100644 +index 6aa5b1e05893bcf61a91cb4de578d8996ca0a868..9383bf47404fca8d008d5c401ed37ddaa7bef4f7 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java @@ -197,6 +197,12 @@ public final class CraftMagicNumbers implements UnsafeValues { diff --git a/patches/server/0024-Further-improve-server-tick-loop.patch b/patches/server/0024-Further-improve-server-tick-loop.patch index 63028f2e6f..be36622f23 100644 --- a/patches/server/0024-Further-improve-server-tick-loop.patch +++ b/patches/server/0024-Further-improve-server-tick-loop.patch @@ -146,7 +146,7 @@ index d76dae9ce9022308b316080ac48b7030d674cc6b..e9d56d75b7c648f04d3a56942b286609 this.startMetricsRecordingTick(); this.profiler.push("tick"); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index f2355612b497079f1de84e953c36720794da51d8..1056badff06575ef13907afac60af734ffa2b863 100644 +index 29bb34e9207bd6c49cfbe58d4b598dcd35b7a65c..30a3ea558d66869e2d60220aac2e1cae2664230b 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -2673,7 +2673,11 @@ public final class CraftServer implements Server { diff --git a/patches/server/0025-Add-command-line-option-to-load-extra-plugin-jars-no.patch b/patches/server/0025-Add-command-line-option-to-load-extra-plugin-jars-no.patch index 5a00fc7547..9bf3c2e9f3 100644 --- a/patches/server/0025-Add-command-line-option-to-load-extra-plugin-jars-no.patch +++ b/patches/server/0025-Add-command-line-option-to-load-extra-plugin-jars-no.patch @@ -7,7 +7,7 @@ Subject: [PATCH] Add command line option to load extra plugin jars not in the ex: java -jar paperclip.jar nogui -add-plugin=/path/to/plugin.jar -add-plugin=/path/to/another/plugin_jar.jar diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 1056badff06575ef13907afac60af734ffa2b863..acab477a4a026799319054c2eb4d0f2c99ab3d83 100644 +index 30a3ea558d66869e2d60220aac2e1cae2664230b..d32ee2729a7f85aa1a6e18cb9c1396506cad0309 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -458,6 +458,35 @@ public final class CraftServer implements Server { @@ -47,7 +47,7 @@ index 1056badff06575ef13907afac60af734ffa2b863..acab477a4a026799319054c2eb4d0f2c if (type == PluginLoadOrder.STARTUP) { this.helpMap.clear(); diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index 26dfb02286e836cad0242c71f743265d55d9d032..1c8049bbc08be77673d375205bd42a346ff951b8 100644 +index 3eecea2e6df217ccf2c432d02022c53443a37014..8da38624b5867ce88bdb3036e1ed6d99fc626f31 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -160,6 +160,12 @@ public class Main { diff --git a/patches/server/0026-Support-components-in-ItemMeta.patch b/patches/server/0026-Support-components-in-ItemMeta.patch index beae574f9a..680fd5d70f 100644 --- a/patches/server/0026-Support-components-in-ItemMeta.patch +++ b/patches/server/0026-Support-components-in-ItemMeta.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Support components in ItemMeta diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index 86a5e4f7b2a0d50d0a58d88e10a277cfbd09bf9d..46e1fabf85cc0d92f79a7adf24e5724dc1dc08a9 100644 +index 568d6fab743039b20715d8181555f52baa05f0f3..7ae3cdb80335cbeb0ff695eb719a170651586722 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -@@ -969,11 +969,23 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -976,11 +976,23 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { return CraftChatMessage.fromComponent(this.displayName); } @@ -32,7 +32,7 @@ index 86a5e4f7b2a0d50d0a58d88e10a277cfbd09bf9d..46e1fabf85cc0d92f79a7adf24e5724d @Override public boolean hasDisplayName() { return this.displayName != null; -@@ -1147,6 +1159,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1154,6 +1166,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { return this.lore == null ? null : new ArrayList<String>(Lists.transform(this.lore, CraftChatMessage::fromComponent)); } @@ -47,7 +47,7 @@ index 86a5e4f7b2a0d50d0a58d88e10a277cfbd09bf9d..46e1fabf85cc0d92f79a7adf24e5724d @Override public void setLore(List<String> lore) { if (lore == null || lore.isEmpty()) { -@@ -1161,6 +1181,21 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1168,6 +1188,21 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { } } @@ -69,7 +69,7 @@ index 86a5e4f7b2a0d50d0a58d88e10a277cfbd09bf9d..46e1fabf85cc0d92f79a7adf24e5724d @Override public boolean hasCustomModelData() { return this.customModelData != null; -@@ -1873,6 +1908,11 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1880,6 +1915,11 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { } for (Object object : addFrom) { diff --git a/patches/server/0033-Expose-server-build-information.patch b/patches/server/0033-Expose-server-build-information.patch index 2a0bceab6c..97069f9d94 100644 --- a/patches/server/0033-Expose-server-build-information.patch +++ b/patches/server/0033-Expose-server-build-information.patch @@ -590,7 +590,7 @@ index f077b8ff0bf0d96628db3569132696b68fd79921..5f11f5b16766f9d1d5640ae037e259be value.append("\n Plugins: {"); for (Plugin plugin : Bukkit.getPluginManager().getPlugins()) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index acab477a4a026799319054c2eb4d0f2c99ab3d83..2a36e562967ec6174efe456e489c50ca10ba47e5 100644 +index d32ee2729a7f85aa1a6e18cb9c1396506cad0309..70219981d3b0b2a79997d10f7726d7b0f743e195 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -11,8 +11,6 @@ import com.google.common.collect.MapMaker; @@ -659,7 +659,7 @@ index acab477a4a026799319054c2eb4d0f2c99ab3d83..2a36e562967ec6174efe456e489c50ca public List<CraftPlayer> getOnlinePlayers() { return this.playerView; diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index 1c8049bbc08be77673d375205bd42a346ff951b8..1aa75b11ee3297e379baa111cf53e1cfcd8b016e 100644 +index 8da38624b5867ce88bdb3036e1ed6d99fc626f31..2097be352dc585b805dc73194cec095627f311bc 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -15,6 +15,7 @@ import joptsimple.OptionSet; @@ -670,7 +670,7 @@ index 1c8049bbc08be77673d375205bd42a346ff951b8..1aa75b11ee3297e379baa111cf53e1cf public static boolean useJline = true; public static boolean useConsole = true; -@@ -252,15 +253,17 @@ public class Main { +@@ -241,15 +242,17 @@ public class Main { deadline.add(Calendar.DAY_OF_YEAR, -14); if (buildDate.before(deadline.getTime())) { System.err.println("*** Error, this build is outdated ***"); @@ -692,7 +692,7 @@ index 1c8049bbc08be77673d375205bd42a346ff951b8..1aa75b11ee3297e379baa111cf53e1cf t.printStackTrace(); } diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 9576cabff99d154ef77595b074082adf9212698d..e091356ee1fa3ec09839de6ef5c450824ea40844 100644 +index 9383bf47404fca8d008d5c401ed37ddaa7bef4f7..d08b01fef9928f2239c8663cf90219dc7acad58c 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java @@ -453,6 +453,11 @@ public final class CraftMagicNumbers implements UnsafeValues { diff --git a/patches/server/0035-Only-refresh-abilities-if-needed.patch b/patches/server/0035-Only-refresh-abilities-if-needed.patch index 3af5f88628..4a1f2c1a91 100644 --- a/patches/server/0035-Only-refresh-abilities-if-needed.patch +++ b/patches/server/0035-Only-refresh-abilities-if-needed.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Only refresh abilities if needed diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 4cc6b3162cea049134f194ed84a7552830cb85af..c2be21491183f5f113dbfc71a7e0ccd195679296 100644 +index 1b2ead250233d9f228bfe8e79f988026506895f9..1a003335a4f3cc2fdeadca9c0c6cdafa61a6a1ac 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -2093,12 +2093,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0036-Entity-Origin-API.patch b/patches/server/0036-Entity-Origin-API.patch index eaf335d0d3..c9cc076658 100644 --- a/patches/server/0036-Entity-Origin-API.patch +++ b/patches/server/0036-Entity-Origin-API.patch @@ -25,7 +25,7 @@ index eb98bb1bd76869fd76b34885223c8e57a04e0c51..754045e71f180862fa57fd1c97e5d7de public void onTrackingEnd(Entity entity) { diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 63f45a77c8511e05954030cf117c5e4cda0a518f..dbe5239b1a1769ef9f2ef66c32b1a68cd684428e 100644 +index 0a3ed94165430774c7037e78fd7bffc205c6f72f..66df9b75349b2fb20a13c12392d4771603521291 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -328,7 +328,27 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess diff --git a/patches/server/0037-Prevent-block-entity-and-entity-crashes.patch b/patches/server/0037-Prevent-block-entity-and-entity-crashes.patch index 8c0b53d52b..e704e8cdc8 100644 --- a/patches/server/0037-Prevent-block-entity-and-entity-crashes.patch +++ b/patches/server/0037-Prevent-block-entity-and-entity-crashes.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Prevent block entity and entity crashes diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 1702cd6aa8b4fc29b8f2539604f6e203bf95d020..e19ee11905417918c7ec142fd2016ab3f000e4e2 100644 +index 79d5423be919dfe4db75ad7dd0ce403ad0214462..e8b8475dd6fd7b89651f744da2cb9696c73ddc3e 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java @@ -731,11 +731,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @@ -26,12 +26,12 @@ index 1702cd6aa8b4fc29b8f2539604f6e203bf95d020..e19ee11905417918c7ec142fd2016ab3 } diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java -index 6e35709f2a7c32050908e7e5af5529c9f342b787..d20f71a2098b327423cbdbbc096aa9e358cb809d 100644 +index 0f4c87870a87cbaa1d98127300d57e28b2486a9c..5fada686ddb4a576ef826aed27d2c945d6ff9374 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java -@@ -263,7 +263,12 @@ public abstract class BlockEntity { - return s + " // " + this.getClass().getCanonicalName(); - }); +@@ -272,7 +272,12 @@ public abstract class BlockEntity { + public void fillCrashReportCategory(CrashReportCategory crashReportSection) { + crashReportSection.setDetail("Name", this::getNameForReporting); if (this.level != null) { - CrashReportCategory.populateBlockDetails(crashReportSection, this.level, this.worldPosition, this.getBlockState()); + // Paper start - Prevent block entity and entity crashes @@ -44,10 +44,10 @@ index 6e35709f2a7c32050908e7e5af5529c9f342b787..d20f71a2098b327423cbdbbc096aa9e3 } } diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -index 332351b78fa22cd354b916c4a29bea5b4b223e40..7bfe757b605f4e5a16b28214ac3b497e738b45b5 100644 +index 418ba374886d93f69afd614e4be05f6561e1f897..6889991885cc2075e0936b2c480befeef30d308c 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -@@ -948,11 +948,11 @@ public class LevelChunk extends ChunkAccess { +@@ -953,11 +953,11 @@ public class LevelChunk extends ChunkAccess { gameprofilerfiller.pop(); } catch (Throwable throwable) { diff --git a/patches/server/0038-Configurable-top-of-nether-void-damage.patch b/patches/server/0038-Configurable-top-of-nether-void-damage.patch index 8a30b0f3c3..6a6b860f3f 100644 --- a/patches/server/0038-Configurable-top-of-nether-void-damage.patch +++ b/patches/server/0038-Configurable-top-of-nether-void-damage.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Configurable top of nether void damage Co-authored-by: Jake Potrebic <[email protected]> diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index dbe5239b1a1769ef9f2ef66c32b1a68cd684428e..d5f5864b7c1ad4c30f37b360b317b63c129e3a3f 100644 +index 66df9b75349b2fb20a13c12392d4771603521291..05b8945cb45376a661a2703d8a71b92e15bcb6de 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -706,7 +706,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess diff --git a/patches/server/0042-Fix-lag-from-explosions-processing-dead-entities.patch b/patches/server/0042-Fix-lag-from-explosions-processing-dead-entities.patch index ae3fb7c15b..f0ca447b5b 100644 --- a/patches/server/0042-Fix-lag-from-explosions-processing-dead-entities.patch +++ b/patches/server/0042-Fix-lag-from-explosions-processing-dead-entities.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix lag from explosions processing dead entities diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java -index 4a30928cd11f528f8ac06950b8052ebb7f2dd33c..458020575050284544761ec61c52abac7bfd15be 100644 +index 3856e87862c6a585c697ced0c3c89a6e1507a5b9..35d541c549cb07508e68388b18f38a4ffd788176 100644 --- a/src/main/java/net/minecraft/world/level/Explosion.java +++ b/src/main/java/net/minecraft/world/level/Explosion.java @@ -227,7 +227,7 @@ public class Explosion { diff --git a/patches/server/0044-Disable-explosion-knockback.patch b/patches/server/0044-Disable-explosion-knockback.patch index 233aa30581..c4c3bebc07 100644 --- a/patches/server/0044-Disable-explosion-knockback.patch +++ b/patches/server/0044-Disable-explosion-knockback.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Disable explosion knockback diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java -index 55d66aa8264d5b444a23e2132206bcc9835cfe00..d93ed33d5ae72e9dd3e6cf044ef79e4b9689dc1c 100644 +index 23a0a8d9beb7ca400134fb6a65b3133baceeed83..6476c644d3da824c5ee4190cb45cde678ff1188f 100644 --- a/src/main/java/net/minecraft/world/level/Explosion.java +++ b/src/main/java/net/minecraft/world/level/Explosion.java @@ -285,7 +285,7 @@ public class Explosion { diff --git a/patches/server/0052-Disable-spigot-tick-limiters.patch b/patches/server/0052-Disable-spigot-tick-limiters.patch index 2e19fda1e1..519b553ae2 100644 --- a/patches/server/0052-Disable-spigot-tick-limiters.patch +++ b/patches/server/0052-Disable-spigot-tick-limiters.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Disable spigot tick limiters diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index da7b1b705da9f17de858f72a20d3a932cd8f7fad..68436413645e0e33f22cdee0ea101ca01b343d75 100644 +index a272aaff11ac077853c06f729a5d8b09f866e0f8..b4293991dddc9039c26106ac8c047e5aeec35a56 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java @@ -704,9 +704,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { diff --git a/patches/server/0055-Improve-Player-chat-API-handling.patch b/patches/server/0055-Improve-Player-chat-API-handling.patch index e91ed39415..41142b8f48 100644 --- a/patches/server/0055-Improve-Player-chat-API-handling.patch +++ b/patches/server/0055-Improve-Player-chat-API-handling.patch @@ -40,7 +40,7 @@ index 47e1640cafc8087d94d0b88b8b3117591f9f238e..64db7e017b41bffcaac202ee4ecfd7df if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot this.LOGGER.info(this.player.getScoreboardName() + " issued server command: " + s); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 2a36e562967ec6174efe456e489c50ca10ba47e5..b0371c51645da361b63dea02bf7633ae6191560f 100644 +index 70219981d3b0b2a79997d10f7726d7b0f743e195..b57defed3c8caf8743d19452abb1766b35b6ef9a 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -933,7 +933,7 @@ public final class CraftServer implements Server { diff --git a/patches/server/0057-Expose-server-CommandMap.patch b/patches/server/0057-Expose-server-CommandMap.patch index 7903e98889..9f0041a4e2 100644 --- a/patches/server/0057-Expose-server-CommandMap.patch +++ b/patches/server/0057-Expose-server-CommandMap.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Expose server CommandMap diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index b0371c51645da361b63dea02bf7633ae6191560f..527b3a7ae93ab288b119fe6bfa76cb0ea3ab2561 100644 +index b57defed3c8caf8743d19452abb1766b35b6ef9a..2486c5f70b079644222bef0dffe22abe9c441e59 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -2177,6 +2177,7 @@ public final class CraftServer implements Server { diff --git a/patches/server/0059-Player-Tab-List-and-Title-APIs.patch b/patches/server/0059-Player-Tab-List-and-Title-APIs.patch index db2fa88567..8dc83f2611 100644 --- a/patches/server/0059-Player-Tab-List-and-Title-APIs.patch +++ b/patches/server/0059-Player-Tab-List-and-Title-APIs.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Player Tab List and Title APIs diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 68df6270f7d08cde78235749950e05bf60c1641c..ef3f1d00a595fd1fb7297d7ab96e791acbcbbed6 100644 +index 52d48ad341c564f0f847e3aad09babee826ebf87..98f9c0438e68d268d009f2286503cf1170fbb715 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -386,6 +386,98 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0061-Add-velocity-warnings.patch b/patches/server/0061-Add-velocity-warnings.patch index 996e71c322..01e105104e 100644 --- a/patches/server/0061-Add-velocity-warnings.patch +++ b/patches/server/0061-Add-velocity-warnings.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add velocity warnings diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 4bfb836513d5194be271f4a82990ace98de69640..fd31d0e76d1a953b128e777b1bc27e24b1e03ed7 100644 +index 2486c5f70b079644222bef0dffe22abe9c441e59..40c195ec5c0ed1a8244dc7a5eaba9ae7a3a34e35 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -302,6 +302,7 @@ public final class CraftServer implements Server { diff --git a/patches/server/0062-Add-exception-reporting-event.patch b/patches/server/0062-Add-exception-reporting-event.patch index 3efe1b1f98..36051c1835 100644 --- a/patches/server/0062-Add-exception-reporting-event.patch +++ b/patches/server/0062-Add-exception-reporting-event.patch @@ -123,10 +123,10 @@ index 6a80479554f0c860a8dd6baa1a6506858fca83e3..6324689f52363f19501143c1649f0885 } diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -index 7bfe757b605f4e5a16b28214ac3b497e738b45b5..fb953b2172c322e8abf5aa50060adbc00fe92832 100644 +index 6889991885cc2075e0936b2c480befeef30d308c..4495c5051b0c7a04d433c39d91f74cb7924d3ff2 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -@@ -466,8 +466,13 @@ public class LevelChunk extends ChunkAccess { +@@ -471,8 +471,13 @@ public class LevelChunk extends ChunkAccess { BlockState iblockdata = this.getBlockState(blockposition); if (!iblockdata.hasBlockEntity()) { @@ -142,7 +142,7 @@ index 7bfe757b605f4e5a16b28214ac3b497e738b45b5..fb953b2172c322e8abf5aa50060adbc0 } else { BlockState iblockdata1 = blockEntity.getBlockState(); -@@ -951,6 +956,7 @@ public class LevelChunk extends ChunkAccess { +@@ -956,6 +961,7 @@ public class LevelChunk extends ChunkAccess { // Paper start - Prevent block entity and entity crashes final String msg = String.format("BlockEntity threw exception at %s:%s,%s,%s", LevelChunk.this.getLevel().getWorld().getName(), this.getPos().getX(), this.getPos().getY(), this.getPos().getZ()); net.minecraft.server.MinecraftServer.LOGGER.error(msg, throwable); diff --git a/patches/server/0063-Disable-Scoreboards-for-non-players-by-default.patch b/patches/server/0063-Disable-Scoreboards-for-non-players-by-default.patch index ba39658f01..47a9266555 100644 --- a/patches/server/0063-Disable-Scoreboards-for-non-players-by-default.patch +++ b/patches/server/0063-Disable-Scoreboards-for-non-players-by-default.patch @@ -11,7 +11,7 @@ So avoid looking up scoreboards and short circuit to the "not on a team" logic which is most likely to be true. diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index d5f5864b7c1ad4c30f37b360b317b63c129e3a3f..82e57978b79b5275b98a1fa7731c6a23ee861a2f 100644 +index 05b8945cb45376a661a2703d8a71b92e15bcb6de..a8677eb7054cea8b73ebebd41102f400b497fbec 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -2934,6 +2934,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess diff --git a/patches/server/0066-Complete-resource-pack-API.patch b/patches/server/0066-Complete-resource-pack-API.patch index 02e8bb2c5d..8ecc08bf71 100644 --- a/patches/server/0066-Complete-resource-pack-API.patch +++ b/patches/server/0066-Complete-resource-pack-API.patch @@ -22,7 +22,7 @@ index 678f12679985c6fa9effe8beec306d95d5e0bdac..8520f0f2b4b4e758b2e2fae206b7fd81 } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index ef3f1d00a595fd1fb7297d7ab96e791acbcbbed6..174c86a7213ecf3c8dc03aeaf55c56a4c4ce55ad 100644 +index 98f9c0438e68d268d009f2286503cf1170fbb715..8a2a22aeb027dec3efc0d57ee19b33695b4c5411 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -208,6 +208,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0067-Default-loading-permissions.yml-before-plugins.patch b/patches/server/0067-Default-loading-permissions.yml-before-plugins.patch index 47ab27f740..1c0e7b2d80 100644 --- a/patches/server/0067-Default-loading-permissions.yml-before-plugins.patch +++ b/patches/server/0067-Default-loading-permissions.yml-before-plugins.patch @@ -16,7 +16,7 @@ modify that. Under the previous logic, plugins were unable (cleanly) override pe A config option has been added for those who depend on the previous behavior, but I don't expect that. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 2b665dafdfd002fbd87dca9d869ee8c2b945a4fb..da2e0bb591468e7940f057a583ce166abc79d399 100644 +index 40c195ec5c0ed1a8244dc7a5eaba9ae7a3a34e35..bc8e6a361d386db4bed5d0cba897dd17babea8bd 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -487,6 +487,7 @@ public final class CraftServer implements Server { diff --git a/patches/server/0068-Allow-Reloading-of-Custom-Permissions.patch b/patches/server/0068-Allow-Reloading-of-Custom-Permissions.patch index b3e1413c02..d6b33f5ab6 100644 --- a/patches/server/0068-Allow-Reloading-of-Custom-Permissions.patch +++ b/patches/server/0068-Allow-Reloading-of-Custom-Permissions.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Allow Reloading of Custom Permissions https://github.com/PaperMC/Paper/issues/49 diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index da2e0bb591468e7940f057a583ce166abc79d399..99571e69aabbbfb0e439a42d113c206decb1377b 100644 +index bc8e6a361d386db4bed5d0cba897dd17babea8bd..9b92b10131609ba9c2e297ba846bba9cfc6f2cd4 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -2793,5 +2793,23 @@ public final class CraftServer implements Server { diff --git a/patches/server/0069-Remove-Metadata-on-reload.patch b/patches/server/0069-Remove-Metadata-on-reload.patch index 9a70a953e6..bdb753c1f6 100644 --- a/patches/server/0069-Remove-Metadata-on-reload.patch +++ b/patches/server/0069-Remove-Metadata-on-reload.patch @@ -7,7 +7,7 @@ Metadata is not meant to persist reload as things break badly with non primitive This will remove metadata on reload so it does not crash everything if a plugin uses it. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 99571e69aabbbfb0e439a42d113c206decb1377b..5461e0a1ef7f342cbd9fb6f291e33e645b414058 100644 +index 9b92b10131609ba9c2e297ba846bba9cfc6f2cd4..bed9c6bd985417661d5e2c52a02198624b98cd22 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -1001,8 +1001,16 @@ public final class CraftServer implements Server { diff --git a/patches/server/0070-Handle-Item-Meta-Inconsistencies.patch b/patches/server/0070-Handle-Item-Meta-Inconsistencies.patch index 17e1d51ed5..00c91ac5e5 100644 --- a/patches/server/0070-Handle-Item-Meta-Inconsistencies.patch +++ b/patches/server/0070-Handle-Item-Meta-Inconsistencies.patch @@ -149,7 +149,7 @@ index 17fa2d3db112762bcb8b941b69b8ddcc53f47224..6c76aeddb34239a5acc204a17b2aa2d8 static Map<Enchantment, Integer> getEnchantments(net.minecraft.world.item.ItemStack item) { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index 46e1fabf85cc0d92f79a7adf24e5724dc1dc08a9..69be26f8f47854f39cfed0559d944ef4f983c0f3 100644 +index 7ae3cdb80335cbeb0ff695eb719a170651586722..97c40582bca095532fff9a81515f38ea4ac527e0 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java @@ -6,6 +6,7 @@ import com.google.common.collect.ImmutableList; @@ -197,7 +197,7 @@ index 46e1fabf85cc0d92f79a7adf24e5724dc1dc08a9..69be26f8f47854f39cfed0559d944ef4 tag.entrySet().forEach((entry) -> { Holder<net.minecraft.world.item.enchantment.Enchantment> id = entry.getKey(); -@@ -729,13 +731,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -736,13 +738,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { return modifiers; } @@ -213,7 +213,7 @@ index 46e1fabf85cc0d92f79a7adf24e5724dc1dc08a9..69be26f8f47854f39cfed0559d944ef4 for (Map.Entry<?, ?> entry : ench.entrySet()) { Enchantment enchantment = CraftEnchantment.stringToBukkit(entry.getKey().toString()); if ((enchantment != null) && (entry.getValue() instanceof Integer)) { -@@ -1072,14 +1074,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1079,14 +1081,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @Override public Map<Enchantment, Integer> getEnchants() { @@ -230,7 +230,7 @@ index 46e1fabf85cc0d92f79a7adf24e5724dc1dc08a9..69be26f8f47854f39cfed0559d944ef4 } if (ignoreRestrictions || level >= ench.getStartLevel() && level <= ench.getMaxLevel()) { -@@ -1679,7 +1681,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1686,7 +1688,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { clone.customModelData = this.customModelData; clone.blockData = this.blockData; if (this.enchantments != null) { @@ -239,7 +239,7 @@ index 46e1fabf85cc0d92f79a7adf24e5724dc1dc08a9..69be26f8f47854f39cfed0559d944ef4 } if (this.hasAttributeModifiers()) { clone.attributeModifiers = LinkedHashMultimap.create(this.attributeModifiers); -@@ -2028,4 +2030,22 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -2036,4 +2038,22 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { return (result != null) ? result : Optional.empty(); } diff --git a/patches/server/0074-handle-NaN-health-absorb-values-and-repair-bad-data.patch b/patches/server/0074-handle-NaN-health-absorb-values-and-repair-bad-data.patch index 1d38bc8302..81f7e76eba 100644 --- a/patches/server/0074-handle-NaN-health-absorb-values-and-repair-bad-data.patch +++ b/patches/server/0074-handle-NaN-health-absorb-values-and-repair-bad-data.patch @@ -44,7 +44,7 @@ index e7b308ba4a253b270aebebd19e2671514c5357ca..fae7c493c9be741f019fc49f45a59976 protected void internalSetAbsorptionAmount(float absorptionAmount) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 174c86a7213ecf3c8dc03aeaf55c56a4c4ce55ad..c399264ccffe646be10b3f13ebe0c0103d97f62c 100644 +index 8a2a22aeb027dec3efc0d57ee19b33695b4c5411..af57de9e02fc9c96b1d4614b9bacdc5dd29117d5 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -2338,6 +2338,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0075-Use-a-Shared-Random-for-Entities.patch b/patches/server/0075-Use-a-Shared-Random-for-Entities.patch index 0dc711a42b..d8989ee3dd 100644 --- a/patches/server/0075-Use-a-Shared-Random-for-Entities.patch +++ b/patches/server/0075-Use-a-Shared-Random-for-Entities.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Use a Shared Random for Entities Reduces memory usage and provides ensures more randomness, Especially since a lot of garbage entity objects get created. diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 82e57978b79b5275b98a1fa7731c6a23ee861a2f..bd17157631a74f80e3b5ce50bb1f681abe1dd6a7 100644 +index a8677eb7054cea8b73ebebd41102f400b497fbec..ff1c6e5af0645305fd2047b5696cc3b0dc9d4009 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -175,6 +175,79 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess diff --git a/patches/server/0077-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch b/patches/server/0077-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch index ed44e0fd8c..ab0a3acc57 100644 --- a/patches/server/0077-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch +++ b/patches/server/0077-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch @@ -30,7 +30,7 @@ index de1708e5d39561115d2825eea4a5f6e1f1f4e5b8..1e5b42fc3903b14537d232c8adbbaf79 public LevelChunk getChunkIfLoaded(int x, int z) { return this.chunkSource.getChunk(x, z, false); diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index eae1d6eedeed09b3f49913c2bb205b80442bbfe3..622ecc1aeb9140d5c0d181fa472d123c42e5c5f4 100644 +index dfb349ed8a0fb981b3234baf040bd3297a555ebf..024da1029baecae639d7c05b5f7c30dbaa67b006 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java @@ -491,7 +491,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { diff --git a/patches/server/0079-Configurable-Chunk-Inhabited-Time.patch b/patches/server/0079-Configurable-Chunk-Inhabited-Time.patch index 9eb058e669..40a5c2aa54 100644 --- a/patches/server/0079-Configurable-Chunk-Inhabited-Time.patch +++ b/patches/server/0079-Configurable-Chunk-Inhabited-Time.patch @@ -11,7 +11,7 @@ For people who want all chunks to be treated equally, you can chose a fixed valu This allows to fine-tune vanilla gameplay. diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -index fb953b2172c322e8abf5aa50060adbc00fe92832..a0f9fb2ac15f2fa51a3bbe915550155ac2e76649 100644 +index 4495c5051b0c7a04d433c39d91f74cb7924d3ff2..6775217c065026aa61fce56a17c93010209b6941 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java @@ -172,6 +172,13 @@ public class LevelChunk extends ChunkAccess { diff --git a/patches/server/0083-Add-PlayerUseUnknownEntityEvent.patch b/patches/server/0083-Add-PlayerUseUnknownEntityEvent.patch index fd354e6963..3ac4e0b315 100644 --- a/patches/server/0083-Add-PlayerUseUnknownEntityEvent.patch +++ b/patches/server/0083-Add-PlayerUseUnknownEntityEvent.patch @@ -59,10 +59,10 @@ index 64db7e017b41bffcaac202ee4ecfd7df46d69331..14a821bfc6b20475889d3138b8da9e6b @Override diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 63e20db8ad84b332a4962d5cea83f1064b7c1a3d..bb296f649afd143adad47595479532cfdd778b71 100644 +index 78f4bb474c85e32448a385e108707d92082bfe02..b68068c783f782258f86e5ecf54664916f069e38 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1901,4 +1901,13 @@ public class CraftEventFactory { +@@ -1915,4 +1915,13 @@ public class CraftEventFactory { Bukkit.getPluginManager().callEvent(new EntityRemoveEvent(entity.getBukkitEntity(), cause)); } diff --git a/patches/server/0099-Faster-redstone-torch-rapid-clock-removal.patch b/patches/server/0099-Faster-redstone-torch-rapid-clock-removal.patch index 18322dc88f..866244cef8 100644 --- a/patches/server/0099-Faster-redstone-torch-rapid-clock-removal.patch +++ b/patches/server/0099-Faster-redstone-torch-rapid-clock-removal.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Faster redstone torch rapid clock removal Only resize the the redstone torch list once, since resizing arrays / lists is costly diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 622ecc1aeb9140d5c0d181fa472d123c42e5c5f4..4abb586f964e342425c7cf0384ab8bf8cdedaea3 100644 +index 024da1029baecae639d7c05b5f7c30dbaa67b006..240db0aae0b0e306c90bcc4a537c9afcb290acb3 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java @@ -169,6 +169,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { diff --git a/patches/server/0100-Add-server-name-parameter.patch b/patches/server/0100-Add-server-name-parameter.patch index 5ff9f1d961..388834a239 100644 --- a/patches/server/0100-Add-server-name-parameter.patch +++ b/patches/server/0100-Add-server-name-parameter.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add server-name parameter diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index 14f63c179428bee61d3b931ea309f4c94b89a6cc..75a3c7ed5500f0451c9c1efdfc3cb809445c8acf 100644 +index 2097be352dc585b805dc73194cec095627f311bc..837db57c19df3d5c986a52edf3d9d8105cc87cde 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -168,6 +168,14 @@ public class Main { diff --git a/patches/server/0104-Add-setting-for-proxy-online-mode-status.patch b/patches/server/0104-Add-setting-for-proxy-online-mode-status.patch index 163d5b4d5a..a865d30bbe 100644 --- a/patches/server/0104-Add-setting-for-proxy-online-mode-status.patch +++ b/patches/server/0104-Add-setting-for-proxy-online-mode-status.patch @@ -60,7 +60,7 @@ index a0b0614ac7d2009db5c6c10ab4a5f09dd447c635..653856d0b8dcf2baf4cc77a276f17c8c } else { String[] astring1 = astring; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 5461e0a1ef7f342cbd9fb6f291e33e645b414058..ff807bfe89708d9c680b84eda902b49f3167f3a4 100644 +index bed9c6bd985417661d5e2c52a02198624b98cd22..4732b6fd74006591aba7101da2a0931164898cf4 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -1886,7 +1886,7 @@ public final class CraftServer implements Server { diff --git a/patches/server/0108-Add-EntityZapEvent.patch b/patches/server/0108-Add-EntityZapEvent.patch index 9349d4820b..3f2644e38f 100644 --- a/patches/server/0108-Add-EntityZapEvent.patch +++ b/patches/server/0108-Add-EntityZapEvent.patch @@ -28,10 +28,10 @@ index 63c10be6eacd7108b8b4795d76bf624e0614440a..243eb1e54293c763a06febff551c0513 entitywitch.finalizeSpawn(world, world.getCurrentDifficultyAt(entitywitch.blockPosition()), MobSpawnType.CONVERSION, (SpawnGroupData) null); entitywitch.setNoAi(this.isNoAi()); diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index bb296f649afd143adad47595479532cfdd778b71..5cf1b15160647b6e8e42a167502643882a231c55 100644 +index b68068c783f782258f86e5ecf54664916f069e38..44c416f812867f19a26aeefc5710a7aef9dfdf64 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1211,6 +1211,14 @@ public class CraftEventFactory { +@@ -1215,6 +1215,14 @@ public class CraftEventFactory { return !event.isCancelled(); } diff --git a/patches/server/0111-Allow-Reloading-of-Command-Aliases.patch b/patches/server/0111-Allow-Reloading-of-Command-Aliases.patch index c2d729c66f..3be7f12eb4 100644 --- a/patches/server/0111-Allow-Reloading-of-Command-Aliases.patch +++ b/patches/server/0111-Allow-Reloading-of-Command-Aliases.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Allow Reloading of Command Aliases Reload the aliases stored in commands.yml diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index ff807bfe89708d9c680b84eda902b49f3167f3a4..eb12f17b58256489717a0462964b1cef5bc3624b 100644 +index 4732b6fd74006591aba7101da2a0931164898cf4..b308d00639fea71f39274db691a67e8accb237ce 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -2819,5 +2819,24 @@ public final class CraftServer implements Server { diff --git a/patches/server/0112-Add-source-to-PlayerExpChangeEvent.patch b/patches/server/0112-Add-source-to-PlayerExpChangeEvent.patch index d472f677f5..46f6c063c9 100644 --- a/patches/server/0112-Add-source-to-PlayerExpChangeEvent.patch +++ b/patches/server/0112-Add-source-to-PlayerExpChangeEvent.patch @@ -18,10 +18,10 @@ index 56402312e44d12c859e2c4b39902d31b7cfd1573..25a45e680f9fdea90f43d59de87a3a50 --this.count; diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 5cf1b15160647b6e8e42a167502643882a231c55..6ffc5b9eb2fa084c7cf397d944e6fc1d8d770dbb 100644 +index 44c416f812867f19a26aeefc5710a7aef9dfdf64..a83b7f350bf20f944de92df76e112aaa49dc608d 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1164,6 +1164,17 @@ public class CraftEventFactory { +@@ -1168,6 +1168,17 @@ public class CraftEventFactory { return event; } diff --git a/patches/server/0113-Add-ProjectileCollideEvent.patch b/patches/server/0113-Add-ProjectileCollideEvent.patch index 867e422520..1a8db9b902 100644 --- a/patches/server/0113-Add-ProjectileCollideEvent.patch +++ b/patches/server/0113-Add-ProjectileCollideEvent.patch @@ -6,11 +6,11 @@ Subject: [PATCH] Add ProjectileCollideEvent Deprecated now and replaced with ProjectileHitEvent diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 6ffc5b9eb2fa084c7cf397d944e6fc1d8d770dbb..50a4e657508e21717a61900660d85203d9373e19 100644 +index a83b7f350bf20f944de92df76e112aaa49dc608d..805d9ad1e1c888e1b6822a33b386733e9ddc9f2f 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1308,6 +1308,17 @@ public class CraftEventFactory { - return CraftItemStack.asNMSCopy(bitem); +@@ -1322,6 +1322,17 @@ public class CraftEventFactory { + return crafterCraftEvent; } + // Paper start @@ -27,7 +27,7 @@ index 6ffc5b9eb2fa084c7cf397d944e6fc1d8d770dbb..50a4e657508e21717a61900660d85203 public static ProjectileLaunchEvent callProjectileLaunchEvent(Entity entity) { Projectile bukkitEntity = (Projectile) entity.getBukkitEntity(); ProjectileLaunchEvent event = new ProjectileLaunchEvent(bukkitEntity); -@@ -1332,8 +1343,15 @@ public class CraftEventFactory { +@@ -1346,8 +1357,15 @@ public class CraftEventFactory { if (position.getType() == HitResult.Type.ENTITY) { hitEntity = ((EntityHitResult) position).getEntity().getBukkitEntity(); } diff --git a/patches/server/0115-Optimize-Level.hasChunkAt-BlockPosition-Z.patch b/patches/server/0115-Optimize-Level.hasChunkAt-BlockPosition-Z.patch index ee46f05dc0..8a8bbdb970 100644 --- a/patches/server/0115-Optimize-Level.hasChunkAt-BlockPosition-Z.patch +++ b/patches/server/0115-Optimize-Level.hasChunkAt-BlockPosition-Z.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Optimize Level.hasChunkAt(BlockPosition)Z Reduce method invocations for World.isLoaded(BlockPosition)Z diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 008be3aad044d20be14da3a9e96933d265104587..03b0720c6ebf1a876d56d18a941e0a06ed26dbf0 100644 +index 59992bea10218e48397fa781f895d36e0e1df46e..1643a0f11650e9fdaf36056fe34602d431c389d2 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java @@ -342,6 +342,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable { diff --git a/patches/server/0119-String-based-Action-Bar-API.patch b/patches/server/0119-String-based-Action-Bar-API.patch index b4a1ec6598..22b56b59fb 100644 --- a/patches/server/0119-String-based-Action-Bar-API.patch +++ b/patches/server/0119-String-based-Action-Bar-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] String based Action Bar API diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index c399264ccffe646be10b3f13ebe0c0103d97f62c..d471e9370fdbcbce5357e52e8ea2a10c196cd33d 100644 +index af57de9e02fc9c96b1d4614b9bacdc5dd29117d5..ccbfdfb74ccfc9d31e051e0746aa8a4ecdc4319f 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -388,6 +388,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0123-Provide-E-TE-Chunk-count-stat-methods.patch b/patches/server/0123-Provide-E-TE-Chunk-count-stat-methods.patch index f1025e5537..4079467066 100644 --- a/patches/server/0123-Provide-E-TE-Chunk-count-stat-methods.patch +++ b/patches/server/0123-Provide-E-TE-Chunk-count-stat-methods.patch @@ -7,7 +7,7 @@ Provides counts without the ineffeciency of using .getEntities().size() which creates copy of the collections. diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 03b0720c6ebf1a876d56d18a941e0a06ed26dbf0..4fcbea7b8b12be10157da0c1f35c06e47c0334ad 100644 +index 1643a0f11650e9fdaf36056fe34602d431c389d2..32f2516d1a1001d6a5c3f1f0fe0ffba21a9436dd 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java @@ -114,7 +114,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { diff --git a/patches/server/0126-Cap-Entity-Collisions.patch b/patches/server/0126-Cap-Entity-Collisions.patch index 8feda191fe..0016b0621e 100644 --- a/patches/server/0126-Cap-Entity-Collisions.patch +++ b/patches/server/0126-Cap-Entity-Collisions.patch @@ -12,7 +12,7 @@ just as it does in Vanilla, but entity pushing logic will be capped. You can set this to 0 to disable collisions. diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index bd17157631a74f80e3b5ce50bb1f681abe1dd6a7..46a21ed2408a42aafd16647e17e556730e799cbd 100644 +index ff1c6e5af0645305fd2047b5696cc3b0dc9d4009..85d8c4865b65792b99f812b579d7c23823d76e52 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -401,6 +401,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess diff --git a/patches/server/0130-Add-configuration-option-to-prevent-player-names-fro.patch b/patches/server/0130-Add-configuration-option-to-prevent-player-names-fro.patch index eeb9245931..2f58204207 100644 --- a/patches/server/0130-Add-configuration-option-to-prevent-player-names-fro.patch +++ b/patches/server/0130-Add-configuration-option-to-prevent-player-names-fro.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Add configuration option to prevent player names from being diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index eb12f17b58256489717a0462964b1cef5bc3624b..1fd2f6053e660674baa239f142a720d59e64c776 100644 +index b308d00639fea71f39274db691a67e8accb237ce..87c512e714282f5f076a4c2d35935970e9df44a1 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -2838,5 +2838,10 @@ public final class CraftServer implements Server { diff --git a/patches/server/0136-Basic-PlayerProfile-API.patch b/patches/server/0136-Basic-PlayerProfile-API.patch index c6ad6df561..8b5696ff03 100644 --- a/patches/server/0136-Basic-PlayerProfile-API.patch +++ b/patches/server/0136-Basic-PlayerProfile-API.patch @@ -594,7 +594,7 @@ index 416b26c2ab62b29d640169166980e398d5824b14..774d81c702edb76a2f6184d4dc53687d String s1 = name.toLowerCase(Locale.ROOT); GameProfileCache.GameProfileInfo usercache_usercacheentry = (GameProfileCache.GameProfileInfo) this.profilesByName.get(s1); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 1fd2f6053e660674baa239f142a720d59e64c776..5ab2836f14e1a7482e7136004507d66c4abb4bdd 100644 +index 87c512e714282f5f076a4c2d35935970e9df44a1..17c1b18893f3b23dc88ee9a0029f716f51dc2446 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -262,6 +262,9 @@ import org.yaml.snakeyaml.error.MarkedYAMLException; diff --git a/patches/server/0137-Add-UnknownCommandEvent.patch b/patches/server/0137-Add-UnknownCommandEvent.patch index a799524939..2079fe021c 100644 --- a/patches/server/0137-Add-UnknownCommandEvent.patch +++ b/patches/server/0137-Add-UnknownCommandEvent.patch @@ -78,7 +78,7 @@ index f94c0106b44d614483184e372c01c1504cb886b0..72756ef14b8ec8afd80313b9f6aaf767 return null; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 5ab2836f14e1a7482e7136004507d66c4abb4bdd..4280bd6288ce9522d041ec2dc2105d3908514a2f 100644 +index 17c1b18893f3b23dc88ee9a0029f716f51dc2446..94e1eb11c79c2019d9dbec62d730cb3abc760198 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -947,7 +947,13 @@ public final class CraftServer implements Server { diff --git a/patches/server/0141-Entity-fromMobSpawner.patch b/patches/server/0141-Entity-fromMobSpawner.patch index 0f1ce9369a..6d1c7fa9a7 100644 --- a/patches/server/0141-Entity-fromMobSpawner.patch +++ b/patches/server/0141-Entity-fromMobSpawner.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Entity#fromMobSpawner() diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 46a21ed2408a42aafd16647e17e556730e799cbd..946f289e0e681524c6fde696921965dbdedda372 100644 +index 85d8c4865b65792b99f812b579d7c23823d76e52..0e800e3aeeec84f5f7ed0a391c9b66ae5689bd40 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 SyncedDataHolder, Nameable, EntityAccess diff --git a/patches/server/0146-Fix-this-stupid-bullshit.patch b/patches/server/0146-Fix-this-stupid-bullshit.patch index 2e5a252a99..35f07c8aba 100644 --- a/patches/server/0146-Fix-this-stupid-bullshit.patch +++ b/patches/server/0146-Fix-this-stupid-bullshit.patch @@ -31,10 +31,10 @@ index 8f1992188f7fd9e735569e099b36a7eafed47aae..061c89b985dafc79c808dd5f0e296b9f Bootstrap.isBootstrapped = true; Instant instant = Instant.now(); diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index fcc7cdd0adfcaa135d08ea36746dca980590d6eb..4c8d98598b5cdcdbe4a778f1ec142e3a7ab33196 100644 +index 837db57c19df3d5c986a52edf3d9d8105cc87cde..446403f73fb1b5687d587889e6f32dce464d05a6 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java -@@ -260,10 +260,12 @@ public class Main { +@@ -249,10 +249,12 @@ public class Main { Calendar deadline = Calendar.getInstance(); deadline.add(Calendar.DAY_OF_YEAR, -14); if (buildDate.before(deadline.getTime())) { diff --git a/patches/server/0153-Expose-client-protocol-version-and-virtual-host.patch b/patches/server/0153-Expose-client-protocol-version-and-virtual-host.patch index 08669dde95..5424e5cb39 100644 --- a/patches/server/0153-Expose-client-protocol-version-and-virtual-host.patch +++ b/patches/server/0153-Expose-client-protocol-version-and-virtual-host.patch @@ -90,7 +90,7 @@ index 7ae4279768b70a4fdc8f4438898871a17c8fe402..582bbb376c75ab5bf737f3015ce8ad45 private void beginLogin(ClientIntentionPacket packet, boolean transfer) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index d471e9370fdbcbce5357e52e8ea2a10c196cd33d..f53504221e660bfe86220a8cc1ae28750794f0cf 100644 +index ccbfdfb74ccfc9d31e051e0746aa8a4ecdc4319f..5a8e6eef559a24cd2b7c99ff5303837d04447edf 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -334,6 +334,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0158-Fix-MC-117075-Block-entity-unload-lag-spike.patch b/patches/server/0158-Fix-MC-117075-Block-entity-unload-lag-spike.patch index 88b000fa9f..205723fc4e 100644 --- a/patches/server/0158-Fix-MC-117075-Block-entity-unload-lag-spike.patch +++ b/patches/server/0158-Fix-MC-117075-Block-entity-unload-lag-spike.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix MC-117075: Block entity unload lag spike diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 4fcbea7b8b12be10157da0c1f35c06e47c0334ad..ab511f4c056f07aa79aab7b662073bb8db4b1526 100644 +index 32f2516d1a1001d6a5c3f1f0fe0ffba21a9436dd..99d5271c018de1e52b6380f0b94e491ce36db61b 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java @@ -726,6 +726,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable { diff --git a/patches/server/0159-use-CB-BlockState-implementations-for-captured-block.patch b/patches/server/0159-use-CB-BlockState-implementations-for-captured-block.patch index eb8b3bd4dc..5785aa1069 100644 --- a/patches/server/0159-use-CB-BlockState-implementations-for-captured-block.patch +++ b/patches/server/0159-use-CB-BlockState-implementations-for-captured-block.patch @@ -18,7 +18,7 @@ the blockstate that will be valid for restoration, as opposed to dropping information on restoration when the event is cancelled. diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index ab511f4c056f07aa79aab7b662073bb8db4b1526..27e2718124aad69546c1d9adb9c8e69fa4a43ca7 100644 +index 99d5271c018de1e52b6380f0b94e491ce36db61b..6944c0b0cfcde9fa4dd78742aee3e3b87d679abf 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java @@ -150,7 +150,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { diff --git a/patches/server/0160-API-to-get-a-BlockState-without-a-snapshot.patch b/patches/server/0160-API-to-get-a-BlockState-without-a-snapshot.patch index c7fd071747..5997181fea 100644 --- a/patches/server/0160-API-to-get-a-BlockState-without-a-snapshot.patch +++ b/patches/server/0160-API-to-get-a-BlockState-without-a-snapshot.patch @@ -13,18 +13,18 @@ also Avoid NPE during CraftBlockEntityState load if could not get TE If Tile Entity was null, correct Sign to return empty lines instead of null diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java -index d20f71a2098b327423cbdbbc096aa9e358cb809d..7147484eefad44ba67db03b6ef2090a596e278de 100644 +index 5fada686ddb4a576ef826aed27d2c945d6ff9374..f94dab2da16bffdfd0977cf410493b8d63aaa621 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java -@@ -58,6 +58,7 @@ public abstract class BlockEntity { - this.type = type; +@@ -59,6 +59,7 @@ public abstract class BlockEntity { this.worldPosition = pos.immutable(); + this.validateBlockState(state); this.blockState = state; + this.persistentDataContainer = new CraftPersistentDataContainer(DATA_TYPE_REGISTRY); // Paper - always init } - public static BlockPos getPosFromTag(CompoundTag nbt) { -@@ -79,7 +80,7 @@ public abstract class BlockEntity { + private void validateBlockState(BlockState iblockdata) { +@@ -92,7 +93,7 @@ public abstract class BlockEntity { // CraftBukkit start - read container protected void loadAdditional(CompoundTag nbt, HolderLookup.Provider registryLookup) { @@ -33,7 +33,7 @@ index d20f71a2098b327423cbdbbc096aa9e358cb809d..7147484eefad44ba67db03b6ef2090a5 net.minecraft.nbt.Tag persistentDataTag = nbt.get("PublicBukkitValues"); if (persistentDataTag instanceof CompoundTag) { -@@ -363,8 +364,15 @@ public abstract class BlockEntity { +@@ -379,8 +380,15 @@ public abstract class BlockEntity { // CraftBukkit start - add method public InventoryHolder getOwner() { diff --git a/patches/server/0161-AsyncTabCompleteEvent.patch b/patches/server/0161-AsyncTabCompleteEvent.patch index 3f601c5fd2..1963322d8b 100644 --- a/patches/server/0161-AsyncTabCompleteEvent.patch +++ b/patches/server/0161-AsyncTabCompleteEvent.patch @@ -80,7 +80,7 @@ index 7906e163f8d03ba39480526d0293ad48534f11bf..ec80a9138260497d0deccf3ade3f44fc this.server.getCommands().getDispatcher().getCompletionSuggestions(parseresults).thenAccept((suggestions) -> { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 4280bd6288ce9522d041ec2dc2105d3908514a2f..5d8eb3b728359be5f92a255c9637d71713403cc8 100644 +index 94e1eb11c79c2019d9dbec62d730cb3abc760198..6f7aab49aaae90a2c0c78a02f62310a117d2bee6 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -2292,7 +2292,7 @@ public final class CraftServer implements Server { diff --git a/patches/server/0163-Ability-to-apply-mending-to-XP-API.patch b/patches/server/0163-Ability-to-apply-mending-to-XP-API.patch index aacf03b700..13293ace69 100644 --- a/patches/server/0163-Ability-to-apply-mending-to-XP-API.patch +++ b/patches/server/0163-Ability-to-apply-mending-to-XP-API.patch @@ -14,7 +14,7 @@ public net.minecraft.world.entity.ExperienceOrb durabilityToXp(I)I public net.minecraft.world.entity.ExperienceOrb xpToDurability(I)I diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index f53504221e660bfe86220a8cc1ae28750794f0cf..93550342c6f181b7622f5d649cd3e5075a464e55 100644 +index 5a8e6eef559a24cd2b7c99ff5303837d04447edf..4602c3d0be94f0146a2b205268f70aaf85410f20 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1638,7 +1638,41 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0164-PlayerNaturallySpawnCreaturesEvent.patch b/patches/server/0164-PlayerNaturallySpawnCreaturesEvent.patch index 2b8c16af6b..2c4ef75b4d 100644 --- a/patches/server/0164-PlayerNaturallySpawnCreaturesEvent.patch +++ b/patches/server/0164-PlayerNaturallySpawnCreaturesEvent.patch @@ -9,7 +9,7 @@ from triggering monster spawns on a server. Also a highly more effecient way to blanket block spawns in a world diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index d60c70d59d0a6ef21224c597c9015cb3f51dabb8..63bcd7698fdb86366441dacedbb616771f6b1a3d 100644 +index bb5115b3593c314f5edfb5947a3c35a489bf71af..5573a5d0d0e10e3c584e821d3e8e7ba64a41a627 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java @@ -1037,7 +1037,9 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider diff --git a/patches/server/0169-Add-ArmorStand-Item-Meta.patch b/patches/server/0169-Add-ArmorStand-Item-Meta.patch index b6aa22ecaf..554e001492 100644 --- a/patches/server/0169-Add-ArmorStand-Item-Meta.patch +++ b/patches/server/0169-Add-ArmorStand-Item-Meta.patch @@ -13,7 +13,7 @@ starting point for future additions in this area. Fixes GH-559 diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemMetas.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemMetas.java -index 85aab880fdb2f23d09096f8f2b1ede4f068fa023..4ae9930c2d74e5b1e3ad0c2ecf6556dc59cbf23c 100644 +index eef3517833ff5c0cf41b89973ebc972b8ed31e0f..c9fbc01be0b0e7fd1cafb091d06496f4ba1e7c2c 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemMetas.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemMetas.java @@ -1,5 +1,6 @@ @@ -22,8 +22,8 @@ index 85aab880fdb2f23d09096f8f2b1ede4f068fa023..4ae9930c2d74e5b1e3ad0c2ecf6556dc +import com.destroystokyo.paper.inventory.meta.ArmorStandMeta; import java.util.function.BiFunction; import java.util.function.Function; - import net.minecraft.world.item.ItemStack; -@@ -95,7 +96,7 @@ public final class CraftItemMetas { + import net.minecraft.world.item.BannerItem; +@@ -102,7 +103,7 @@ public final class CraftItemMetas { item -> new CraftMetaSpawnEgg(item.getComponentsPatch()), (type, meta) -> meta instanceof CraftMetaSpawnEgg spawnEgg ? spawnEgg : new CraftMetaSpawnEgg(meta)); @@ -272,7 +272,7 @@ index c4f12f96e39cb6189799a796b4cb2cb4f0b92392..59bdac414e8205ed608f79ef0d1502ac + // Paper end } diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java -index 99a555ca72cd95d760d68072242203deeddd0ce1..a1d8da4e0de3f84194f28d7d18fa795d53714590 100644 +index b46032190dbb0d47ee3c1a11959f6278ddf5eb5a..0715f43f3f8235d28a12b9d49d78c765a946c53f 100644 --- a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java +++ b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java @@ -364,6 +364,7 @@ public class ItemMetaTest extends AbstractTestingBase { diff --git a/patches/server/0176-Player.setPlayerProfile-API.patch b/patches/server/0176-Player.setPlayerProfile-API.patch index d847c9d191..21f5229b12 100644 --- a/patches/server/0176-Player.setPlayerProfile-API.patch +++ b/patches/server/0176-Player.setPlayerProfile-API.patch @@ -220,10 +220,10 @@ index 4602c3d0be94f0146a2b205268f70aaf85410f20..422c25577a0d95b31b5528fad8fc9b3a public void onEntityRemove(Entity entity) { this.invertedVisibilityEntities.remove(entity.getUUID()); diff --git a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java -index 8a1570ceb4755a1872911751943c84b8f06eb4c2..38339b8b1b3b70bbbf0259d7095b02ee8c22b609 100644 +index 65f64de05a88844e62b5a0dd1e2f53edfb4e0c1f..e1b86308f737b957b6d00bc902b91856694b7cbf 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java +++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java -@@ -448,6 +448,13 @@ public class Commodore { +@@ -449,6 +449,13 @@ public class Commodore { } // Paper end - Rewrite plugins diff --git a/patches/server/0177-getPlayerUniqueId-API.patch b/patches/server/0177-getPlayerUniqueId-API.patch index 8bedc69a86..444d7f80b3 100644 --- a/patches/server/0177-getPlayerUniqueId-API.patch +++ b/patches/server/0177-getPlayerUniqueId-API.patch @@ -9,7 +9,7 @@ In Offline Mode, will return an Offline UUID This is a more performant way to obtain a UUID for a name than loading an OfflinePlayer diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 5d8eb3b728359be5f92a255c9637d71713403cc8..745970d9f07ed7ca98a653bfff1b861dc4aaa177 100644 +index 6f7aab49aaae90a2c0c78a02f62310a117d2bee6..2fa82336da744b6617e55c7d8303f6d769ccefef 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -1886,6 +1886,25 @@ public final class CraftServer implements Server { diff --git a/patches/server/0181-Flag-to-disable-the-channel-limit.patch b/patches/server/0181-Flag-to-disable-the-channel-limit.patch index fa388c8eb7..d3ab6b15c3 100644 --- a/patches/server/0181-Flag-to-disable-the-channel-limit.patch +++ b/patches/server/0181-Flag-to-disable-the-channel-limit.patch @@ -9,7 +9,7 @@ e.g. servers which allow and support the usage of mod packs. provide an optional flag to disable this check, at your own risk. diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 19f644442eb7ae352d655d5e62f47f261b7b1b0a..db79201906e231b13c6f237193c3e8597bce9106 100644 +index 422c25577a0d95b31b5528fad8fc9b3ae97fa7f0..326f36726c124385145c469566c2089439b5dd0f 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -209,6 +209,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0192-WitchReadyPotionEvent.patch b/patches/server/0192-WitchReadyPotionEvent.patch index 8bbf7b47e0..ac9dc507e7 100644 --- a/patches/server/0192-WitchReadyPotionEvent.patch +++ b/patches/server/0192-WitchReadyPotionEvent.patch @@ -22,10 +22,10 @@ index a14e00d55930628333cc63b18727ea56dbdc4ee3..f6d01d21745391595d61b191832be4c2 this.setUsingItem(true); if (!this.isSilent()) { diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 50a4e657508e21717a61900660d85203d9373e19..1c53b872b30bcd8535b8686015935025a4c9837f 100644 +index 805d9ad1e1c888e1b6822a33b386733e9ddc9f2f..2969e9c471827f59de9093b75eec8440a9d31b73 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1947,4 +1947,14 @@ public class CraftEventFactory { +@@ -1961,4 +1961,14 @@ public class CraftEventFactory { ).callEvent(); } // Paper end - PlayerUseUnknownEntityEvent diff --git a/patches/server/0194-Add-EntityTeleportEndGatewayEvent.patch b/patches/server/0194-Add-EntityTeleportEndGatewayEvent.patch index 56df3551ea..45b1e736fb 100644 --- a/patches/server/0194-Add-EntityTeleportEndGatewayEvent.patch +++ b/patches/server/0194-Add-EntityTeleportEndGatewayEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add EntityTeleportEndGatewayEvent diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 946f289e0e681524c6fde696921965dbdedda372..d6017d9d71fb4b3a3df6eaa44da0ebda54c83da4 100644 +index 0e800e3aeeec84f5f7ed0a391c9b66ae5689bd40..fd49b9d739b1bbab8cf110659cb83bad03b56102 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -3301,8 +3301,16 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess diff --git a/patches/server/0202-Add-entity-knockback-events.patch b/patches/server/0202-Add-entity-knockback-events.patch index 2fa28dc910..6a5c35a153 100644 --- a/patches/server/0202-Add-entity-knockback-events.patch +++ b/patches/server/0202-Add-entity-knockback-events.patch @@ -273,10 +273,10 @@ index 6476c644d3da824c5ee4190cb45cde678ff1188f..a5f4ecb96c508b94a92a43c864c075f6 // CraftBukkit end entity.setDeltaMovement(entity.getDeltaMovement().add(vec3d1)); diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 1c53b872b30bcd8535b8686015935025a4c9837f..0888692736ef62e741aa41d3a72b9b8c3075dfcd 100644 +index 2969e9c471827f59de9093b75eec8440a9d31b73..32396531d079e18acf566bbae09426e93316fd5a 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1909,19 +1909,33 @@ public class CraftEventFactory { +@@ -1923,19 +1923,33 @@ public class CraftEventFactory { return event; } diff --git a/patches/server/0208-InventoryCloseEvent-Reason-API.patch b/patches/server/0208-InventoryCloseEvent-Reason-API.patch index 02104aa8f1..ec262fb14f 100644 --- a/patches/server/0208-InventoryCloseEvent-Reason-API.patch +++ b/patches/server/0208-InventoryCloseEvent-Reason-API.patch @@ -96,7 +96,7 @@ index 72edfb965aca81c2d2442b794b42baa04ec713b3..a954d3b0ff0917d857002dba70c54b3f this.player.doCloseContainer(); } diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 9019e25f61d4fdb7c5d12ea7630b0bc23827ab6e..38cf3cf1cc7ebae4b6ca8a89dc026b5b4f0b4c2b 100644 +index 26cee48ea3650aaf87fd2ba9c70d4ca9a88e2d87..25dee4848c8b2cff74075c6d26d384e71f706627 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -510,7 +510,7 @@ public abstract class PlayerList { @@ -178,10 +178,10 @@ index 326f36726c124385145c469566c2089439b5dd0f..0b4c5a2604f61a34b5666a9a83a2e644 // Check if the fromWorld and toWorld are the same. diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 0888692736ef62e741aa41d3a72b9b8c3075dfcd..7fa68654c2e0c87dd779a1354fc103be4d7d7a46 100644 +index 32396531d079e18acf566bbae09426e93316fd5a..ca4b0bfbd8354cfd7f7e67205568d3c30e178e97 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1277,7 +1277,7 @@ public class CraftEventFactory { +@@ -1281,7 +1281,7 @@ public class CraftEventFactory { public static AbstractContainerMenu callInventoryOpenEvent(ServerPlayer player, AbstractContainerMenu container, boolean cancelled) { if (player.containerMenu != player.inventoryMenu) { // fire INVENTORY_CLOSE if one already open @@ -190,7 +190,7 @@ index 0888692736ef62e741aa41d3a72b9b8c3075dfcd..7fa68654c2e0c87dd779a1354fc103be } CraftServer server = player.level().getCraftServer(); -@@ -1464,8 +1464,18 @@ public class CraftEventFactory { +@@ -1478,8 +1478,18 @@ public class CraftEventFactory { return event; } diff --git a/patches/server/0211-add-more-information-to-Entity.toString.patch b/patches/server/0211-add-more-information-to-Entity.toString.patch index 3fcefb7c59..b104bbec15 100644 --- a/patches/server/0211-add-more-information-to-Entity.toString.patch +++ b/patches/server/0211-add-more-information-to-Entity.toString.patch @@ -6,7 +6,7 @@ Subject: [PATCH] add more information to Entity.toString() UUID, ticks lived, valid, dead diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 629942afb41f73ca7a7855cba58c81fd0e734a7a..f431c5a17bfc3bdf2a464470af4ec5e226b0d13e 100644 +index a2b727dea997ed0d7b1ef677a94b5957f12d5abb..7fd1a75ba0068ee3ca6c29a550a9a1b33c5cacc5 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -3279,7 +3279,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess diff --git a/patches/server/0216-Option-to-prevent-armor-stands-from-doing-entity-loo.patch b/patches/server/0216-Option-to-prevent-armor-stands-from-doing-entity-loo.patch index 474a50ce86..fbe09d5031 100644 --- a/patches/server/0216-Option-to-prevent-armor-stands-from-doing-entity-loo.patch +++ b/patches/server/0216-Option-to-prevent-armor-stands-from-doing-entity-loo.patch @@ -17,7 +17,7 @@ index dae6835696e90bc5a541cacd37ea7aa88c60f4f4..1057679ceec86898a3e62bd183c6944f Iterator iterator = list.iterator(); diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 27e2718124aad69546c1d9adb9c8e69fa4a43ca7..16c244f56813479b2e51f1d883ff739949fc86e3 100644 +index 6944c0b0cfcde9fa4dd78742aee3e3b87d679abf..a9227581ec78a56e96dc3a342006e4a649906326 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java @@ -764,6 +764,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable { diff --git a/patches/server/0217-Vanished-players-don-t-have-rights.patch b/patches/server/0217-Vanished-players-don-t-have-rights.patch index b81b6e54e3..3b968cc909 100644 --- a/patches/server/0217-Vanished-players-don-t-have-rights.patch +++ b/patches/server/0217-Vanished-players-don-t-have-rights.patch @@ -89,10 +89,10 @@ index a9227581ec78a56e96dc3a342006e4a649906326..5929b450a26e7c3cf63de3dc1d0e67cb public boolean isClientSide() { return this.isClientSide; diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 7fa68654c2e0c87dd779a1354fc103be4d7d7a46..a221ae7ec1a7db9c38037fa71ea35b5309b99973 100644 +index ca4b0bfbd8354cfd7f7e67205568d3c30e178e97..c6b41f02292a624094a8663a1588e012b436bcc6 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1314,6 +1314,14 @@ public class CraftEventFactory { +@@ -1328,6 +1328,14 @@ public class CraftEventFactory { Projectile projectile = (Projectile) entity.getBukkitEntity(); org.bukkit.entity.Entity collided = position.getEntity().getBukkitEntity(); com.destroystokyo.paper.event.entity.ProjectileCollideEvent event = new com.destroystokyo.paper.event.entity.ProjectileCollideEvent(projectile, collided); diff --git a/patches/server/0221-AnvilDamageEvent.patch b/patches/server/0221-AnvilDamageEvent.patch index 6fca9fbf25..7437518ee2 100644 --- a/patches/server/0221-AnvilDamageEvent.patch +++ b/patches/server/0221-AnvilDamageEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] AnvilDamageEvent diff --git a/src/main/java/net/minecraft/world/inventory/AnvilMenu.java b/src/main/java/net/minecraft/world/inventory/AnvilMenu.java -index 1c98d1ab7159ce0061da80c83901d3dac084f3d3..c6ec9fc6ccde2a5c086a2bfe32686954c074c31d 100644 +index 4a6295c0133606131c2b2b881b4dbe7f1e3e47b0..ffda2c984c5683edb38a56f04c53b0ea339e08fc 100644 --- a/src/main/java/net/minecraft/world/inventory/AnvilMenu.java +++ b/src/main/java/net/minecraft/world/inventory/AnvilMenu.java @@ -110,6 +110,16 @@ public class AnvilMenu extends ItemCombinerMenu { diff --git a/patches/server/0222-Add-TNTPrimeEvent.patch b/patches/server/0222-Add-TNTPrimeEvent.patch index 5ce6ea7a52..1dc0962e1d 100644 --- a/patches/server/0222-Add-TNTPrimeEvent.patch +++ b/patches/server/0222-Add-TNTPrimeEvent.patch @@ -21,7 +21,7 @@ index b02a77b486f8d5eee31850de4a1b033fe6a107c7..a2cde7b1b316e43382cb1639ffccf29d this.level().removeBlock(blockposition, false); diff --git a/src/main/java/net/minecraft/world/level/block/FireBlock.java b/src/main/java/net/minecraft/world/level/block/FireBlock.java -index c7c4b04dede992991229b149b96ff6a81f499ae3..886b8d2284e3ae85184c842b24869029b9ee4ebe 100644 +index b288db03dd5385a8a9cc49a8a7d89a9fab7224a7..c1111bd8065b53cb140e4289cb72985f03e6f549 100644 --- a/src/main/java/net/minecraft/world/level/block/FireBlock.java +++ b/src/main/java/net/minecraft/world/level/block/FireBlock.java @@ -302,12 +302,19 @@ public class FireBlock extends BaseFireBlock { diff --git a/patches/server/0225-Remove-unnecessary-itemmeta-handling.patch b/patches/server/0225-Remove-unnecessary-itemmeta-handling.patch index 6a2f490da8..787fe866f3 100644 --- a/patches/server/0225-Remove-unnecessary-itemmeta-handling.patch +++ b/patches/server/0225-Remove-unnecessary-itemmeta-handling.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Remove unnecessary itemmeta handling diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index abf502b8395bb0a8a32c1fdcd62532790deb1c6e..f53ce5f063d3b7b8d3f6a3bc1165d1788c112e6d 100644 +index 1138d238caa18171b6562cc748c92cec03bfbb97..b0d0e08e81e3b87e5d4faf62e9afe9606c254115 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java @@ -165,7 +165,7 @@ public final class ItemStack implements DataComponentHolder { diff --git a/patches/server/0227-Add-Early-Warning-Feature-to-WatchDog.patch b/patches/server/0227-Add-Early-Warning-Feature-to-WatchDog.patch index 6165e2a51e..6843b0c3c4 100644 --- a/patches/server/0227-Add-Early-Warning-Feature-to-WatchDog.patch +++ b/patches/server/0227-Add-Early-Warning-Feature-to-WatchDog.patch @@ -33,7 +33,7 @@ index c466ec011d059b9960606ef2ee51ea3a3a65f8d0..baf93b5d5883d0a5c360f1a475949804 com.destroystokyo.paper.Metrics.PaperMetrics.startMetrics(); // Paper - start metrics com.destroystokyo.paper.VersionHistoryManager.INSTANCE.getClass(); // Paper - load version history now diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 745970d9f07ed7ca98a653bfff1b861dc4aaa177..274d7d7f36ce2eb38d2f630ca48b6aa4f791b0e3 100644 +index 2fa82336da744b6617e55c7d8303f6d769ccefef..a4e969a82eabc5ffdb776d1574f5b003fc19b177 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -962,6 +962,7 @@ public final class CraftServer implements Server { diff --git a/patches/server/0228-Use-ConcurrentHashMap-in-JsonList.patch b/patches/server/0228-Use-ConcurrentHashMap-in-JsonList.patch index 06ff8bd2a0..35ab668887 100644 --- a/patches/server/0228-Use-ConcurrentHashMap-in-JsonList.patch +++ b/patches/server/0228-Use-ConcurrentHashMap-in-JsonList.patch @@ -23,7 +23,7 @@ Modified isEmpty to use the isEmpty() method instead of the slightly confusing s The point of this is readability, but does have a side-benefit of a small microptimization diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 38cf3cf1cc7ebae4b6ca8a89dc026b5b4f0b4c2b..c5ca2d8feed71cdd4dce851941654768c1e5d648 100644 +index 25dee4848c8b2cff74075c6d26d384e71f706627..5fc76fd70f98fe874b38d8da08017fdadbd115e5 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -627,7 +627,7 @@ public abstract class PlayerList { diff --git a/patches/server/0235-Optimize-CraftBlockData-Creation.patch b/patches/server/0235-Optimize-CraftBlockData-Creation.patch index 8f037e052a..501971aa29 100644 --- a/patches/server/0235-Optimize-CraftBlockData-Creation.patch +++ b/patches/server/0235-Optimize-CraftBlockData-Creation.patch @@ -7,10 +7,10 @@ Avoids a hashmap lookup by cacheing a reference to the CraftBlockData and cloning it when one is needed. diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java -index 4ac248f9f5f4f7aa95ddd6e3c3dab1ce94e73d66..d02f7a547dbe8943f82c07103b1fff203e4533c2 100644 +index 59fcaca90b67c03e1a6799e58061dbae3b1f1ceb..46dd499c2023ec482ae7204d2894fb4100d9233b 100644 --- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java +++ b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java -@@ -813,6 +813,14 @@ public abstract class BlockBehaviour implements FeatureElement { +@@ -820,6 +820,14 @@ public abstract class BlockBehaviour implements FeatureElement { this.instrument = blockbase_info.instrument; this.replaceable = blockbase_info.replaceable; } diff --git a/patches/server/0242-Expose-attack-cooldown-methods-for-Player.patch b/patches/server/0242-Expose-attack-cooldown-methods-for-Player.patch index 56a5662d56..9b3beae1d3 100644 --- a/patches/server/0242-Expose-attack-cooldown-methods-for-Player.patch +++ b/patches/server/0242-Expose-attack-cooldown-methods-for-Player.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Expose attack cooldown methods for Player diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 7ad63581c7c78a7d8b78be2e95002550b3b2c222..597594409b4d1fadf4ae1c3a7156421e70989d97 100644 +index 0b4c5a2604f61a34b5666a9a83a2e644449997fd..92f9502a2d5721ebb1757a069a0f138db66628d7 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -2980,6 +2980,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0243-Improve-death-events.patch b/patches/server/0243-Improve-death-events.patch index ccf6f18a9d..771691c181 100644 --- a/patches/server/0243-Improve-death-events.patch +++ b/patches/server/0243-Improve-death-events.patch @@ -443,10 +443,10 @@ index 92f9502a2d5721ebb1757a069a0f138db66628d7..6c5bd88777ff79c7408cf5ffed0f099a public void injectScaledMaxHealth(Collection<AttributeInstance> collection, boolean force) { diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index a221ae7ec1a7db9c38037fa71ea35b5309b99973..d3baf38cf45d13eeffedcc697468842e3ac117d3 100644 +index c6b41f02292a624094a8663a1588e012b436bcc6..a329c5a5fc063f13aa2d08f2e801da86b0cf4067 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -897,9 +897,16 @@ public class CraftEventFactory { +@@ -901,9 +901,16 @@ public class CraftEventFactory { CraftLivingEntity entity = (CraftLivingEntity) victim.getBukkitEntity(); CraftDamageSource bukkitDamageSource = new CraftDamageSource(damageSource); EntityDeathEvent event = new EntityDeathEvent(entity, bukkitDamageSource, drops, victim.getExpReward(damageSource.getEntity())); @@ -463,7 +463,7 @@ index a221ae7ec1a7db9c38037fa71ea35b5309b99973..d3baf38cf45d13eeffedcc697468842e victim.expToDrop = event.getDroppedExp(); for (org.bukkit.inventory.ItemStack stack : event.getDrops()) { -@@ -917,7 +924,14 @@ public class CraftEventFactory { +@@ -921,7 +928,14 @@ public class CraftEventFactory { PlayerDeathEvent event = new PlayerDeathEvent(entity, bukkitDamageSource, drops, victim.getExpReward(damageSource.getEntity()), 0, deathMessage); event.setKeepInventory(keepInventory); event.setKeepLevel(victim.keepLevel); // SPIGOT-2222: pre-set keepLevel @@ -478,7 +478,7 @@ index a221ae7ec1a7db9c38037fa71ea35b5309b99973..d3baf38cf45d13eeffedcc697468842e victim.keepLevel = event.getKeepLevel(); victim.newLevel = event.getNewLevel(); -@@ -940,6 +954,31 @@ public class CraftEventFactory { +@@ -944,6 +958,31 @@ public class CraftEventFactory { return event; } diff --git a/patches/server/0244-Allow-chests-to-be-placed-with-NBT-data.patch b/patches/server/0244-Allow-chests-to-be-placed-with-NBT-data.patch index 7bb901ef2e..92d7a5d3fc 100644 --- a/patches/server/0244-Allow-chests-to-be-placed-with-NBT-data.patch +++ b/patches/server/0244-Allow-chests-to-be-placed-with-NBT-data.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Allow chests to be placed with NBT data diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index f53ce5f063d3b7b8d3f6a3bc1165d1788c112e6d..cc8825acea0d84b36194313656a6f70d8c049072 100644 +index b0d0e08e81e3b87e5d4faf62e9afe9606c254115..2ee949e1b0015c62499c557d5e359df4b9de6027 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java @@ -490,6 +490,7 @@ public final class ItemStack implements DataComponentHolder { diff --git a/patches/server/0267-Make-the-default-permission-message-configurable.patch b/patches/server/0267-Make-the-default-permission-message-configurable.patch index 404444d7eb..45ffed84a2 100644 --- a/patches/server/0267-Make-the-default-permission-message-configurable.patch +++ b/patches/server/0267-Make-the-default-permission-message-configurable.patch @@ -18,7 +18,7 @@ index 5b070d158760789bbcaa984426a55d20767abe4a..e1820a339452cd3388dd7cbb928c5f58 } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 274d7d7f36ce2eb38d2f630ca48b6aa4f791b0e3..c4b1e3064f3778909a2f152a69ca229f4c86b71b 100644 +index a4e969a82eabc5ffdb776d1574f5b003fc19b177..f727b7882a86b1e3f736816634ab4b61f69d1dff 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -2875,6 +2875,16 @@ public final class CraftServer implements Server { diff --git a/patches/server/0272-Replace-OfflinePlayer-getLastPlayed.patch b/patches/server/0272-Replace-OfflinePlayer-getLastPlayed.patch index 325676c465..d727421901 100644 --- a/patches/server/0272-Replace-OfflinePlayer-getLastPlayed.patch +++ b/patches/server/0272-Replace-OfflinePlayer-getLastPlayed.patch @@ -28,7 +28,7 @@ index b4947ee9615b1b2108046b9ab87b65b53dbb23f6..dbdc6b4065acc363c128580fdffe9049 public boolean queueHealthUpdatePacket; public net.minecraft.network.protocol.game.ClientboundSetHealthPacket queuedHealthUpdatePacket; diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index c5ca2d8feed71cdd4dce851941654768c1e5d648..9e8938627bfd1c45a2546e221f819e20c483a9e2 100644 +index 5fc76fd70f98fe874b38d8da08017fdadbd115e5..cdd1d8222ad1796abd0858b9ed0e2ddc9be83c93 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -182,6 +182,7 @@ public abstract class PlayerList { diff --git a/patches/server/0274-Dont-block-Player-remove-if-the-handle-is-a-custom-p.patch b/patches/server/0274-Dont-block-Player-remove-if-the-handle-is-a-custom-p.patch index 674772b619..d3ed086925 100644 --- a/patches/server/0274-Dont-block-Player-remove-if-the-handle-is-a-custom-p.patch +++ b/patches/server/0274-Dont-block-Player-remove-if-the-handle-is-a-custom-p.patch @@ -8,7 +8,7 @@ We just add a check to ensure that the CraftPlayer's handle is a ServerPlayer diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 2974f806ef677376ee2b53fccb6ca83151bb8451..80a9a4df9b1114f932badd847238c7a0a1a00941 100644 +index c3c1dff8afb9d9e27ead7c037626c97696663930..d29107105b7bc56b50864777f32420d0c7f379dc 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -224,8 +224,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0275-BlockDestroyEvent.patch b/patches/server/0275-BlockDestroyEvent.patch index 27911d5058..c156645f02 100644 --- a/patches/server/0275-BlockDestroyEvent.patch +++ b/patches/server/0275-BlockDestroyEvent.patch @@ -11,7 +11,7 @@ floating in the air. This can replace many uses of BlockPhysicsEvent diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index c0b0a9328faf93b85ceaf6cc9989f1a59520c7f4..8e2acb3c6f815b5b1d3237a2f4e0b5f3683d2c60 100644 +index 5929b450a26e7c3cf63de3dc1d0e67cb781b24c7..4c4449f7dee8695a362f83b9356e5754244fff18 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java @@ -25,6 +25,7 @@ import net.minecraft.core.registries.Registries; diff --git a/patches/server/0283-Add-PlayerPostRespawnEvent.patch b/patches/server/0283-Add-PlayerPostRespawnEvent.patch index 2babd115c1..24e7502740 100644 --- a/patches/server/0283-Add-PlayerPostRespawnEvent.patch +++ b/patches/server/0283-Add-PlayerPostRespawnEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerPostRespawnEvent diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 8f90e8cd36348089799097807ead774e186c2604..f0cc34002e260567322d7acaf803f43a8b92e563 100644 +index 79203d0e5cdb86d9e2fb22cdaeb8cf3a93e43dcc..43a3eab6959af76948d1c5803c523ed23835a85f 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -738,6 +738,10 @@ public abstract class PlayerList { diff --git a/patches/server/0287-Optimize-Captured-BlockEntity-Lookup.patch b/patches/server/0287-Optimize-Captured-BlockEntity-Lookup.patch index 24aead6840..0cbe385bec 100644 --- a/patches/server/0287-Optimize-Captured-BlockEntity-Lookup.patch +++ b/patches/server/0287-Optimize-Captured-BlockEntity-Lookup.patch @@ -10,7 +10,7 @@ Optimize to check if the captured list even has values in it, and also to just do a get call since the value can never be null. diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 8e2acb3c6f815b5b1d3237a2f4e0b5f3683d2c60..5a3a89c568d42a2adbc2b6e2631fd4b70e54f0bf 100644 +index 4c4449f7dee8695a362f83b9356e5754244fff18..60b04a16c6cb0a7109bda5c16e23c1d56ab7afad 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java @@ -912,9 +912,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable { diff --git a/patches/server/0292-Expose-the-internal-current-tick.patch b/patches/server/0292-Expose-the-internal-current-tick.patch index daef1c0510..479758b47f 100644 --- a/patches/server/0292-Expose-the-internal-current-tick.patch +++ b/patches/server/0292-Expose-the-internal-current-tick.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Expose the internal current tick diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index c4b1e3064f3778909a2f152a69ca229f4c86b71b..510013c4e15595d24cf5d3053cbb7558c2f26569 100644 +index f727b7882a86b1e3f736816634ab4b61f69d1dff..285bdabc7cb231d95e2a55684fbcfc81ed794117 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -2918,5 +2918,10 @@ public final class CraftServer implements Server { diff --git a/patches/server/0308-Optimize-call-to-getFluid-for-explosions.patch b/patches/server/0308-Optimize-call-to-getFluid-for-explosions.patch index 7c2fe736a6..c72af4f275 100644 --- a/patches/server/0308-Optimize-call-to-getFluid-for-explosions.patch +++ b/patches/server/0308-Optimize-call-to-getFluid-for-explosions.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Optimize call to getFluid for explosions diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java -index 512d79b66fed3d1bef645c3ecb59bda032c81d15..1350c8df69b4ffcf9daa73549e496627db8bc6f7 100644 +index a5f4ecb96c508b94a92a43c864c075f6c61e296e..0bb5cd94746e7a9b391d08c3efef8f5cd19ca2cf 100644 --- a/src/main/java/net/minecraft/world/level/Explosion.java +++ b/src/main/java/net/minecraft/world/level/Explosion.java @@ -193,7 +193,7 @@ public class Explosion { diff --git a/patches/server/0316-Improve-java-version-check.patch b/patches/server/0316-Improve-java-version-check.patch deleted file mode 100644 index 4bd8947722..0000000000 --- a/patches/server/0316-Improve-java-version-check.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Nassim Jahnke <[email protected]> -Date: Wed, 16 Mar 2022 13:58:16 +0100 -Subject: [PATCH] Improve java version check - -Co-Authored-By: MiniDigger <[email protected]> - -diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index 8245b38d37b4cee6f4e7b61d7af40a18e54a3f43..e226eda5efc0e45e59cb5f6251ed008b67d5299a 100644 ---- a/src/main/java/org/bukkit/craftbukkit/Main.java -+++ b/src/main/java/org/bukkit/craftbukkit/Main.java -@@ -203,23 +203,27 @@ public class Main { - return; - } - -+ // Paper start - Improve java version check -+ boolean skip = Boolean.getBoolean("Paper.IgnoreJavaVersion"); - float javaVersion = Float.parseFloat(System.getProperty("java.class.version")); -- if (javaVersion < 61.0) { -- System.err.println("Unsupported Java detected (" + javaVersion + "). This version of Minecraft requires at least Java 17. Check your Java version with the command 'java -version'."); -- return; -- } -- if (javaVersion > 66.0) { -- System.err.println("Unsupported Java detected (" + javaVersion + "). Only up to Java 22 is supported."); -+ boolean isOldVersion = javaVersion < 61.0; -+ if (!skip && isOldVersion) { -+ System.err.println("Unsupported Java detected (" + javaVersion + "). This version of Minecraft requires at least Java 21. Check your Java version with the command 'java -version'. For more info see https://docs.papermc.io/misc/java-install"); - return; - } - String javaVersionName = System.getProperty("java.version"); - // J2SE SDK/JRE Version String Naming Convention - boolean isPreRelease = javaVersionName.contains("-"); -- if (isPreRelease && javaVersion == 61.0) { -- System.err.println("Unsupported Java detected (" + javaVersionName + "). You are running an outdated, pre-release version. Only general availability versions of Java are supported. Please update your Java version."); -+ if (!skip && isPreRelease) { -+ System.err.println("Unsupported Java detected (" + javaVersionName + "). You are running an unsupported, non official, version. Only general availability versions of Java are supported. Please update your Java version. See https://docs.papermc.io/paper/faq#unsupported-java-detected-what-do-i-do for more information."); - return; - } - -+ if (skip && (isOldVersion || isPreRelease)) { -+ System.err.println("Unsupported Java detected ("+ javaVersionName + "), but the check was skipped. Proceed with caution! "); -+ } -+ // Paper end - Improve java version check -+ - try { - // Paper start - Handled by TerminalConsoleAppender - /* diff --git a/patches/server/0316-Remove-java-version-check.patch b/patches/server/0316-Remove-java-version-check.patch new file mode 100644 index 0000000000..3573462717 --- /dev/null +++ b/patches/server/0316-Remove-java-version-check.patch @@ -0,0 +1,24 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Nassim Jahnke <[email protected]> +Date: Wed, 16 Mar 2022 13:58:16 +0100 +Subject: [PATCH] Remove java version check + +Co-Authored-By: MiniDigger <[email protected]> + +diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java +index 446403f73fb1b5687d587889e6f32dce464d05a6..4746f12128928d4fce77bdd96849bedbb47cef0b 100644 +--- a/src/main/java/org/bukkit/craftbukkit/Main.java ++++ b/src/main/java/org/bukkit/craftbukkit/Main.java +@@ -203,11 +203,7 @@ public class Main { + return; + } + +- float javaVersion = Float.parseFloat(System.getProperty("java.class.version")); +- if (javaVersion > 66.0) { +- System.err.println("Unsupported Java detected (" + javaVersion + "). Only up to Java 22 is supported."); +- return; +- } ++ // Paper - remove java version check + + try { + // Paper start - Handled by TerminalConsoleAppender diff --git a/patches/server/0321-add-hand-to-BlockMultiPlaceEvent.patch b/patches/server/0321-add-hand-to-BlockMultiPlaceEvent.patch index a80da71d1f..1945d0aa8a 100644 --- a/patches/server/0321-add-hand-to-BlockMultiPlaceEvent.patch +++ b/patches/server/0321-add-hand-to-BlockMultiPlaceEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] add hand to BlockMultiPlaceEvent diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index d3baf38cf45d13eeffedcc697468842e3ac117d3..3ba695a29dcf9e7137dae16835e6f7a375d560f7 100644 +index a329c5a5fc063f13aa2d08f2e801da86b0cf4067..917f1b43b5a5ac23e390dad54afb56a83a05a20a 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -406,13 +406,18 @@ public class CraftEventFactory { +@@ -410,13 +410,18 @@ public class CraftEventFactory { } org.bukkit.inventory.ItemStack item; diff --git a/patches/server/0325-Optimise-Chunk-getFluid.patch b/patches/server/0325-Optimise-Chunk-getFluid.patch index 0e2e9cccd5..8142952ce6 100644 --- a/patches/server/0325-Optimise-Chunk-getFluid.patch +++ b/patches/server/0325-Optimise-Chunk-getFluid.patch @@ -8,7 +8,7 @@ faster on its own, however removing the try catch makes it easier to inline due to code size diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -index a0f9fb2ac15f2fa51a3bbe915550155ac2e76649..c7be1f8fdca34bcc12ecbe40ee5f426e0cd068d7 100644 +index 6775217c065026aa61fce56a17c93010209b6941..59f9ff720e92c69e11afe7f6ccecd81b0e54a74d 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java @@ -270,18 +270,20 @@ public class LevelChunk extends ChunkAccess { diff --git a/patches/server/0327-Add-tick-times-API-and-mspt-command.patch b/patches/server/0327-Add-tick-times-API-and-mspt-command.patch index 5e6a428135..22290805e9 100644 --- a/patches/server/0327-Add-tick-times-API-and-mspt-command.patch +++ b/patches/server/0327-Add-tick-times-API-and-mspt-command.patch @@ -184,7 +184,7 @@ index 3ffb330a16797c04694f73b0cd9f5b38a07641b4..ff73167bfe210305491e35f18adc2755 + // Paper end - Add tick times API and /mspt command } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 510013c4e15595d24cf5d3053cbb7558c2f26569..a6564ddf47d50b618627680a55b6546bf6d9eab9 100644 +index 285bdabc7cb231d95e2a55684fbcfc81ed794117..3f8076d077844e272e544a600f8f63611674ac62 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -2689,6 +2689,16 @@ public final class CraftServer implements Server { diff --git a/patches/server/0328-Expose-MinecraftServer-isRunning.patch b/patches/server/0328-Expose-MinecraftServer-isRunning.patch index f31f5711df..ec3e02234c 100644 --- a/patches/server/0328-Expose-MinecraftServer-isRunning.patch +++ b/patches/server/0328-Expose-MinecraftServer-isRunning.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Expose MinecraftServer#isRunning This allows for plugins to detect if the server is actually turning off in onDisable rather than just plugins reloading. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index a6564ddf47d50b618627680a55b6546bf6d9eab9..6707e213d9bd2b173928b1e9dae87c403342953b 100644 +index 3f8076d077844e272e544a600f8f63611674ac62..7b0f0777dd20c5fd1813fabf8d34bc99659be9d2 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -2933,5 +2933,10 @@ public final class CraftServer implements Server { diff --git a/patches/server/0329-Add-Raw-Byte-ItemStack-Serialization.patch b/patches/server/0329-Add-Raw-Byte-ItemStack-Serialization.patch index f6d20a8f29..fe8bfe79ba 100644 --- a/patches/server/0329-Add-Raw-Byte-ItemStack-Serialization.patch +++ b/patches/server/0329-Add-Raw-Byte-ItemStack-Serialization.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Add Raw Byte ItemStack Serialization Serializes using NBT which is safer for server data migrations than bukkits format. diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index e091356ee1fa3ec09839de6ef5c450824ea40844..e6bca66597b9b5a15d911760b44641e17e42e521 100644 +index d08b01fef9928f2239c8663cf90219dc7acad58c..af706146a26ede6b9f5a39c8deb490ff25334ae6 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java @@ -458,6 +458,53 @@ public final class CraftMagicNumbers implements UnsafeValues { diff --git a/patches/server/0333-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch b/patches/server/0333-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch index 8b8acb0b21..2ab532b2d0 100644 --- a/patches/server/0333-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch +++ b/patches/server/0333-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch @@ -7,7 +7,7 @@ Suspected case would be around the technique used in .stopRiding Stack will identify any causer of this and warn instead of crashing. diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 6159ab8831a233c21aad48c64ef76b06c1955bb0..ee3a5b2f2f1591f68bbacea01b8eafed65c29356 100644 +index ee54706b36bd227edacea2a1b6099009bd652039..8206ec366b429858d9582e437781191e5aa0fa02 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java @@ -1241,6 +1241,13 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider diff --git a/patches/server/0336-Don-t-move-existing-players-to-world-spawn.patch b/patches/server/0336-Don-t-move-existing-players-to-world-spawn.patch index aaa9cf191b..ebf4e981df 100644 --- a/patches/server/0336-Don-t-move-existing-players-to-world-spawn.patch +++ b/patches/server/0336-Don-t-move-existing-players-to-world-spawn.patch @@ -35,7 +35,7 @@ index 613eefeb44beb35181243b570bad631f15802918..9b6887f40dea57d4b5e2f08d7645b1ed this.gameMode.setLevel((ServerLevel) world); } diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index f0cc34002e260567322d7acaf803f43a8b92e563..8b0c098c795c5a57fce96ad5d98ac8436024cda9 100644 +index 43a3eab6959af76948d1c5803c523ed23835a85f..0d8a7b00aa681d79ba82c69c4683a5bbb656c9dd 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -226,6 +226,7 @@ public abstract class PlayerList { diff --git a/patches/server/0339-Reduce-memory-footprint-of-CompoundTag.patch b/patches/server/0339-Reduce-memory-footprint-of-CompoundTag.patch index 55111ab6e8..c29c346e90 100644 --- a/patches/server/0339-Reduce-memory-footprint-of-CompoundTag.patch +++ b/patches/server/0339-Reduce-memory-footprint-of-CompoundTag.patch @@ -8,7 +8,7 @@ is important because we clone chunk data after reading it for safety. So, reduce the impact of the clone on GC. diff --git a/src/main/java/net/minecraft/nbt/CompoundTag.java b/src/main/java/net/minecraft/nbt/CompoundTag.java -index 1cbc42c44911b71dfadebc2d60e0e5cb9b6cafe6..df246d69591e1a5822a0109c99b0f67996da71fa 100644 +index d721ae6d9b54cbace5b7ade657e9739fc7c42d14..e88161e662d5605b50aead673c9b3794874e5f7f 100644 --- a/src/main/java/net/minecraft/nbt/CompoundTag.java +++ b/src/main/java/net/minecraft/nbt/CompoundTag.java @@ -49,7 +49,7 @@ public class CompoundTag implements Tag { diff --git a/patches/server/0344-Fire-PlayerJoinEvent-when-Player-is-actually-ready.patch b/patches/server/0344-Fire-PlayerJoinEvent-when-Player-is-actually-ready.patch index f99c0af332..1e3acfce4b 100644 --- a/patches/server/0344-Fire-PlayerJoinEvent-when-Player-is-actually-ready.patch +++ b/patches/server/0344-Fire-PlayerJoinEvent-when-Player-is-actually-ready.patch @@ -31,7 +31,7 @@ delays anymore. public net.minecraft.server.level.ChunkMap addEntity(Lnet/minecraft/world/entity/Entity;)V diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index ee3a5b2f2f1591f68bbacea01b8eafed65c29356..bac8e53cab360142f224965e68d8f9e6ae0c15f6 100644 +index 8206ec366b429858d9582e437781191e5aa0fa02..d91279f3bd009e1542e73354aadd6a16c80965e2 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java @@ -1248,6 +1248,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider @@ -55,7 +55,7 @@ index a794131746c6cfdcbeeb64b31fb122a38be085c1..f0103bcfb29b9fed41c7642620d78fe7 // CraftBukkit end public boolean isRealPlayer; // Paper diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 8b0c098c795c5a57fce96ad5d98ac8436024cda9..ed0ffff1cfc25f66e1947e40008c6c7259b17019 100644 +index 0d8a7b00aa681d79ba82c69c4683a5bbb656c9dd..01362d092a5b170ce5c334422d7797f190666e25 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -297,6 +297,12 @@ public abstract class PlayerList { diff --git a/patches/server/0347-Don-t-fire-BlockFade-on-worldgen-threads.patch b/patches/server/0347-Don-t-fire-BlockFade-on-worldgen-threads.patch index 8a262c1f35..a909ceca12 100644 --- a/patches/server/0347-Don-t-fire-BlockFade-on-worldgen-threads.patch +++ b/patches/server/0347-Don-t-fire-BlockFade-on-worldgen-threads.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Don't fire BlockFade on worldgen threads diff --git a/src/main/java/net/minecraft/world/level/block/FireBlock.java b/src/main/java/net/minecraft/world/level/block/FireBlock.java -index 886b8d2284e3ae85184c842b24869029b9ee4ebe..ceaa2a7048afc4955d3695af5291e83a79d83c5d 100644 +index c1111bd8065b53cb140e4289cb72985f03e6f549..9db6df5f28be559a324ead2fcfbe189eac076e2e 100644 --- a/src/main/java/net/minecraft/world/level/block/FireBlock.java +++ b/src/main/java/net/minecraft/world/level/block/FireBlock.java @@ -108,6 +108,7 @@ public class FireBlock extends BaseFireBlock { diff --git a/patches/server/0349-Fix-item-duplication-and-teleport-issues.patch b/patches/server/0349-Fix-item-duplication-and-teleport-issues.patch index 9e2640a497..b75e43919b 100644 --- a/patches/server/0349-Fix-item-duplication-and-teleport-issues.patch +++ b/patches/server/0349-Fix-item-duplication-and-teleport-issues.patch @@ -124,10 +124,10 @@ index 92bb0c63330ad3a4cb13b2dc655020714e9b1ffd..cc1189c2d7dc57ba8f29aad4ba5d2a07 } } diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 3ba695a29dcf9e7137dae16835e6f7a375d560f7..e0cbef395c479da40dc7079835f0eae1ee122da1 100644 +index 917f1b43b5a5ac23e390dad54afb56a83a05a20a..eb57f2f44d78ccef88ce739d219ba2d04b001f0f 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -899,6 +899,11 @@ public class CraftEventFactory { +@@ -903,6 +903,11 @@ public class CraftEventFactory { } public static EntityDeathEvent callEntityDeathEvent(net.minecraft.world.entity.LivingEntity victim, DamageSource damageSource, List<org.bukkit.inventory.ItemStack> drops) { @@ -139,7 +139,7 @@ index 3ba695a29dcf9e7137dae16835e6f7a375d560f7..e0cbef395c479da40dc7079835f0eae1 CraftLivingEntity entity = (CraftLivingEntity) victim.getBukkitEntity(); CraftDamageSource bukkitDamageSource = new CraftDamageSource(damageSource); EntityDeathEvent event = new EntityDeathEvent(entity, bukkitDamageSource, drops, victim.getExpReward(damageSource.getEntity())); -@@ -913,11 +918,13 @@ public class CraftEventFactory { +@@ -917,11 +922,13 @@ public class CraftEventFactory { playDeathSound(victim, event); // Paper end victim.expToDrop = event.getDroppedExp(); diff --git a/patches/server/0352-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch b/patches/server/0352-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch index a52cf1acdb..d947dbd02e 100644 --- a/patches/server/0352-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch +++ b/patches/server/0352-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch @@ -17,7 +17,7 @@ keeping long lived large direct buffers in cache. Set system properly at server startup if not set already to help protect from this. diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index e226eda5efc0e45e59cb5f6251ed008b67d5299a..b9b93a4e20eed028b76eab4dcb9610ae05f22faf 100644 +index 4746f12128928d4fce77bdd96849bedbb47cef0b..73225bc20d7aae0ad2a62b3500e76a8f460b5aad 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -27,6 +27,7 @@ public class Main { diff --git a/patches/server/0353-misc-debugging-dumps.patch b/patches/server/0353-misc-debugging-dumps.patch index 5eab4a7f76..51357a8884 100644 --- a/patches/server/0353-misc-debugging-dumps.patch +++ b/patches/server/0353-misc-debugging-dumps.patch @@ -105,7 +105,7 @@ index 5457358bc76889153036818fdfd70a043ec4e40f..880e5c52746e9e3a9a1f42ec6461be54 this.connection.disconnect(ServerConfigurationPacketListenerImpl.DISCONNECT_REASON_INVALID_DATA); } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 6707e213d9bd2b173928b1e9dae87c403342953b..b36d62380a939a0b777fecf1472645f148289a6c 100644 +index 7b0f0777dd20c5fd1813fabf8d34bc99659be9d2..9699d15f1194af7a565504cbae5aa9e3743665ec 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -1047,6 +1047,7 @@ public final class CraftServer implements Server { diff --git a/patches/server/0355-Implement-Mob-Goal-API.patch b/patches/server/0355-Implement-Mob-Goal-API.patch index 40df29d023..940e3b1ee1 100644 --- a/patches/server/0355-Implement-Mob-Goal-API.patch +++ b/patches/server/0355-Implement-Mob-Goal-API.patch @@ -780,7 +780,7 @@ index 6667ecc4b7eded4e20a415cef1e1b1179e6710b8..16f9a98b8a939e5ca7e2dc04f87134a7 LOOK, JUMP, diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index b36d62380a939a0b777fecf1472645f148289a6c..d3cdb5feb1656249fee14885b1f01c1c0b40ab8e 100644 +index 9699d15f1194af7a565504cbae5aa9e3743665ec..0b87d9c3fb7e2442798faacdd49d3fd368e64b7d 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -2939,5 +2939,11 @@ public final class CraftServer implements Server { diff --git a/patches/server/0357-ExperienceOrb-merging-stacking-API-and-fixes.patch b/patches/server/0357-ExperienceOrb-merging-stacking-API-and-fixes.patch index 4afcd62001..f495155bdb 100644 --- a/patches/server/0357-ExperienceOrb-merging-stacking-API-and-fixes.patch +++ b/patches/server/0357-ExperienceOrb-merging-stacking-API-and-fixes.patch @@ -77,10 +77,10 @@ index 5a7d314ec0562e472f5dc45924a7b24841cff126..650e4a01cecc4cc08e7ff9ebcc4c3670 public java.util.UUID getTriggerEntityId() { return getHandle().triggerEntityId; diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index e0cbef395c479da40dc7079835f0eae1ee122da1..ec364ab90df6276c1976e876337636f4bb06d097 100644 +index eb57f2f44d78ccef88ce739d219ba2d04b001f0f..ef062fdfd63a056811557d6234b10c10701dfe74 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -708,15 +708,29 @@ public class CraftEventFactory { +@@ -712,15 +712,29 @@ public class CraftEventFactory { if (entity instanceof net.minecraft.world.entity.ExperienceOrb xp) { double radius = world.spigotConfig.expMerge; if (radius > 0) { diff --git a/patches/server/0360-Wait-for-Async-Tasks-during-shutdown.patch b/patches/server/0360-Wait-for-Async-Tasks-during-shutdown.patch index 5e30eed559..86d1266b2e 100644 --- a/patches/server/0360-Wait-for-Async-Tasks-during-shutdown.patch +++ b/patches/server/0360-Wait-for-Async-Tasks-during-shutdown.patch @@ -22,7 +22,7 @@ index 1088a91ee131d1c303961557d8fb90101c2d8d3b..2d25ba18d3db4b3eea8bd30812656f1a // CraftBukkit end if (io.papermc.paper.plugin.PluginInitializerManager.instance().pluginRemapper != null) io.papermc.paper.plugin.PluginInitializerManager.instance().pluginRemapper.shutdown(); // Paper - Plugin remapping diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index d3cdb5feb1656249fee14885b1f01c1c0b40ab8e..c2ccd10efd5096b2683fe235de1e8176ee7d2083 100644 +index 0b87d9c3fb7e2442798faacdd49d3fd368e64b7d..1b3f1b06155e114cd5ab76a406c1b4e745ef58c6 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -1058,6 +1058,32 @@ public final class CraftServer implements Server { diff --git a/patches/server/0375-Fix-Per-World-Difficulty-Remembering-Difficulty.patch b/patches/server/0375-Fix-Per-World-Difficulty-Remembering-Difficulty.patch index 5da6c94c5d..16b5312233 100644 --- a/patches/server/0375-Fix-Per-World-Difficulty-Remembering-Difficulty.patch +++ b/patches/server/0375-Fix-Per-World-Difficulty-Remembering-Difficulty.patch @@ -89,7 +89,7 @@ index 01def06cf90faaf67421b6e5a87f4c47dd4c1142..9f28c9f2e8f8323aa374c2ac5e7610b8 } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index c2ccd10efd5096b2683fe235de1e8176ee7d2083..ebe69ce183b8bba43ed4d6fdbac09fdc1eaaa988 100644 +index 1b3f1b06155e114cd5ab76a406c1b4e745ef58c6..52e8664f8d0368daed43e349aa67e3b295697f26 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -996,8 +996,8 @@ public final class CraftServer implements Server { diff --git a/patches/server/0378-Add-Plugin-Tickets-to-API-Chunk-Methods.patch b/patches/server/0378-Add-Plugin-Tickets-to-API-Chunk-Methods.patch index 13fc9119a3..c709376967 100644 --- a/patches/server/0378-Add-Plugin-Tickets-to-API-Chunk-Methods.patch +++ b/patches/server/0378-Add-Plugin-Tickets-to-API-Chunk-Methods.patch @@ -22,7 +22,7 @@ wants it to collect even faster, they can restore that setting back to 1 instead Not adding it to .getType() though to keep behavior consistent with vanilla for performance reasons. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index ebe69ce183b8bba43ed4d6fdbac09fdc1eaaa988..8efa537503ec52de17918e2e99d01015df8bf62a 100644 +index 52e8664f8d0368daed43e349aa67e3b295697f26..9c022b16d143cff10015936af8f4b157b5173079 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -380,7 +380,7 @@ public final class CraftServer implements Server { diff --git a/patches/server/0379-Add-BlockStateMeta-clearBlockState.patch b/patches/server/0379-Add-BlockStateMeta-clearBlockState.patch index 802f698e6f..ecafb80ec5 100644 --- a/patches/server/0379-Add-BlockStateMeta-clearBlockState.patch +++ b/patches/server/0379-Add-BlockStateMeta-clearBlockState.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add BlockStateMeta#clearBlockState diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java -index 80ace77a9b11d63a1b2271c868c59711f5d2f89d..4faada5f974214f3054dc1bec9c79e2600c8df48 100644 +index 301d883a7626e3abd222517400367fc40d6fa2bd..23dbc56edf0d16cf07ced2899942abae28397694 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java -@@ -195,6 +195,13 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta +@@ -198,6 +198,13 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta return this.blockEntityTag != null; } @@ -22,3 +22,30 @@ index 80ace77a9b11d63a1b2271c868c59711f5d2f89d..4faada5f974214f3054dc1bec9c79e26 @Override public BlockState getBlockState() { return (this.blockEntityTag != null) ? this.blockEntityTag.copy() : CraftMetaBlockState.getBlockState(this.material, null); +diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaShield.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaShield.java +index 3542c6e72f5ff459d50b73fa210ea835f52dfa49..2ad744875fea490eb8aa3883e4567ec1824c811a 100644 +--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaShield.java ++++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaShield.java +@@ -7,8 +7,10 @@ import java.util.ArrayList; + import java.util.List; + import java.util.Map; + import net.minecraft.core.BlockPos; ++import net.minecraft.core.component.DataComponentMap; + import net.minecraft.core.component.DataComponentPatch; + import net.minecraft.core.component.DataComponents; ++import net.minecraft.world.item.component.CustomData; + import net.minecraft.world.level.block.entity.BannerPatternLayers; + import org.bukkit.DyeColor; + import org.bukkit.Material; +@@ -298,4 +300,11 @@ public class CraftMetaShield extends CraftMetaItem implements ShieldMeta, BlockS + default -> throw new IllegalArgumentException("Unknown banner colour"); + }; + } ++ ++ // Paper start - add method to clear block state ++ @Override ++ public void clearBlockState() { ++ this.banner = null; ++ } ++ // Paper end - add method to clear block state + } diff --git a/patches/server/0380-Convert-legacy-attributes-in-Item-Meta.patch b/patches/server/0380-Convert-legacy-attributes-in-Item-Meta.patch index b929596c4e..76437f1a9b 100644 --- a/patches/server/0380-Convert-legacy-attributes-in-Item-Meta.patch +++ b/patches/server/0380-Convert-legacy-attributes-in-Item-Meta.patch @@ -30,10 +30,10 @@ index de40e522960469b98f987bd688489740446d9f85..5678d2007d5adf45dec0638c5dd848b6 public CraftAttributeMap(AttributeMap handle) { this.handle = handle; diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index 69be26f8f47854f39cfed0559d944ef4f983c0f3..0b87cfbdf039ee5bc017d2b1783c7c4853047952 100644 +index 97c40582bca095532fff9a81515f38ea4ac527e0..5c76ba7f9ceb285d27e18369172612205be96224 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -@@ -695,7 +695,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -702,7 +702,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { AttributeModifier attribMod = CraftAttributeInstance.convert(nmsModifier); diff --git a/patches/server/0384-Add-PrepareResultEvent.patch b/patches/server/0384-Add-PrepareResultEvent.patch index 05484fe151..b291b52929 100644 --- a/patches/server/0384-Add-PrepareResultEvent.patch +++ b/patches/server/0384-Add-PrepareResultEvent.patch @@ -8,7 +8,7 @@ Adds a new event for all crafting stations that generate a result slot item Anvil, Grindstone and Smithing now extend this event diff --git a/src/main/java/net/minecraft/world/inventory/AnvilMenu.java b/src/main/java/net/minecraft/world/inventory/AnvilMenu.java -index c6ec9fc6ccde2a5c086a2bfe32686954c074c31d..7198dc9ffc9a37dab3654e12aa497c442a9993c5 100644 +index ffda2c984c5683edb38a56f04c53b0ea339e08fc..d685511104ac552dfc9ae2111e1bfb60fa812102 100644 --- a/src/main/java/net/minecraft/world/inventory/AnvilMenu.java +++ b/src/main/java/net/minecraft/world/inventory/AnvilMenu.java @@ -327,6 +327,7 @@ public class AnvilMenu extends ItemCombinerMenu { @@ -56,7 +56,7 @@ index 62432c347b86fc79ab529a7dde66bef32d0424dd..be840717e180b6b5abd14db6cc926334 } diff --git a/src/main/java/net/minecraft/world/inventory/LoomMenu.java b/src/main/java/net/minecraft/world/inventory/LoomMenu.java -index fb7027985c6442fc50573e96031a05a3c64f4426..4bd720a97da27c4fd97788d4c504c0174f0f6c25 100644 +index 69ed0753c224cb7746762b4b94c4d79d608951b8..2de558dd205a1078fdcac1bce256d059b9bf5d5f 100644 --- a/src/main/java/net/minecraft/world/inventory/LoomMenu.java +++ b/src/main/java/net/minecraft/world/inventory/LoomMenu.java @@ -249,7 +249,8 @@ public class LoomMenu extends AbstractContainerMenu { @@ -82,7 +82,7 @@ index 0735705def4f9505b7f16df2497cc78bbf5a8373..86e51fcce767d265ee0d3beb611be211 @Override diff --git a/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java b/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java -index 04d9793a83c724350f74616558f650082f9805d9..bb29107cb15e2ec644a14cabb3cf91f4bde5471d 100644 +index 30ea1f9e97db86a2ad7baeea4f5a76c821874daa..5b4f03128499b0c1a4b8c5f5ccd17e4bdb391e81 100644 --- a/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java +++ b/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java @@ -182,6 +182,7 @@ public class StonecutterMenu extends AbstractContainerMenu { @@ -94,13 +94,13 @@ index 04d9793a83c724350f74616558f650082f9805d9..bb29107cb15e2ec644a14cabb3cf91f4 private static SingleRecipeInput createRecipeInput(Container inventory) { diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index ec364ab90df6276c1976e876337636f4bb06d097..3159e52006ad348bfce4905dcb0987222e4894a5 100644 +index ef062fdfd63a056811557d6234b10c10701dfe74..7840d5b3aeb93ca33476438cd5c7dd9725404d13 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1666,6 +1666,12 @@ public class CraftEventFactory { +@@ -1680,6 +1680,12 @@ public class CraftEventFactory { } - public static PrepareAnvilEvent callPrepareAnvilEvent(InventoryView view, ItemStack item) { + public static PrepareAnvilEvent callPrepareAnvilEvent(AnvilView view, ItemStack item) { + // Paper start - Add PrepareResultEvent + if (true) { + view.getTopInventory().setItem(net.minecraft.world.inventory.AnvilMenu.RESULT_SLOT, CraftItemStack.asCraftMirror(item)); @@ -110,7 +110,7 @@ index ec364ab90df6276c1976e876337636f4bb06d097..3159e52006ad348bfce4905dcb098722 PrepareAnvilEvent event = new PrepareAnvilEvent(view, CraftItemStack.asCraftMirror(item).clone()); event.getView().getPlayer().getServer().getPluginManager().callEvent(event); event.getInventory().setItem(2, event.getResult()); -@@ -1673,6 +1679,12 @@ public class CraftEventFactory { +@@ -1687,6 +1693,12 @@ public class CraftEventFactory { } public static PrepareGrindstoneEvent callPrepareGrindstoneEvent(InventoryView view, ItemStack item) { @@ -123,7 +123,7 @@ index ec364ab90df6276c1976e876337636f4bb06d097..3159e52006ad348bfce4905dcb098722 PrepareGrindstoneEvent event = new PrepareGrindstoneEvent(view, CraftItemStack.asCraftMirror(item).clone()); event.getView().getPlayer().getServer().getPluginManager().callEvent(event); event.getInventory().setItem(2, event.getResult()); -@@ -1680,12 +1692,39 @@ public class CraftEventFactory { +@@ -1694,12 +1706,39 @@ public class CraftEventFactory { } public static PrepareSmithingEvent callPrepareSmithingEvent(InventoryView view, ItemStack item) { @@ -146,7 +146,7 @@ index ec364ab90df6276c1976e876337636f4bb06d097..3159e52006ad348bfce4905dcb098722 + org.bukkit.inventory.ItemStack origItem = view.getTopInventory().getItem(resultSlot); + CraftItemStack result = origItem != null ? CraftItemStack.asCraftCopy(origItem) : null; + if (view.getTopInventory() instanceof org.bukkit.inventory.AnvilInventory) { -+ event = new PrepareAnvilEvent(view, result); ++ event = new PrepareAnvilEvent((AnvilView) view, result); + } else if (view.getTopInventory() instanceof org.bukkit.inventory.GrindstoneInventory) { + event = new PrepareGrindstoneEvent(view, result); + } else if (view.getTopInventory() instanceof org.bukkit.inventory.SmithingInventory) { diff --git a/patches/server/0400-Prevent-headless-pistons-from-being-created.patch b/patches/server/0400-Prevent-headless-pistons-from-being-created.patch index e375acc68a..7eb350ffb7 100644 --- a/patches/server/0400-Prevent-headless-pistons-from-being-created.patch +++ b/patches/server/0400-Prevent-headless-pistons-from-being-created.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Prevent headless pistons from being created Prevent headless pistons from being created by explosions or tree/mushroom growth. diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java -index 1350c8df69b4ffcf9daa73549e496627db8bc6f7..69914a048987c21ee2ed2c489aab269862fda8f2 100644 +index 0bb5cd94746e7a9b391d08c3efef8f5cd19ca2cf..0add20466890db9d2af7c595806d5e767b7ee117 100644 --- a/src/main/java/net/minecraft/world/level/Explosion.java +++ b/src/main/java/net/minecraft/world/level/Explosion.java @@ -207,6 +207,15 @@ public class Explosion { diff --git a/patches/server/0401-Add-BellRingEvent.patch b/patches/server/0401-Add-BellRingEvent.patch index 934d70c696..9ab5e53fee 100644 --- a/patches/server/0401-Add-BellRingEvent.patch +++ b/patches/server/0401-Add-BellRingEvent.patch @@ -7,10 +7,10 @@ Add a new event, BellRingEvent, to trigger whenever a player rings a village bell. Passes along the bell block and the player who rang it. diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 3159e52006ad348bfce4905dcb0987222e4894a5..c803948c713fa898430f478dddfb2a75f6d355ef 100644 +index 7840d5b3aeb93ca33476438cd5c7dd9725404d13..38c0a81d9b31559844169e0a5f3e9e0a9d41ffd4 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -372,10 +372,11 @@ public class CraftEventFactory { +@@ -376,10 +376,11 @@ public class CraftEventFactory { return tradeSelectEvent; } diff --git a/patches/server/0405-PortalCreateEvent-needs-to-know-its-entity.patch b/patches/server/0405-PortalCreateEvent-needs-to-know-its-entity.patch index 2a196acb45..2f586b0c34 100644 --- a/patches/server/0405-PortalCreateEvent-needs-to-know-its-entity.patch +++ b/patches/server/0405-PortalCreateEvent-needs-to-know-its-entity.patch @@ -4,115 +4,30 @@ Date: Fri, 21 Aug 2020 20:57:54 +0200 Subject: [PATCH] PortalCreateEvent needs to know its entity -diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index cc8825acea0d84b36194313656a6f70d8c049072..7f7445a2b68fd2e6e5fcd509d950a0f8d680c1fe 100644 ---- a/src/main/java/net/minecraft/world/item/ItemStack.java -+++ b/src/main/java/net/minecraft/world/item/ItemStack.java -@@ -522,7 +522,7 @@ public final class ItemStack implements DataComponentHolder { - net.minecraft.world.level.block.state.BlockState block = world.getBlockState(newblockposition); - - if (!(block.getBlock() instanceof BaseEntityBlock)) { // Containers get placed automatically -- block.onPlace(world, newblockposition, oldBlock, true); -+ block.onPlace(world, newblockposition, oldBlock, true, context); // Paper - pass context - } - - world.notifyAndUpdatePhysics(newblockposition, null, oldBlock, block, world.getBlockState(newblockposition), updateFlag, 512); // send null chunk as chunk.k() returns false by this point -diff --git a/src/main/java/net/minecraft/world/level/block/BaseFireBlock.java b/src/main/java/net/minecraft/world/level/block/BaseFireBlock.java -index e499a5eb843af3e2417bcb31add3c63443c0deff..993538f613e52ecd009f01e7b68fddba76b6a3e8 100644 ---- a/src/main/java/net/minecraft/world/level/block/BaseFireBlock.java -+++ b/src/main/java/net/minecraft/world/level/block/BaseFireBlock.java -@@ -144,12 +144,19 @@ public abstract class BaseFireBlock extends Block { - - @Override - protected void onPlace(BlockState state, Level world, BlockPos pos, BlockState oldState, boolean notify) { -+ // Paper start - UseOnContext param -+ this.onPlace(state, world, pos, oldState, notify, null); -+ } -+ -+ @Override -+ protected void onPlace(BlockState state, Level world, BlockPos pos, BlockState oldState, boolean notify, @javax.annotation.Nullable net.minecraft.world.item.context.UseOnContext context) { -+ // Paper end - UseOnContext param - if (!oldState.is(state.getBlock())) { - if (BaseFireBlock.inPortalDimension(world)) { - Optional<PortalShape> optional = PortalShape.findEmptyPortalShape(world, pos, Direction.Axis.X); - - if (optional.isPresent()) { -- ((PortalShape) optional.get()).createPortalBlocks(); -+ ((PortalShape) optional.get()).createPortalBlocks(context); // Paper - pass context param - return; - } - } -diff --git a/src/main/java/net/minecraft/world/level/block/FireBlock.java b/src/main/java/net/minecraft/world/level/block/FireBlock.java -index ceaa2a7048afc4955d3695af5291e83a79d83c5d..5dad1aa26a8908cba6a08398a4bad27f31d4c2c0 100644 ---- a/src/main/java/net/minecraft/world/level/block/FireBlock.java -+++ b/src/main/java/net/minecraft/world/level/block/FireBlock.java -@@ -368,8 +368,10 @@ public class FireBlock extends BaseFireBlock { - } - - @Override -- protected void onPlace(BlockState state, Level world, BlockPos pos, BlockState oldState, boolean notify) { -- super.onPlace(state, world, pos, oldState, notify); -+ // Paper start - UseOnContext param -+ protected void onPlace(BlockState state, Level world, BlockPos pos, BlockState oldState, boolean notify, net.minecraft.world.item.context.UseOnContext context) { -+ super.onPlace(state, world, pos, oldState, notify, context); -+ // Paper end - UseOnContext param - world.scheduleTick(pos, (Block) this, FireBlock.getFireTickDelay(world.random)); - } - -diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java -index 34f03184f018d00be7c5884f29f98a9ebe461475..6fe078fdf619c4df664f1dce6a0f5d202c21b35e 100644 ---- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java -+++ b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java -@@ -154,6 +154,12 @@ public abstract class BlockBehaviour implements FeatureElement { - DebugPackets.sendNeighborsUpdatePacket(world, pos); - } - -+ // Paper start - UseOnContext param -+ protected void onPlace(BlockState state, Level world, BlockPos pos, BlockState oldState, boolean notify, net.minecraft.world.item.context.UseOnContext context) { -+ this.onPlace(state, world, pos, oldState, notify); -+ } -+ // Paper end - UseOnContext param -+ - protected void onPlace(BlockState state, Level world, BlockPos pos, BlockState oldState, boolean notify) { - org.spigotmc.AsyncCatcher.catchOp("block onPlace"); // Spigot - } -@@ -1080,6 +1086,12 @@ public abstract class BlockBehaviour implements FeatureElement { - this.getBlock().updateIndirectNeighbourShapes(this.asState(), world, pos, flags, maxUpdateDepth); - } - -+ // Paper start -+ public void onPlace(Level world, BlockPos pos, BlockState state, boolean notify, net.minecraft.world.item.context.UseOnContext context) { -+ this.getBlock().onPlace(this.asState(), world, pos, state, notify, context); -+ } -+ // Paper end -+ - public void onPlace(Level world, BlockPos pos, BlockState state, boolean notify) { - this.getBlock().onPlace(this.asState(), world, pos, state, notify); - } diff --git a/src/main/java/net/minecraft/world/level/portal/PortalShape.java b/src/main/java/net/minecraft/world/level/portal/PortalShape.java -index bb22b12b05de29bed00e433630c91f233fa9a366..57139a0b8adcd1ea25cd100be78402681856ee75 100644 +index 86d95edc7dd1e42b4b38eba1177cd508e72e4fc4..b2561207336336de92bf2cc609e4f1b1106cc5d5 100644 --- a/src/main/java/net/minecraft/world/level/portal/PortalShape.java +++ b/src/main/java/net/minecraft/world/level/portal/PortalShape.java -@@ -189,7 +189,14 @@ public class PortalShape { +@@ -188,7 +188,14 @@ public class PortalShape { } - // CraftBukkit start - return boolean + // CraftBukkit start - return boolean, add entity + @io.papermc.paper.annotation.DoNotUse @Deprecated // Paper - public boolean createPortalBlocks() { + public boolean createPortalBlocks(Entity entity) { + // Paper start - UseOnContext param -+ return this.createPortalBlocks(null); ++ return this.createPortalBlocks(entity, null); + } + -+ public boolean createPortalBlocks(@Nullable net.minecraft.world.item.context.UseOnContext useOnContext) { ++ public boolean createPortalBlocks(Entity entity, @Nullable net.minecraft.world.item.context.UseOnContext useOnContext) { + // Paper end - UseOnContext param org.bukkit.World bworld = this.level.getMinecraftWorld().getWorld(); // Copy below for loop -@@ -199,7 +206,7 @@ public class PortalShape { +@@ -198,7 +205,7 @@ public class PortalShape { this.blocks.setBlock(blockposition, iblockdata, 18); }); -- PortalCreateEvent event = new PortalCreateEvent((java.util.List<org.bukkit.block.BlockState>) (java.util.List) this.blocks.getList(), bworld, null, PortalCreateEvent.CreateReason.FIRE); +- PortalCreateEvent event = new PortalCreateEvent((java.util.List<org.bukkit.block.BlockState>) (java.util.List) this.blocks.getList(), bworld, (entity == null) ? null : entity.getBukkitEntity(), PortalCreateEvent.CreateReason.FIRE); + PortalCreateEvent event = new PortalCreateEvent((java.util.List<org.bukkit.block.BlockState>) (java.util.List) blocks.getList(), bworld, useOnContext == null || useOnContext.getPlayer() == null ? null : useOnContext.getPlayer().getBukkitEntity(), PortalCreateEvent.CreateReason.FIRE); // Paper - pass entity param this.level.getMinecraftWorld().getServer().server.getPluginManager().callEvent(event); diff --git a/patches/server/0414-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch b/patches/server/0414-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch index 2162c250c9..33daf2a5fd 100644 --- a/patches/server/0414-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch +++ b/patches/server/0414-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch @@ -21,7 +21,7 @@ index 8a1014d7181b493a24692271aa9c561c159801d3..14ef888ef46a873046a286e25e923d98 + // Paper end - Expose entity id counter } diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index e6bca66597b9b5a15d911760b44641e17e42e521..2979277847635c0bef54d06be30e5051557cc5e9 100644 +index af706146a26ede6b9f5a39c8deb490ff25334ae6..a557b40e1807933cf510ea489ebcab4a19c066c1 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java @@ -505,6 +505,11 @@ public final class CraftMagicNumbers implements UnsafeValues { diff --git a/patches/server/0423-Retain-block-place-order-when-capturing-blockstates.patch b/patches/server/0423-Retain-block-place-order-when-capturing-blockstates.patch index e7d46e41eb..bac1a1074b 100644 --- a/patches/server/0423-Retain-block-place-order-when-capturing-blockstates.patch +++ b/patches/server/0423-Retain-block-place-order-when-capturing-blockstates.patch @@ -10,7 +10,7 @@ In general, look at making this logic more robust (i.e properly handling cases where a captured entry is overriden) - but for now this will do. diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 5a3a89c568d42a2adbc2b6e2631fd4b70e54f0bf..cfd5d3e50197b38d0ffef6debbb7f5b4b208382a 100644 +index 60b04a16c6cb0a7109bda5c16e23c1d56ab7afad..144d243e0d6ba3ae3f0b0bf457fa516e2b4f416f 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java @@ -152,7 +152,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { diff --git a/patches/server/0427-Add-getOfflinePlayerIfCached-String.patch b/patches/server/0427-Add-getOfflinePlayerIfCached-String.patch index 31066c85a1..368490ced4 100644 --- a/patches/server/0427-Add-getOfflinePlayerIfCached-String.patch +++ b/patches/server/0427-Add-getOfflinePlayerIfCached-String.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add getOfflinePlayerIfCached(String) diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 8efa537503ec52de17918e2e99d01015df8bf62a..856de462a5a92d00896b5454244014eae2cdbf24 100644 +index 9c022b16d143cff10015936af8f4b157b5173079..75fe99d8ec74435cf62b427d6bed89c76c0cf6d9 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -1963,6 +1963,28 @@ public final class CraftServer implements Server { diff --git a/patches/server/0430-Fix-client-lag-on-advancement-loading.patch b/patches/server/0430-Fix-client-lag-on-advancement-loading.patch index 80a48d30b1..62630304af 100644 --- a/patches/server/0430-Fix-client-lag-on-advancement-loading.patch +++ b/patches/server/0430-Fix-client-lag-on-advancement-loading.patch @@ -15,7 +15,7 @@ manually reload the advancement data for all players, which normally takes place as a part of the datapack reloading. diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 22fc5bf2024f70f85cc278ddd374bff0a6d626fa..12c4f68623119427a30c1eec28b4aff0400aa8c0 100644 +index a557b40e1807933cf510ea489ebcab4a19c066c1..481aeb922952578ea68ce2425c84e1a93eff0cf9 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java @@ -317,7 +317,13 @@ public final class CraftMagicNumbers implements UnsafeValues { diff --git a/patches/server/0433-Add-API-for-quit-reason.patch b/patches/server/0433-Add-API-for-quit-reason.patch index 6a3fe2a2e8..22a6ea3114 100644 --- a/patches/server/0433-Add-API-for-quit-reason.patch +++ b/patches/server/0433-Add-API-for-quit-reason.patch @@ -52,7 +52,7 @@ index a3c67bdc2c08b3550534f37d15b0db90b479e34f..24bf661e76fb421a8be565d9ea68edf7 this.connection.disconnect(disconnectiondetails); })); diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 51426da5f3e7b9f8631880a04cef0a58b00233df..ec080eb8e3930b6c5cc08c3061535b379a99a7d1 100644 +index c322d8284b4d17d6b9a949d85849892d7c88817e..f11309e0a067546aa5b14272156087664dbdd021 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -570,7 +570,7 @@ public abstract class PlayerList { diff --git a/patches/server/0436-Fix-Player-spawnParticle-x-y-z-precision-loss.patch b/patches/server/0436-Fix-Player-spawnParticle-x-y-z-precision-loss.patch index 60ac65b823..ed356df971 100644 --- a/patches/server/0436-Fix-Player-spawnParticle-x-y-z-precision-loss.patch +++ b/patches/server/0436-Fix-Player-spawnParticle-x-y-z-precision-loss.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix Player spawnParticle x/y/z precision loss diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 99799563942693ae36188092d76054fdff97d4ca..766242aa6930b37630be77e421b4b5675c5feb0d 100644 +index 1292e7b9889777448b728ef3bb3ae4cb25d42d61..a3b1a19fb28dfba93ae04ea0859f744ede1579f6 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -2707,7 +2707,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0449-Add-OBSTRUCTED-reason-to-BedEnterResult.patch b/patches/server/0449-Add-OBSTRUCTED-reason-to-BedEnterResult.patch index 5affb3e4f5..8015466e6d 100644 --- a/patches/server/0449-Add-OBSTRUCTED-reason-to-BedEnterResult.patch +++ b/patches/server/0449-Add-OBSTRUCTED-reason-to-BedEnterResult.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add OBSTRUCTED reason to BedEnterResult diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index c803948c713fa898430f478dddfb2a75f6d355ef..21c8dcf66847c83f38b57a592cf3b58a68a5657f 100644 +index 38c0a81d9b31559844169e0a5f3e9e0a9d41ffd4..43bfdd928548022503af8fbab9f61a0cd843baae 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -307,6 +307,10 @@ public class CraftEventFactory { +@@ -311,6 +311,10 @@ public class CraftEventFactory { return BedEnterResult.TOO_FAR_AWAY; case NOT_SAFE: return BedEnterResult.NOT_SAFE; diff --git a/patches/server/0466-Add-BlockFailedDispenseEvent.patch b/patches/server/0466-Add-BlockFailedDispenseEvent.patch index 835b80d34d..85cb37f45c 100644 --- a/patches/server/0466-Add-BlockFailedDispenseEvent.patch +++ b/patches/server/0466-Add-BlockFailedDispenseEvent.patch @@ -20,7 +20,7 @@ index c7256ffbe57c594556ee85134c9ab166f8c0e0c7..94bcbaf7daf7dfe566f508d1170a4339 ItemStack itemstack = tileentitydispenser.getItem(i); DispenseItemBehavior idispensebehavior = this.getDispenseMethod(world, itemstack); diff --git a/src/main/java/net/minecraft/world/level/block/DropperBlock.java b/src/main/java/net/minecraft/world/level/block/DropperBlock.java -index a1599eae0d8e9f0298fc6996ad03b0d6ba78f04f..083ddfb8fffa04dad6eeca2274f290a08e62b5eb 100644 +index a08e8571f3a83afc80c2f1758a9029cd28ed6947..91b514967405115f22edf4255775361a672e5c2f 100644 --- a/src/main/java/net/minecraft/world/level/block/DropperBlock.java +++ b/src/main/java/net/minecraft/world/level/block/DropperBlock.java @@ -60,6 +60,7 @@ public class DropperBlock extends DispenserBlock { @@ -32,10 +32,10 @@ index a1599eae0d8e9f0298fc6996ad03b0d6ba78f04f..083ddfb8fffa04dad6eeca2274f290a0 } else { ItemStack itemstack = tileentitydispenser.getItem(i); diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 21c8dcf66847c83f38b57a592cf3b58a68a5657f..19ca8953facd69a5720652c3bcf1e1e3be34a3a3 100644 +index 43bfdd928548022503af8fbab9f61a0cd843baae..82cba73ba0d0d34716c2849c41676c26a6f53048 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -2098,4 +2098,12 @@ public class CraftEventFactory { +@@ -2112,4 +2112,12 @@ public class CraftEventFactory { return org.bukkit.craftbukkit.inventory.CraftItemStack.asNMSCopy(event.getPotion()); } // Paper end - WitchReadyPotionEvent diff --git a/patches/server/0467-Add-PlayerLecternPageChangeEvent.patch b/patches/server/0467-Add-PlayerLecternPageChangeEvent.patch index 2e62d2becf..15052d962d 100644 --- a/patches/server/0467-Add-PlayerLecternPageChangeEvent.patch +++ b/patches/server/0467-Add-PlayerLecternPageChangeEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerLecternPageChangeEvent diff --git a/src/main/java/net/minecraft/world/inventory/LecternMenu.java b/src/main/java/net/minecraft/world/inventory/LecternMenu.java -index 19858ecd7cfaaf0fb09552292bf573bb02b3a6ec..ccba06c419732c63f6b255f5f8c1f7a95f3ecbee 100644 +index 1b3119751617366cf753008d38be566cd7ee2453..df4ae5d37b9aa5b8fb26c5773a47a5a85f831982 100644 --- a/src/main/java/net/minecraft/world/inventory/LecternMenu.java +++ b/src/main/java/net/minecraft/world/inventory/LecternMenu.java @@ -64,6 +64,7 @@ public class LecternMenu extends AbstractContainerMenu { diff --git a/patches/server/0468-Add-PlayerLoomPatternSelectEvent.patch b/patches/server/0468-Add-PlayerLoomPatternSelectEvent.patch index 4d74c20681..fbbc2f6ae8 100644 --- a/patches/server/0468-Add-PlayerLoomPatternSelectEvent.patch +++ b/patches/server/0468-Add-PlayerLoomPatternSelectEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerLoomPatternSelectEvent diff --git a/src/main/java/net/minecraft/world/inventory/LoomMenu.java b/src/main/java/net/minecraft/world/inventory/LoomMenu.java -index 4bd720a97da27c4fd97788d4c504c0174f0f6c25..72ad78659a373213ed1f37498754adaf18f1f68b 100644 +index 2de558dd205a1078fdcac1bce256d059b9bf5d5f..f76ef029132c6a08d4e70585bc440eccdc626b16 100644 --- a/src/main/java/net/minecraft/world/inventory/LoomMenu.java +++ b/src/main/java/net/minecraft/world/inventory/LoomMenu.java @@ -174,8 +174,32 @@ public class LoomMenu extends AbstractContainerMenu { diff --git a/patches/server/0472-Fix-villager-boat-exploit.patch b/patches/server/0472-Fix-villager-boat-exploit.patch index 8f9249892b..e835b1ee94 100644 --- a/patches/server/0472-Fix-villager-boat-exploit.patch +++ b/patches/server/0472-Fix-villager-boat-exploit.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix villager boat exploit diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index ec080eb8e3930b6c5cc08c3061535b379a99a7d1..846132dad557b04a3d52184cfb1c0dd35673f8c6 100644 +index f11309e0a067546aa5b14272156087664dbdd021..44422100246a61f8353f26d5149f3e96c8832fea 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -595,6 +595,14 @@ public abstract class PlayerList { diff --git a/patches/server/0473-Add-sendOpLevel-API.patch b/patches/server/0473-Add-sendOpLevel-API.patch index 25dff52343..d1c8e24cc4 100644 --- a/patches/server/0473-Add-sendOpLevel-API.patch +++ b/patches/server/0473-Add-sendOpLevel-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add sendOpLevel API diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 846132dad557b04a3d52184cfb1c0dd35673f8c6..5100b2d00452f97849239ca32164eed4345e4024 100644 +index 44422100246a61f8353f26d5149f3e96c8832fea..3c7d31725c4a5dd7728fa394f88d37a0e493e919 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -1062,6 +1062,11 @@ public abstract class PlayerList { @@ -32,7 +32,7 @@ index 846132dad557b04a3d52184cfb1c0dd35673f8c6..5100b2d00452f97849239ca32164eed4 public boolean isWhiteListed(GameProfile profile) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 766242aa6930b37630be77e421b4b5675c5feb0d..7652da85170cd5a64d1b443430b85c388e2939a9 100644 +index a3b1a19fb28dfba93ae04ea0859f744ede1579f6..963ae66acc25602e15134d30d3e496802b17dc41 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -677,6 +677,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0474-Add-RegistryAccess-for-managing-Registries.patch b/patches/server/0474-Add-RegistryAccess-for-managing-Registries.patch index 1c7e1f531e..4652577439 100644 --- a/patches/server/0474-Add-RegistryAccess-for-managing-Registries.patch +++ b/patches/server/0474-Add-RegistryAccess-for-managing-Registries.patch @@ -12,10 +12,10 @@ public net.minecraft.server.RegistryLayer STATIC_ACCESS diff --git a/src/main/java/io/papermc/paper/registry/PaperRegistries.java b/src/main/java/io/papermc/paper/registry/PaperRegistries.java new file mode 100644 -index 0000000000000000000000000000000000000000..ead718efde812846fefec3e86d896fef7deb3d97 +index 0000000000000000000000000000000000000000..183a649cadcf96f2ecca18fef9b93f0176febeab --- /dev/null +++ b/src/main/java/io/papermc/paper/registry/PaperRegistries.java -@@ -0,0 +1,141 @@ +@@ -0,0 +1,144 @@ +package io.papermc.paper.registry; + +import io.papermc.paper.adventure.PaperAdventure; @@ -35,10 +35,12 @@ index 0000000000000000000000000000000000000000..ead718efde812846fefec3e86d896fef +import org.bukkit.Keyed; +import org.bukkit.MusicInstrument; +import org.bukkit.block.BlockType; ++import org.bukkit.block.banner.PatternType; +import org.bukkit.craftbukkit.CraftGameEvent; +import org.bukkit.craftbukkit.CraftJukeboxSong; +import org.bukkit.craftbukkit.CraftMusicInstrument; +import org.bukkit.craftbukkit.block.CraftBlockType; ++import org.bukkit.craftbukkit.block.banner.CraftPatternType; +import org.bukkit.craftbukkit.damage.CraftDamageType; +import org.bukkit.craftbukkit.enchantments.CraftEnchantment; +import org.bukkit.craftbukkit.entity.CraftCat; @@ -93,6 +95,7 @@ index 0000000000000000000000000000000000000000..ead718efde812846fefec3e86d896fef + entry(Registries.VILLAGER_PROFESSION, RegistryKey.VILLAGER_PROFESSION, Villager.Profession.class, CraftVillager.CraftProfession::new), + entry(Registries.VILLAGER_TYPE, RegistryKey.VILLAGER_TYPE, Villager.Type.class, CraftVillager.CraftType::new), + entry(Registries.MAP_DECORATION_TYPE, RegistryKey.MAP_DECORATION_TYPE, MapCursor.Type.class, CraftMapCursor.CraftType::new), ++ entry(Registries.BANNER_PATTERN, RegistryKey.BANNER_PATTERN, PatternType.class, CraftPatternType::new), + + // data-drivens + entry(Registries.STRUCTURE, RegistryKey.STRUCTURE, Structure.class, CraftStructure::new).delayed(), @@ -727,10 +730,10 @@ index 1dd22f11b7e2983a3069dea94c0f02b43ff1f736..397bdacab9517354875ebc0bc68d3505 String string = Registries.elementsDirPath(type.registryKey()); SimpleJsonResourceReloadListener.scanDirectory(resourceManager, string, GSON, map); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java b/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java -index 10ce6b9f748b69283e03454e9b1ed0b7df379a17..002449e66f83a419afa8357d2e7192670eaf869e 100644 +index a9832482500f08df30568ecbc65e4496ee01b414..21d104d07e86c7961b8de56403c9d4004a79ba27 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java -@@ -118,75 +118,12 @@ public class CraftRegistry<B extends Keyed, M> implements Registry<B> { +@@ -120,78 +120,10 @@ public class CraftRegistry<B extends Keyed, M> implements Registry<B> { + ", this can happen if a plugin creates its own registry entry with out properly registering it."); } @@ -796,11 +799,13 @@ index 10ce6b9f748b69283e03454e9b1ed0b7df379a17..002449e66f83a419afa8357d2e719267 - if (bukkitClass == MapCursor.Type.class) { - return new CraftRegistry<>(MapCursor.Type.class, registryHolder.registryOrThrow(Registries.MAP_DECORATION_TYPE), CraftMapCursor.CraftType::new, FieldRename.NONE); - } +- if (bukkitClass == PatternType.class) { +- return new CraftRegistry<>(PatternType.class, registryHolder.registryOrThrow(Registries.BANNER_PATTERN), CraftPatternType::new, FieldRename.NONE); +- } - - return null; - } -+ // Paper - move to PaperRegistries - +- + // Paper - NOTE: As long as all uses of the method below relate to *serialization* via ConfigurationSerializable, it's fine public static <B extends Keyed> B get(Registry<B> bukkit, NamespacedKey namespacedKey, ApiVersion apiVersion) { if (bukkit instanceof CraftRegistry<B, ?> craft) { @@ -809,7 +814,7 @@ index 10ce6b9f748b69283e03454e9b1ed0b7df379a17..002449e66f83a419afa8357d2e719267 } if (bukkit instanceof Registry.SimpleRegistry<?> simple) { -@@ -212,23 +149,21 @@ public class CraftRegistry<B extends Keyed, M> implements Registry<B> { +@@ -217,23 +149,21 @@ public class CraftRegistry<B extends Keyed, M> implements Registry<B> { return bukkit.get(namespacedKey); } @@ -839,7 +844,7 @@ index 10ce6b9f748b69283e03454e9b1ed0b7df379a17..002449e66f83a419afa8357d2e719267 @Override public B get(NamespacedKey namespacedKey) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 856de462a5a92d00896b5454244014eae2cdbf24..a29f4992f7927d0f241962f972dd13ce77094d97 100644 +index 75fe99d8ec74435cf62b427d6bed89c76c0cf6d9..f79af6910c4c83f1c56bc73434846f3e5270509f 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -281,7 +281,7 @@ public final class CraftServer implements Server { @@ -893,10 +898,10 @@ index 1f58b92c17d28e14621e8dc28042a5368f1f4a1f..ef80e6b4dff557daaab1b9fde4d8d401 // PatternType private static final FieldRenameData PATTERN_TYPE_DATA = FieldRenameData.Builder.newBuilder() diff --git a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java -index 38339b8b1b3b70bbbf0259d7095b02ee8c22b609..9fffb9c9161caad8eb62a99b37d0f31862b568a5 100644 +index e1b86308f737b957b6d00bc902b91856694b7cbf..0cb2b616e0fa060b7aae6c47502f75ee7647e917 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java +++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java -@@ -189,20 +189,10 @@ public class Commodore { +@@ -190,20 +190,10 @@ public class Commodore { public static byte[] convert(byte[] b, final String pluginName, final ApiVersion pluginVersion, final Set<String> activeCompatibilities) { final boolean modern = pluginVersion.isNewerThanOrSameAs(ApiVersion.FLATTENING); @@ -917,7 +922,7 @@ index 38339b8b1b3b70bbbf0259d7095b02ee8c22b609..9fffb9c9161caad8eb62a99b37d0f318 visitor = io.papermc.paper.pluginremap.reflect.ReflectionRemapper.visitor(visitor); // Paper cr.accept(new ClassRemapper(new ClassVisitor(Opcodes.ASM9, visitor) { -@@ -269,15 +259,6 @@ public class Commodore { +@@ -270,15 +260,6 @@ public class Commodore { @Override public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { @@ -1157,7 +1162,7 @@ index bfbd80b60ac5df500d03c80de57e38aa7548dd46..cce9e2226ef554c10e1df1dbaa179165 when(instance.getTag(any(), any(), any())).then(mock -> { String registry = mock.getArgument(0); diff --git a/src/test/java/org/bukkit/support/provider/RegistriesArgumentProvider.java b/src/test/java/org/bukkit/support/provider/RegistriesArgumentProvider.java -index b4d2546094a154af8fca2f63d02090ed9cb355a5..38b0e091234a00d57e9e9d4fb3eac6afb7343477 100644 +index 9d6c3d91b505a683b353577bf39f869173243459..c1f886c906a9f9313d97a223f719095fa2624c57 100644 --- a/src/test/java/org/bukkit/support/provider/RegistriesArgumentProvider.java +++ b/src/test/java/org/bukkit/support/provider/RegistriesArgumentProvider.java @@ -1,6 +1,7 @@ @@ -1168,7 +1173,7 @@ index b4d2546094a154af8fca2f63d02090ed9cb355a5..38b0e091234a00d57e9e9d4fb3eac6af import java.util.List; import java.util.stream.Stream; import net.minecraft.core.registries.Registries; -@@ -56,34 +57,34 @@ public class RegistriesArgumentProvider implements ArgumentsProvider { +@@ -59,35 +60,34 @@ public class RegistriesArgumentProvider implements ArgumentsProvider { private static final List<Arguments> DATA = Lists.newArrayList(); static { @@ -1191,6 +1196,8 @@ index b4d2546094a154af8fca2f63d02090ed9cb355a5..38b0e091234a00d57e9e9d4fb3eac6af - register(Frog.Variant.class, Registries.FROG_VARIANT, CraftFrog.CraftVariant.class, FrogVariant.class); - register(Cat.Type.class, Registries.CAT_VARIANT, CraftCat.CraftType.class, CatVariant.class); - register(MapCursor.Type.class, Registries.MAP_DECORATION_TYPE, CraftMapCursor.CraftType.class, MapDecorationType.class); +- register(PatternType.class, Registries.BANNER_PATTERN, CraftPatternType.class, BannerPattern.class); +- + // Order: RegistryKey, Bukkit class, Minecraft Registry key, CraftBukkit class, Minecraft class + register(RegistryKey.ENCHANTMENT, Enchantment.class, Registries.ENCHANTMENT, CraftEnchantment.class, net.minecraft.world.item.enchantment.Enchantment.class); + register(RegistryKey.GAME_EVENT, GameEvent.class, Registries.GAME_EVENT, CraftGameEvent.class, net.minecraft.world.level.gameevent.GameEvent.class); @@ -1210,7 +1217,7 @@ index b4d2546094a154af8fca2f63d02090ed9cb355a5..38b0e091234a00d57e9e9d4fb3eac6af + register(RegistryKey.FROG_VARIANT, Frog.Variant.class, Registries.FROG_VARIANT, CraftFrog.CraftVariant.class, FrogVariant.class); + register(RegistryKey.CAT_VARIANT, Cat.Type.class, Registries.CAT_VARIANT, CraftCat.CraftType.class, CatVariant.class); + register(RegistryKey.MAP_DECORATION_TYPE, MapCursor.Type.class, Registries.MAP_DECORATION_TYPE, CraftMapCursor.CraftType.class, MapDecorationType.class); - ++ register(RegistryKey.BANNER_PATTERN, PatternType.class, Registries.BANNER_PATTERN, CraftPatternType.class, BannerPattern.class); } - private static void register(Class bukkit, ResourceKey registry, Class craft, Class minecraft) { diff --git a/patches/server/0481-Add-BlockPreDispenseEvent.patch b/patches/server/0481-Add-BlockPreDispenseEvent.patch index a1d2d79f35..0330e5c8e0 100644 --- a/patches/server/0481-Add-BlockPreDispenseEvent.patch +++ b/patches/server/0481-Add-BlockPreDispenseEvent.patch @@ -17,7 +17,7 @@ index 94bcbaf7daf7dfe566f508d1170a433930d9d49a..f6edfea463b3725d3a79aca38825e86d tileentitydispenser.setItem(i, idispensebehavior.dispense(sourceblock, itemstack)); } diff --git a/src/main/java/net/minecraft/world/level/block/DropperBlock.java b/src/main/java/net/minecraft/world/level/block/DropperBlock.java -index 083ddfb8fffa04dad6eeca2274f290a08e62b5eb..45fafee2cf1893dccf477939dad05e9e1938ec8c 100644 +index 91b514967405115f22edf4255775361a672e5c2f..ddecf443df3679e3098eb54edd19585a0512e342 100644 --- a/src/main/java/net/minecraft/world/level/block/DropperBlock.java +++ b/src/main/java/net/minecraft/world/level/block/DropperBlock.java @@ -71,6 +71,7 @@ public class DropperBlock extends DispenserBlock { @@ -29,10 +29,10 @@ index 083ddfb8fffa04dad6eeca2274f290a08e62b5eb..45fafee2cf1893dccf477939dad05e9e } else { // CraftBukkit start - Fire event when pushing items into other inventories diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 19ca8953facd69a5720652c3bcf1e1e3be34a3a3..5c511fe60bf59ca1fe773b8c9c39bc88eebf2752 100644 +index 82cba73ba0d0d34716c2849c41676c26a6f53048..bf8c7e633d05534feb58bae0570db7c2a5453861 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -2105,5 +2105,11 @@ public class CraftEventFactory { +@@ -2119,5 +2119,11 @@ public class CraftEventFactory { io.papermc.paper.event.block.BlockFailedDispenseEvent event = new io.papermc.paper.event.block.BlockFailedDispenseEvent(block); return event.callEvent(); } diff --git a/patches/server/0482-Add-PlayerChangeBeaconEffectEvent.patch b/patches/server/0482-Add-PlayerChangeBeaconEffectEvent.patch index b3444419ee..1903c21ba8 100644 --- a/patches/server/0482-Add-PlayerChangeBeaconEffectEvent.patch +++ b/patches/server/0482-Add-PlayerChangeBeaconEffectEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerChangeBeaconEffectEvent diff --git a/src/main/java/net/minecraft/world/inventory/BeaconMenu.java b/src/main/java/net/minecraft/world/inventory/BeaconMenu.java -index c2fa423e14fc08c10483415baa2148af269c3758..5b6133f6758d322713321b7e918db0c3e0d4be51 100644 +index 7c4d2c184d9a1e4a1856e6771d39db384381e300..396559c281eee9e8c677cb222721414e8d9e12a2 100644 --- a/src/main/java/net/minecraft/world/inventory/BeaconMenu.java +++ b/src/main/java/net/minecraft/world/inventory/BeaconMenu.java @@ -171,12 +171,25 @@ public class BeaconMenu extends AbstractContainerMenu { diff --git a/patches/server/0484-Add-PlayerStonecutterRecipeSelectEvent.patch b/patches/server/0484-Add-PlayerStonecutterRecipeSelectEvent.patch index ec46b8f54b..0c96d8fa15 100644 --- a/patches/server/0484-Add-PlayerStonecutterRecipeSelectEvent.patch +++ b/patches/server/0484-Add-PlayerStonecutterRecipeSelectEvent.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Add PlayerStonecutterRecipeSelectEvent Co-Authored-By: MiniDigger <[email protected]> diff --git a/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java b/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java -index bb29107cb15e2ec644a14cabb3cf91f4bde5471d..977ccef3c9fa7685209f3eca894a3b69501ebcc1 100644 +index 5b4f03128499b0c1a4b8c5f5ccd17e4bdb391e81..37e75c02c374314372630f4bda0b92519809f2a4 100644 --- a/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java +++ b/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java @@ -64,7 +64,7 @@ public class StonecutterMenu extends AbstractContainerMenu { diff --git a/patches/server/0485-Expand-EntityUnleashEvent.patch b/patches/server/0485-Expand-EntityUnleashEvent.patch index b83bd1bb30..cacb1fa3ea 100644 --- a/patches/server/0485-Expand-EntityUnleashEvent.patch +++ b/patches/server/0485-Expand-EntityUnleashEvent.patch @@ -121,10 +121,10 @@ index 3c0af74ed65610b1d5e3b72fdcf28c5a3423f0da..01173fc7177d78588978e087e63efda0 flag1 = true; } diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 5c511fe60bf59ca1fe773b8c9c39bc88eebf2752..204c6ef33725eee1c582fdbc4e29caface0f27e9 100644 +index bf8c7e633d05534feb58bae0570db7c2a5453861..c76c09f5d1450652d111aa2d06d82fd52b8095ef 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1583,8 +1583,10 @@ public class CraftEventFactory { +@@ -1597,8 +1597,10 @@ public class CraftEventFactory { Bukkit.getPluginManager().callEvent(new PlayerRecipeBookSettingsChangeEvent(player.getBukkitEntity(), bukkitType, open, filter)); } diff --git a/patches/server/0491-Allow-adding-items-to-BlockDropItemEvent.patch b/patches/server/0491-Allow-adding-items-to-BlockDropItemEvent.patch index e58287a5fb..7685b26644 100644 --- a/patches/server/0491-Allow-adding-items-to-BlockDropItemEvent.patch +++ b/patches/server/0491-Allow-adding-items-to-BlockDropItemEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Allow adding items to BlockDropItemEvent diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 204c6ef33725eee1c582fdbc4e29caface0f27e9..3d64a514b4932bf80953b8e18b0fc9fd14868021 100644 +index c76c09f5d1450652d111aa2d06d82fd52b8095ef..9db2f92c784bb31812297e1e1040aff7114466c6 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -456,13 +456,30 @@ public class CraftEventFactory { +@@ -460,13 +460,30 @@ public class CraftEventFactory { } public static void handleBlockDropItemEvent(Block block, BlockState state, ServerPlayer player, List<ItemEntity> items) { diff --git a/patches/server/0498-fix-converting-txt-to-json-file.patch b/patches/server/0498-fix-converting-txt-to-json-file.patch index efc09dd833..dde0a0677e 100644 --- a/patches/server/0498-fix-converting-txt-to-json-file.patch +++ b/patches/server/0498-fix-converting-txt-to-json-file.patch @@ -48,7 +48,7 @@ index 2b1d7a2360a9ee7bca9d93a2dc8c61d1648a8348..d5153f804cfcfd1a70c46975e3fb1e50 if (!OldUsersConverter.serverReadyAfterUserconversion(this)) { return false; diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 5100b2d00452f97849239ca32164eed4345e4024..6ef0e5c607c1b7ef9ba6a9f5c7bc452ce9a84250 100644 +index 3c7d31725c4a5dd7728fa394f88d37a0e493e919..59c30bb1fd19b718662dd10b0eb9dcd5ed79e400 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -179,6 +179,7 @@ public abstract class PlayerList { diff --git a/patches/server/0504-Expand-world-key-API.patch b/patches/server/0504-Expand-world-key-API.patch index 3a2e31f54d..b0bf72cf14 100644 --- a/patches/server/0504-Expand-world-key-API.patch +++ b/patches/server/0504-Expand-world-key-API.patch @@ -20,7 +20,7 @@ index 1963e826548c5a8859c50f57654784c3aef50e44..04a39cb6c13c26e2cb1d73a9da98df5d // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index a29f4992f7927d0f241962f972dd13ce77094d97..f83eb7fd5c9b368ba0bf9e07a568d69c6566a5af 100644 +index f79af6910c4c83f1c56bc73434846f3e5270509f..6281bf62f60c2db1f51548077a49a6cc2cfdca2c 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -1181,9 +1181,15 @@ public final class CraftServer implements Server { @@ -67,7 +67,7 @@ index a29f4992f7927d0f241962f972dd13ce77094d97..f83eb7fd5c9b368ba0bf9e07a568d69c // Check if a World already exists with the UID. if (this.getWorld(world.getUID()) != null) { diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 5fe9b94c342a91d6fb3bc582ac7e84cb25b90a9e..e44bcf61c09245a63d50dd1be3c5b1fca7225ff9 100644 +index 481aeb922952578ea68ce2425c84e1a93eff0cf9..b075d4b21b53a3f39094444e4024556b23e399f2 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java @@ -516,6 +516,11 @@ public final class CraftMagicNumbers implements UnsafeValues { diff --git a/patches/server/0506-Drop-carried-item-when-player-has-disconnected.patch b/patches/server/0506-Drop-carried-item-when-player-has-disconnected.patch index 757cfd681e..5a79f00284 100644 --- a/patches/server/0506-Drop-carried-item-when-player-has-disconnected.patch +++ b/patches/server/0506-Drop-carried-item-when-player-has-disconnected.patch @@ -7,7 +7,7 @@ Fixes disappearance of held items, when a player gets disconnected and PlayerDro Closes #5036 diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 6ef0e5c607c1b7ef9ba6a9f5c7bc452ce9a84250..7ef760cb1c88f557947e9b88409a2935666f86f0 100644 +index 59c30bb1fd19b718662dd10b0eb9dcd5ed79e400..0cbd4e6bc9b3695fd2ff0b943a69b8fd393e0f36 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -588,6 +588,14 @@ public abstract class PlayerList { diff --git a/patches/server/0509-Expose-protocol-version.patch b/patches/server/0509-Expose-protocol-version.patch index 3b28ea2ad4..293d2dd336 100644 --- a/patches/server/0509-Expose-protocol-version.patch +++ b/patches/server/0509-Expose-protocol-version.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Expose protocol version diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index e44bcf61c09245a63d50dd1be3c5b1fca7225ff9..fd36c8c62503e4ce035d51b0cc4e8dd55e66cc5d 100644 +index b075d4b21b53a3f39094444e4024556b23e399f2..f833fcead688180daf7039e09dce46fde924043c 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java @@ -521,6 +521,11 @@ public final class CraftMagicNumbers implements UnsafeValues { diff --git a/patches/server/0533-Add-basic-Datapack-API.patch b/patches/server/0533-Add-basic-Datapack-API.patch index 7a89592b48..af4baa76b3 100644 --- a/patches/server/0533-Add-basic-Datapack-API.patch +++ b/patches/server/0533-Add-basic-Datapack-API.patch @@ -92,7 +92,7 @@ index 0000000000000000000000000000000000000000..cf4374493c11057451a62a655514415c + } +} diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index f83eb7fd5c9b368ba0bf9e07a568d69c6566a5af..691ad3df67ff32528ac18c2927e96c91db25741e 100644 +index 6281bf62f60c2db1f51548077a49a6cc2cfdca2c..74acf5e0dacd352180d3b16de3d101f95cb04918 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -305,6 +305,7 @@ public final class CraftServer implements Server { diff --git a/patches/server/0536-ItemStack-repair-check-API.patch b/patches/server/0536-ItemStack-repair-check-API.patch index 32e70257f8..ab9ccec1cd 100644 --- a/patches/server/0536-ItemStack-repair-check-API.patch +++ b/patches/server/0536-ItemStack-repair-check-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] ItemStack repair check API diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index fd36c8c62503e4ce035d51b0cc4e8dd55e66cc5d..dec695198708838fd77285ba818e82861da49a98 100644 +index f833fcead688180daf7039e09dce46fde924043c..07de1316b65e71ab0a372f1a51ae3bc6953d6530 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java @@ -526,6 +526,14 @@ public final class CraftMagicNumbers implements UnsafeValues { diff --git a/patches/server/0542-Add-EntityInsideBlockEvent.patch b/patches/server/0542-Add-EntityInsideBlockEvent.patch index 5080baf21f..0e0939b39f 100644 --- a/patches/server/0542-Add-EntityInsideBlockEvent.patch +++ b/patches/server/0542-Add-EntityInsideBlockEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add EntityInsideBlockEvent diff --git a/src/main/java/net/minecraft/world/level/block/BaseFireBlock.java b/src/main/java/net/minecraft/world/level/block/BaseFireBlock.java -index 993538f613e52ecd009f01e7b68fddba76b6a3e8..c36e64c3df09f14ffb06b81ef20c5e200e386e50 100644 +index 779d188bac9744889c1f4f554b300311e0effa29..0c5409af685ef1f251db3d9f9e21295c82a1e02a 100644 --- a/src/main/java/net/minecraft/world/level/block/BaseFireBlock.java +++ b/src/main/java/net/minecraft/world/level/block/BaseFireBlock.java -@@ -124,6 +124,7 @@ public abstract class BaseFireBlock extends Block { +@@ -125,6 +125,7 @@ public abstract class BaseFireBlock extends Block { @Override protected void entityInside(BlockState state, Level world, BlockPos pos, Entity entity) { diff --git a/patches/server/0543-Improve-item-default-attribute-API.patch b/patches/server/0543-Improve-item-default-attribute-API.patch index ecbcd11bb8..359537fc19 100644 --- a/patches/server/0543-Improve-item-default-attribute-API.patch +++ b/patches/server/0543-Improve-item-default-attribute-API.patch @@ -65,7 +65,7 @@ index 66d773cadb74f9176e6cf68a565568034f52ec63..a1f2b9d40d374e8cdbaf916b25fa74b6 return defaultAttributes.build(); } diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index dec695198708838fd77285ba818e82861da49a98..17fc3d78f1f5002d8f9cb2113706a2cc6a6c821f 100644 +index 07de1316b65e71ab0a372f1a51ae3bc6953d6530..c09c494ebe7a0c13b8bce4234a23a92c300153f9 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java @@ -385,7 +385,11 @@ public final class CraftMagicNumbers implements UnsafeValues { diff --git a/patches/server/0558-Fix-potions-splash-events.patch b/patches/server/0558-Fix-potions-splash-events.patch index dfcd16159d..cb204bd3f3 100644 --- a/patches/server/0558-Fix-potions-splash-events.patch +++ b/patches/server/0558-Fix-potions-splash-events.patch @@ -143,10 +143,10 @@ index be787a5b52e90796d4f06e17e564f4324807c3e6..cb34cc9443da56c0497c7a0192c8b836 public boolean isLingering() { diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 3d64a514b4932bf80953b8e18b0fc9fd14868021..be9fc7a0f5b4ad651847a20367cdc82b8f67ff29 100644 +index 9db2f92c784bb31812297e1e1040aff7114466c6..dfb814ccd5bcd5c855c6089b078ce5591e8b6e32 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -880,6 +880,32 @@ public class CraftEventFactory { +@@ -884,6 +884,32 @@ public class CraftEventFactory { return event; } diff --git a/patches/server/0563-Use-getChunkIfLoadedImmediately-in-places.patch b/patches/server/0563-Use-getChunkIfLoadedImmediately-in-places.patch index 0fb834902a..b2446b7c2b 100644 --- a/patches/server/0563-Use-getChunkIfLoadedImmediately-in-places.patch +++ b/patches/server/0563-Use-getChunkIfLoadedImmediately-in-places.patch @@ -21,7 +21,7 @@ index 055650b315d53b56798ded7af2054c3e8e3ee319..c72687fb23e8d01639cce7d79e3f9780 @Override diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index cfd5d3e50197b38d0ffef6debbb7f5b4b208382a..ed1fc466151ebebf7c3ac135c6893f4ea9a55a52 100644 +index 144d243e0d6ba3ae3f0b0bf457fa516e2b4f416f..20a14b4163807b806bf2ce5a88d3c35098bed929 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java @@ -180,6 +180,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable { diff --git a/patches/server/0566-Fix-kick-event-leave-message-not-being-sent.patch b/patches/server/0566-Fix-kick-event-leave-message-not-being-sent.patch index 7b01621edd..73566101ba 100644 --- a/patches/server/0566-Fix-kick-event-leave-message-not-being-sent.patch +++ b/patches/server/0566-Fix-kick-event-leave-message-not-being-sent.patch @@ -101,7 +101,7 @@ index 0a5cad166e852888208125a80b5e2d5e7e9a3a82..dd728c297335581ad69c94f768ec5201 this.server.getPlayerList().broadcastSystemMessage(PaperAdventure.asVanilla(quitMessage), false); // Paper end diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 0474b88416e0d016da38909196d32fe992b37d00..5b449dd681390eb7aee229a3b6366dcbb96ce2d7 100644 +index 46f46685081c3c164bd4ba306dfb1220a4e13e52..b36cb031b153c452c7f030105f6963072b5858fc 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -561,6 +561,11 @@ public abstract class PlayerList { diff --git a/patches/server/0571-Add-System.out-err-catcher.patch b/patches/server/0571-Add-System.out-err-catcher.patch index 1a4bfc12d1..e3d8954de1 100644 --- a/patches/server/0571-Add-System.out-err-catcher.patch +++ b/patches/server/0571-Add-System.out-err-catcher.patch @@ -105,7 +105,7 @@ index 0000000000000000000000000000000000000000..a8e813ca89b033f061e695288b3383bd + } +} diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index d0eefb53fb88c56d72dea68269bd2b0ce6fd1c1b..0fc2e453c63b63e12f33cde28ad5afea5657ac57 100644 +index 74acf5e0dacd352180d3b16de3d101f95cb04918..4346895eb914825216104a41d39a206730994b95 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -307,6 +307,7 @@ public final class CraftServer implements Server { diff --git a/patches/server/0574-Add-PlayerSetSpawnEvent.patch b/patches/server/0574-Add-PlayerSetSpawnEvent.patch index 4b9bd3eb51..75839ec637 100644 --- a/patches/server/0574-Add-PlayerSetSpawnEvent.patch +++ b/patches/server/0574-Add-PlayerSetSpawnEvent.patch @@ -154,7 +154,7 @@ index e9eec0e4e2e533e4ddc7f52a16a1b2b1ce21d6da..db4bdce4eae9a91babe95c28cb0f6c96 public SectionPos getLastSectionPos() { diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 5b449dd681390eb7aee229a3b6366dcbb96ce2d7..2eced5d3b539dfd072b8b4eafb34f21f849b1bd5 100644 +index b36cb031b153c452c7f030105f6963072b5858fc..d4fa173cebcef5fa86e5d077c2bad8e831392bf0 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -841,7 +841,7 @@ public abstract class PlayerList { diff --git a/patches/server/0575-Make-hoppers-respect-inventory-max-stack-size.patch b/patches/server/0575-Make-hoppers-respect-inventory-max-stack-size.patch index a062b815e2..29710979cd 100644 --- a/patches/server/0575-Make-hoppers-respect-inventory-max-stack-size.patch +++ b/patches/server/0575-Make-hoppers-respect-inventory-max-stack-size.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Make hoppers respect inventory max stack size diff --git a/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java -index 6d948b6151c6194bdba1cd461960397615c4bc40..0d6132abd49d66fbf84c046e09144cb33651be15 100644 +index 9b6c04fbeba5f1ff370617b13f00c8824347bd6d..d717d85559d3f9a5f2f90e4d0e4da57161f51220 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java -@@ -487,15 +487,17 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen +@@ -495,15 +495,17 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen if (itemstack1.isEmpty()) { // Spigot start - SPIGOT-6693, InventorySubcontainer#setItem diff --git a/patches/server/0578-Add-EntityDamageItemEvent.patch b/patches/server/0578-Add-EntityDamageItemEvent.patch index d9c3b86a2a..e289bb08f8 100644 --- a/patches/server/0578-Add-EntityDamageItemEvent.patch +++ b/patches/server/0578-Add-EntityDamageItemEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add EntityDamageItemEvent diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index 7f7445a2b68fd2e6e5fcd509d950a0f8d680c1fe..ebc5f2e8d59da4bec25ff156ec95fe49366be59c 100644 +index 2ee949e1b0015c62499c557d5e359df4b9de6027..14d6e4548703b9b8640913f77406fff85f28d7ef 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java @@ -646,14 +646,14 @@ public final class ItemStack implements DataComponentHolder { diff --git a/patches/server/0588-Get-entity-default-attributes.patch b/patches/server/0588-Get-entity-default-attributes.patch index f90946ef42..0364d2381c 100644 --- a/patches/server/0588-Get-entity-default-attributes.patch +++ b/patches/server/0588-Get-entity-default-attributes.patch @@ -81,7 +81,7 @@ index 0000000000000000000000000000000000000000..ec9ebd2d539333293c51b7edfa18f18b + } +} diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 17fc3d78f1f5002d8f9cb2113706a2cc6a6c821f..98f60520ced0a68dc1e35999b9eaea405a9799ed 100644 +index c09c494ebe7a0c13b8bce4234a23a92c300153f9..95a6f26f75efda7db41db9091107502e8d4e0453 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java @@ -538,6 +538,18 @@ public final class CraftMagicNumbers implements UnsafeValues { diff --git a/patches/server/0590-Add-more-advancement-API.patch b/patches/server/0590-Add-more-advancement-API.patch index 160686a23d..ed610abf5d 100644 --- a/patches/server/0590-Add-more-advancement-API.patch +++ b/patches/server/0590-Add-more-advancement-API.patch @@ -164,10 +164,10 @@ index 8ca86852319d7463f60832bc98b825b0b4325995..62ada73302c6b3ce3fb2dcc8c31a1d9c private final DisplayInfo handle; diff --git a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java -index 9fffb9c9161caad8eb62a99b37d0f31862b568a5..72eca2c6e2107f695ad6c1d85e02dae1890ea410 100644 +index 0cb2b616e0fa060b7aae6c47502f75ee7647e917..17d6a4cdd16d34f83e0752c3bdaee08288425a07 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java +++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java -@@ -434,6 +434,11 @@ public class Commodore { +@@ -435,6 +435,11 @@ public class Commodore { super.visitMethodInsn(opcode, owner, name, "()Lcom/destroystokyo/paper/profile/PlayerProfile;", itf); return; } diff --git a/patches/server/0591-Add-ItemFactory-getSpawnEgg-API.patch b/patches/server/0591-Add-ItemFactory-getSpawnEgg-API.patch index e31dc566fb..c4fffcd5cc 100644 --- a/patches/server/0591-Add-ItemFactory-getSpawnEgg-API.patch +++ b/patches/server/0591-Add-ItemFactory-getSpawnEgg-API.patch @@ -37,10 +37,10 @@ index eabb8b42b890224dd19b879ff276e9908674310d..803a19063c03627dbea79cb1c395ae35 + // Paper end - old getSpawnEgg API } diff --git a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java -index 72eca2c6e2107f695ad6c1d85e02dae1890ea410..b67dfb358a9c1ae26793557ca2151357db4b1691 100644 +index 17d6a4cdd16d34f83e0752c3bdaee08288425a07..157fbe09ab22f3218d9d3f72e8c0a5a3d727eaeb 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java +++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java -@@ -441,6 +441,15 @@ public class Commodore { +@@ -442,6 +442,15 @@ public class Commodore { } // Paper end diff --git a/patches/server/0592-Add-critical-damage-API.patch b/patches/server/0592-Add-critical-damage-API.patch index e738b6fb6e..4dd6485a6d 100644 --- a/patches/server/0592-Add-critical-damage-API.patch +++ b/patches/server/0592-Add-critical-damage-API.patch @@ -61,10 +61,10 @@ index 746bb8a36bd6c6ef953289576af499caad588d79..57ebb96707748e90810dc07471f9769f int k = entity.getRemainingFireTicks(); diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index be9fc7a0f5b4ad651847a20367cdc82b8f67ff29..76be6bf839bb6aec7f2ab0295a3509fb106a95bf 100644 +index dfb814ccd5bcd5c855c6089b078ce5591e8b6e32..de2bc97d0a764c5faf01cfd30f846d3513e38d85 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1074,7 +1074,7 @@ public class CraftEventFactory { +@@ -1078,7 +1078,7 @@ public class CraftEventFactory { return CraftEventFactory.callEntityDamageEvent(source.getDirectBlock(), source.getDirectBlockState(), entity, DamageCause.BLOCK_EXPLOSION, bukkitDamageSource, modifiers, modifierFunctions, cancelled); } DamageCause damageCause = (damager.getBukkitEntity() instanceof org.bukkit.entity.TNTPrimed) ? DamageCause.BLOCK_EXPLOSION : DamageCause.ENTITY_EXPLOSION; @@ -73,7 +73,7 @@ index be9fc7a0f5b4ad651847a20367cdc82b8f67ff29..76be6bf839bb6aec7f2ab0295a3509fb } else if (damager != null || source.getDirectEntity() != null) { DamageCause cause = (source.isSweep()) ? DamageCause.ENTITY_SWEEP_ATTACK : DamageCause.ENTITY_ATTACK; -@@ -1100,7 +1100,7 @@ public class CraftEventFactory { +@@ -1104,7 +1104,7 @@ public class CraftEventFactory { cause = DamageCause.MAGIC; } @@ -82,7 +82,7 @@ index be9fc7a0f5b4ad651847a20367cdc82b8f67ff29..76be6bf839bb6aec7f2ab0295a3509fb } else if (source.is(DamageTypes.FELL_OUT_OF_WORLD)) { return CraftEventFactory.callEntityDamageEvent(source.getDirectBlock(), source.getDirectBlockState(), entity, DamageCause.VOID, bukkitDamageSource, modifiers, modifierFunctions, cancelled); } else if (source.is(DamageTypes.LAVA)) { -@@ -1160,13 +1160,13 @@ public class CraftEventFactory { +@@ -1164,13 +1164,13 @@ public class CraftEventFactory { cause = DamageCause.CUSTOM; } diff --git a/patches/server/0597-Add-Raw-Byte-Entity-Serialization.patch b/patches/server/0597-Add-Raw-Byte-Entity-Serialization.patch index bec15720e6..1508b986aa 100644 --- a/patches/server/0597-Add-Raw-Byte-Entity-Serialization.patch +++ b/patches/server/0597-Add-Raw-Byte-Entity-Serialization.patch @@ -50,7 +50,7 @@ index 7c04eb9e7eb5ff728465b46e3739eb2598ef1204..6fab713531665298d3b03e7960a17ecb @Override public boolean isInvisible() { // Paper - moved up from LivingEntity diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 98f60520ced0a68dc1e35999b9eaea405a9799ed..5ba8ce0f8c516567f38a6f95662bde71086e6ae4 100644 +index 95a6f26f75efda7db41db9091107502e8d4e0453..0e849b49329054005c20a5773de2ff15bf3f6e5d 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java @@ -488,7 +488,33 @@ public final class CraftMagicNumbers implements UnsafeValues { diff --git a/patches/server/0602-Add-paper-mobcaps-and-paper-playermobcaps.patch b/patches/server/0602-Add-paper-mobcaps-and-paper-playermobcaps.patch index 14b8095c8b..f0e7d6d770 100644 --- a/patches/server/0602-Add-paper-mobcaps-and-paper-playermobcaps.patch +++ b/patches/server/0602-Add-paper-mobcaps-and-paper-playermobcaps.patch @@ -278,7 +278,7 @@ index 58ea6a1f95a09c22125a8262b1b221004ebce0e4..ea6533c1ac218aa075da3401807a06fc BlockPos blockposition = NaturalSpawner.getRandomPosWithin(world, chunk); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index c57428b235f7bc0444ba0024d05c7c15b5e74fc4..9707b24da58fdc56732d6372038055e8676e9e0d 100644 +index 4346895eb914825216104a41d39a206730994b95..256fa3d0da9ba1240400be1dad8fa3376f5bf33e 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -2329,6 +2329,11 @@ public final class CraftServer implements Server { diff --git a/patches/server/0606-Make-sure-inlined-getChunkAt-has-inlined-logic-for-l.patch b/patches/server/0606-Make-sure-inlined-getChunkAt-has-inlined-logic-for-l.patch index b950818c7b..23f6d7b245 100644 --- a/patches/server/0606-Make-sure-inlined-getChunkAt-has-inlined-logic-for-l.patch +++ b/patches/server/0606-Make-sure-inlined-getChunkAt-has-inlined-logic-for-l.patch @@ -10,7 +10,7 @@ chunks did get inlined, but the standard CPS.getChunkAt method was not inlined. diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index ed1fc466151ebebf7c3ac135c6893f4ea9a55a52..38bcf9f410e8a9d47c7d486c28dbc16a6225b650 100644 +index 20a14b4163807b806bf2ce5a88d3c35098bed929..b4111bcc6a676dc42b233761aa667708669c2ab8 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java @@ -352,7 +352,14 @@ public abstract class Level implements LevelAccessor, AutoCloseable { diff --git a/patches/server/0627-Fix-upstreams-block-state-factories.patch b/patches/server/0627-Fix-upstreams-block-state-factories.patch index a48a6b0d09..58ba4089ba 100644 --- a/patches/server/0627-Fix-upstreams-block-state-factories.patch +++ b/patches/server/0627-Fix-upstreams-block-state-factories.patch @@ -13,10 +13,10 @@ the material type of the block at that location. public net.minecraft.world.level.block.entity.BlockEntityType validBlocks diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java -index 7147484eefad44ba67db03b6ef2090a596e278de..6f6693456cf518b7bd9eb21ba681540a40c588ef 100644 +index f94dab2da16bffdfd0977cf410493b8d63aaa621..6f99e6f0ff7f0b7de0efc972c6c24fb91a79119f 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java -@@ -371,7 +371,7 @@ public abstract class BlockEntity { +@@ -387,7 +387,7 @@ public abstract class BlockEntity { // Paper end if (this.level == null) return null; org.bukkit.block.Block block = this.level.getWorld().getBlockAt(this.worldPosition.getX(), this.worldPosition.getY(), this.worldPosition.getZ()); diff --git a/patches/server/0648-Validate-usernames.patch b/patches/server/0648-Validate-usernames.patch index 08d6e377eb..788e0c2a0d 100644 --- a/patches/server/0648-Validate-usernames.patch +++ b/patches/server/0648-Validate-usernames.patch @@ -32,7 +32,7 @@ index baedae23865ea80c6546d1f6f439e1d7712258b9..e9cd90b6bb2f57d605323add43f12962 GameProfile gameprofile = this.server.getSingleplayerProfile(); diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 2eced5d3b539dfd072b8b4eafb34f21f849b1bd5..97257e44163ed565b5f1152f0738649b1adbeb07 100644 +index d4fa173cebcef5fa86e5d077c2bad8e831392bf0..9563fc34579992b74451f32e8cbb24b19d1ee19e 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -670,7 +670,7 @@ public abstract class PlayerList { diff --git a/patches/server/0650-Expose-vanilla-BiomeProvider-from-WorldInfo.patch b/patches/server/0650-Expose-vanilla-BiomeProvider-from-WorldInfo.patch index d10b9cc537..92114cbbe1 100644 --- a/patches/server/0650-Expose-vanilla-BiomeProvider-from-WorldInfo.patch +++ b/patches/server/0650-Expose-vanilla-BiomeProvider-from-WorldInfo.patch @@ -18,7 +18,7 @@ index 6ad7c34513034c87059f8a0790aea3231dd0d2a9..188b1844ca6ee5a97f7a588121255417 biomeProvider = gen.getDefaultBiomeProvider(worldInfo); } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 9707b24da58fdc56732d6372038055e8676e9e0d..05dbcff299d42dc05e3a8db0265fb607197731e7 100644 +index 256fa3d0da9ba1240400be1dad8fa3376f5bf33e..5184317f224e50bd414e43ebf37d66fd067c3b7d 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -1306,7 +1306,7 @@ public final class CraftServer implements Server { diff --git a/patches/server/0657-Multi-Block-Change-API-Implementation.patch b/patches/server/0657-Multi-Block-Change-API-Implementation.patch index 6cf3af0bc9..edfcf23bd1 100644 --- a/patches/server/0657-Multi-Block-Change-API-Implementation.patch +++ b/patches/server/0657-Multi-Block-Change-API-Implementation.patch @@ -24,7 +24,7 @@ index 926ff9be3d9e3f5d620e4c7ccb22b9f64865ff8c..1a37654aff9a9c86c9f7af10a1cf7213 buf.writeLong(this.sectionPos.asLong()); buf.writeVarInt(this.positions.length); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 395d5b5378e122c820fd4632180cf4f859e1f502..1ffbb31f2926a1b076ab213cb32dd19c7b0f8768 100644 +index 37f220976b1f1b0a423d7354e6730b6ad8096495..4b7b812a0203ef8a586c0e0cee10c41935487309 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -930,6 +930,32 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0662-API-for-creating-command-sender-which-forwards-feedb.patch b/patches/server/0662-API-for-creating-command-sender-which-forwards-feedb.patch index a9655fbaec..5f466f3742 100644 --- a/patches/server/0662-API-for-creating-command-sender-which-forwards-feedb.patch +++ b/patches/server/0662-API-for-creating-command-sender-which-forwards-feedb.patch @@ -122,7 +122,7 @@ index 0000000000000000000000000000000000000000..e3a5f1ec376319bdfda87fa27ae217bf + } +} diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 05dbcff299d42dc05e3a8db0265fb607197731e7..e56894f16c49085c2de819334f6d0591c0ee8313 100644 +index 5184317f224e50bd414e43ebf37d66fd067c3b7d..e41078074a98968df9a14c0db4af3a044562e925 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -2160,6 +2160,13 @@ public final class CraftServer implements Server { diff --git a/patches/server/0664-Fix-cancelled-powdered-snow-bucket-placement.patch b/patches/server/0664-Fix-cancelled-powdered-snow-bucket-placement.patch index d4169a6e7a..1080cc2e2e 100644 --- a/patches/server/0664-Fix-cancelled-powdered-snow-bucket-placement.patch +++ b/patches/server/0664-Fix-cancelled-powdered-snow-bucket-placement.patch @@ -8,7 +8,7 @@ snow bucket didn't revert grass that became snowy because of the placement. diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index ebc5f2e8d59da4bec25ff156ec95fe49366be59c..823146a66de8ce13e6dc6faf2fd135480bd51c3a 100644 +index 14d6e4548703b9b8640913f77406fff85f28d7ef..eeba6d3aeb50bc7ee6dcfe7cc18eee2487d47357 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java @@ -422,7 +422,7 @@ public final class ItemStack implements DataComponentHolder { diff --git a/patches/server/0665-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch b/patches/server/0665-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch index 4486f4e79e..870421ba8f 100644 --- a/patches/server/0665-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch +++ b/patches/server/0665-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Add missing Validate calls to CraftServer#getSpawnLimit Copies appropriate checks from CraftWorld#getSpawnLimit diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index e56894f16c49085c2de819334f6d0591c0ee8313..4baa784788dba2e3bbb83ed59e003d07646abfc5 100644 +index e41078074a98968df9a14c0db4af3a044562e925..6da81bd4364ab36285f7d463d2e772e551caff2b 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -2337,6 +2337,8 @@ public final class CraftServer implements Server { diff --git a/patches/server/0666-Add-GameEvent-tags.patch b/patches/server/0666-Add-GameEvent-tags.patch index e3189c431f..004a601da8 100644 --- a/patches/server/0666-Add-GameEvent-tags.patch +++ b/patches/server/0666-Add-GameEvent-tags.patch @@ -46,7 +46,7 @@ index 0000000000000000000000000000000000000000..e7d9fd2702a1ce96596580fff8f5ee4f + } +} diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 4baa784788dba2e3bbb83ed59e003d07646abfc5..2cf3e1082e7d88d5450b44e99becc9db2c14a4d4 100644 +index 6da81bd4364ab36285f7d463d2e772e551caff2b..c36923973a6616fd4f17e1896681a21c6ecb175f 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -2686,6 +2686,15 @@ public final class CraftServer implements Server { diff --git a/patches/server/0672-Put-world-into-worldlist-before-initing-the-world.patch b/patches/server/0672-Put-world-into-worldlist-before-initing-the-world.patch index e0e72ba1ff..b494fed2a9 100644 --- a/patches/server/0672-Put-world-into-worldlist-before-initing-the-world.patch +++ b/patches/server/0672-Put-world-into-worldlist-before-initing-the-world.patch @@ -23,7 +23,7 @@ index aa1fbbe55e3dc8fd6bbf021806c66686f8de3d9a..04286e907ff14cc8c45dbfc6ab12f520 if (worlddata.getCustomBossEvents() != null) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 2cf3e1082e7d88d5450b44e99becc9db2c14a4d4..6f6d4a82c350864a60f084eb341d59cf025cde77 100644 +index c36923973a6616fd4f17e1896681a21c6ecb175f..69feb003b3305fec2518ecb21d706ff8e6ea04d7 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -1332,10 +1332,11 @@ public final class CraftServer implements Server { diff --git a/patches/server/0673-Custom-Potion-Mixes.patch b/patches/server/0673-Custom-Potion-Mixes.patch index 8cd0b19f49..e32c3fa347 100644 --- a/patches/server/0673-Custom-Potion-Mixes.patch +++ b/patches/server/0673-Custom-Potion-Mixes.patch @@ -108,7 +108,7 @@ index 04286e907ff14cc8c45dbfc6ab12f520afcca2ca..8142e4a238066404f3d1685f9cee1a2b this.getPlayerList().reloadResources(); this.functionManager.replaceLibrary(this.resources.managers.getFunctionLibrary()); diff --git a/src/main/java/net/minecraft/world/inventory/BrewingStandMenu.java b/src/main/java/net/minecraft/world/inventory/BrewingStandMenu.java -index a7c33675c3777cfbeeecbb3a123a0b03195e679c..93c4657f345b6d3442b1f2ab17b2703ded86b525 100644 +index 993abd8b0b80bfc7a1ce936eaaf3e0804fc9e0a4..eb2cdb36366e376b4e91aea847170b82ca26d274 100644 --- a/src/main/java/net/minecraft/world/inventory/BrewingStandMenu.java +++ b/src/main/java/net/minecraft/world/inventory/BrewingStandMenu.java @@ -53,9 +53,11 @@ public class BrewingStandMenu extends AbstractContainerMenu { @@ -282,7 +282,7 @@ index c8f9972ad1c2330908cc840d426f29c20b242ca8..a2fafef89d5354e2cb02f56728109099 } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 6f6d4a82c350864a60f084eb341d59cf025cde77..ee6bdc985e8396e873bfd5c1f1d0046e2e830784 100644 +index 69feb003b3305fec2518ecb21d706ff8e6ea04d7..b82e3ddc042abdd5ff76c31afe1d87eee5dbec0a 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -308,6 +308,7 @@ public final class CraftServer implements Server { diff --git a/patches/server/0674-Force-close-world-loading-screen.patch b/patches/server/0674-Force-close-world-loading-screen.patch index 83d9e2f203..28475526c4 100644 --- a/patches/server/0674-Force-close-world-loading-screen.patch +++ b/patches/server/0674-Force-close-world-loading-screen.patch @@ -10,7 +10,7 @@ so we do not need that. The client only needs the chunk it is currently in to be loaded to close the loading screen, so we just send an empty one. diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 97257e44163ed565b5f1152f0738649b1adbeb07..d21d9a66ab7197ea4fa324a9af64a1457d8e602b 100644 +index 9563fc34579992b74451f32e8cbb24b19d1ee19e..2916328a5b94783e68688756b5ad7685f180e27f 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -394,6 +394,16 @@ public abstract class PlayerList { diff --git a/patches/server/0678-More-Projectile-API.patch b/patches/server/0678-More-Projectile-API.patch index 34a555256e..31549d003a 100644 --- a/patches/server/0678-More-Projectile-API.patch +++ b/patches/server/0678-More-Projectile-API.patch @@ -713,10 +713,10 @@ index e374b9f40eddca13b30855d25a2030f8df98138f..4fc893378fb0568ddcffc7593d66df6b // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 76be6bf839bb6aec7f2ab0295a3509fb106a95bf..3504b19a3748c64a6c93c86aa0b4a7a140996e06 100644 +index de2bc97d0a764c5faf01cfd30f846d3513e38d85..84727ce7ed7179b8b589c81430fc870136720ef7 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -837,19 +837,19 @@ public class CraftEventFactory { +@@ -841,19 +841,19 @@ public class CraftEventFactory { /** * PotionSplashEvent */ @@ -739,7 +739,7 @@ index 76be6bf839bb6aec7f2ab0295a3509fb106a95bf..3504b19a3748c64a6c93c86aa0b4a7a1 hitEntity = ((EntityHitResult) position).getEntity().getBukkitEntity(); } -@@ -858,20 +858,20 @@ public class CraftEventFactory { +@@ -862,20 +862,20 @@ public class CraftEventFactory { return event; } diff --git a/patches/server/0684-Fix-saving-in-unloadWorld.patch b/patches/server/0684-Fix-saving-in-unloadWorld.patch index 34ffb09d94..16cc5a2aa0 100644 --- a/patches/server/0684-Fix-saving-in-unloadWorld.patch +++ b/patches/server/0684-Fix-saving-in-unloadWorld.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Fix saving in unloadWorld Change savingDisabled to false to ensure ServerLevel's saving logic gets called when unloadWorld is called with save = true diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index ee6bdc985e8396e873bfd5c1f1d0046e2e830784..d80691928310059ab9d834ebf050c0214fbdd8bc 100644 +index b82e3ddc042abdd5ff76c31afe1d87eee5dbec0a..8f205eda520339a1e976f2644dd6b02135a87c02 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -1381,7 +1381,7 @@ public final class CraftServer implements Server { diff --git a/patches/server/0687-Fix-new-block-data-for-EntityChangeBlockEvent.patch b/patches/server/0687-Fix-new-block-data-for-EntityChangeBlockEvent.patch index 7e7e38c837..1c48840478 100644 --- a/patches/server/0687-Fix-new-block-data-for-EntityChangeBlockEvent.patch +++ b/patches/server/0687-Fix-new-block-data-for-EntityChangeBlockEvent.patch @@ -196,10 +196,10 @@ index edc20745649b0837f1371c8d29e71fc0c8e5528f..932831bb5632ead5850842fc77192c84 } // CraftBukkit end diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 3504b19a3748c64a6c93c86aa0b4a7a140996e06..55eee3a7d922f8c298b4653d733e30edc12005c5 100644 +index 84727ce7ed7179b8b589c81430fc870136720ef7..bf2cede700b2070cc4d92e752e6d502848faf612 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1374,11 +1374,11 @@ public class CraftEventFactory { +@@ -1378,11 +1378,11 @@ public class CraftEventFactory { return event; } diff --git a/patches/server/0695-Expand-PlayerItemDamageEvent.patch b/patches/server/0695-Expand-PlayerItemDamageEvent.patch index bf458d8c9b..d550002186 100644 --- a/patches/server/0695-Expand-PlayerItemDamageEvent.patch +++ b/patches/server/0695-Expand-PlayerItemDamageEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Expand PlayerItemDamageEvent diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index 823146a66de8ce13e6dc6faf2fd135480bd51c3a..d825c2e3808e44db9935dab4e7b528146c6d83c2 100644 +index eeba6d3aeb50bc7ee6dcfe7cc18eee2487d47357..598507684aed7978fa2e9bae0d959c7d0f9e53d6 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java @@ -650,10 +650,11 @@ public final class ItemStack implements DataComponentHolder { diff --git a/patches/server/0696-WorldCreator-keepSpawnLoaded.patch b/patches/server/0696-WorldCreator-keepSpawnLoaded.patch index 283377b0ad..f35067900f 100644 --- a/patches/server/0696-WorldCreator-keepSpawnLoaded.patch +++ b/patches/server/0696-WorldCreator-keepSpawnLoaded.patch @@ -5,7 +5,7 @@ Subject: [PATCH] WorldCreator#keepSpawnLoaded diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index d80691928310059ab9d834ebf050c0214fbdd8bc..c5f736ad83c0296c3291ad71278598eb00db436c 100644 +index 8f205eda520339a1e976f2644dd6b02135a87c02..45501e907ff6c6dc71142ceb24f198a4ace17fc0 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -1324,7 +1324,7 @@ public final class CraftServer implements Server { diff --git a/patches/server/0708-Sanitize-sent-BlockEntity-NBT.patch b/patches/server/0708-Sanitize-sent-BlockEntity-NBT.patch index 0f97b535cc..191b3433dc 100644 --- a/patches/server/0708-Sanitize-sent-BlockEntity-NBT.patch +++ b/patches/server/0708-Sanitize-sent-BlockEntity-NBT.patch @@ -30,10 +30,10 @@ index ac900dfdc5c90e9e60d47efa734be8f0a5b20dca..ec1cb034d840633240f2b379b09f7d2f } } diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java -index 6f6693456cf518b7bd9eb21ba681540a40c588ef..6207c6063cd11ccb1177fe7016c49c02a3416990 100644 +index 6f99e6f0ff7f0b7de0efc972c6c24fb91a79119f..f4579be015c213917fc0e3f96218a4e7f4877d73 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java -@@ -378,6 +378,14 @@ public abstract class BlockEntity { +@@ -394,6 +394,14 @@ public abstract class BlockEntity { } // CraftBukkit end diff --git a/patches/server/0711-Throw-exception-on-world-create-while-being-ticked.patch b/patches/server/0711-Throw-exception-on-world-create-while-being-ticked.patch index f99074702f..b5a90fdac0 100644 --- a/patches/server/0711-Throw-exception-on-world-create-while-being-ticked.patch +++ b/patches/server/0711-Throw-exception-on-world-create-while-being-ticked.patch @@ -45,7 +45,7 @@ index 8142e4a238066404f3d1685f9cee1a2b91cdd371..acdba56f025fe729398c5549175baad8 this.profiler.popPush("connection"); MinecraftTimings.connectionTimer.startTiming(); // Spigot // Paper diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index c5f736ad83c0296c3291ad71278598eb00db436c..92f3435fa4f8d37cc75939426a567dab4fa32707 100644 +index 45501e907ff6c6dc71142ceb24f198a4ace17fc0..1e6ee43fbb43a772673f2c37e05eeff6c4d56037 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -916,6 +916,11 @@ public final class CraftServer implements Server { diff --git a/patches/server/0717-Don-t-broadcast-messages-to-command-blocks.patch b/patches/server/0717-Don-t-broadcast-messages-to-command-blocks.patch index e5dee87a16..e6e342e7d0 100644 --- a/patches/server/0717-Don-t-broadcast-messages-to-command-blocks.patch +++ b/patches/server/0717-Don-t-broadcast-messages-to-command-blocks.patch @@ -20,7 +20,7 @@ index 8c2dcc4134d96351cee75773214f3f47e71533e9..e6bfcc50cdf728216084bc00a5bb8b6b Date date = new Date(); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 92f3435fa4f8d37cc75939426a567dab4fa32707..29f5da02f69717d8cf5bb480473023655c6d2617 100644 +index 1e6ee43fbb43a772673f2c37e05eeff6c4d56037..a974641ca127cec9e6e2e9129623956365e23bd4 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -1923,7 +1923,7 @@ public final class CraftServer implements Server { diff --git a/patches/server/0725-More-Teleport-API.patch b/patches/server/0725-More-Teleport-API.patch index 658e715895..3c95df3508 100644 --- a/patches/server/0725-More-Teleport-API.patch +++ b/patches/server/0725-More-Teleport-API.patch @@ -29,7 +29,7 @@ index 8f65943161a6621f8f7926c48322e26a854ae139..58fd502c2a735d4a102de451a002cfd6 d0 = to.getX(); d1 = to.getY(); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index 47f24e390efd8eb4cb7f62b5203825f4160772b7..243ac4253a1541dba52126bad96682e43c6f48a1 100644 +index 4c09f2529dd8eb7ac7d260d177f5292ff2339442..94051ae8ea93ab144f3767345b1cda0438d2afc6 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java @@ -221,15 +221,36 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { @@ -112,7 +112,7 @@ index 47f24e390efd8eb4cb7f62b5203825f4160772b7..243ac4253a1541dba52126bad96682e4 private final org.bukkit.entity.Entity.Spigot spigot = new org.bukkit.entity.Entity.Spigot() { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 1ffbb31f2926a1b076ab213cb32dd19c7b0f8768..7f449bc5a0644709b426dba70a5afccc26a37de8 100644 +index 4b7b812a0203ef8a586c0e0cee10c41935487309..d2f6fb41b16468bf03675b3a331c707e21f8c9ce 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1286,13 +1286,101 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0729-Warn-on-plugins-accessing-faraway-chunks.patch b/patches/server/0729-Warn-on-plugins-accessing-faraway-chunks.patch index b405c21a44..5030feaf00 100644 --- a/patches/server/0729-Warn-on-plugins-accessing-faraway-chunks.patch +++ b/patches/server/0729-Warn-on-plugins-accessing-faraway-chunks.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Warn on plugins accessing faraway chunks diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 38bcf9f410e8a9d47c7d486c28dbc16a6225b650..210c3b6167dac93e550fe849e34b5aa404ab6dce 100644 +index b4111bcc6a676dc42b233761aa667708669c2ab8..cc92d2e8b77c75da1d8b850c3bc251e8ac221c24 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java @@ -339,7 +339,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { diff --git a/patches/server/0730-Custom-Chat-Completion-Suggestions-API.patch b/patches/server/0730-Custom-Chat-Completion-Suggestions-API.patch index eb2cf4cb83..45789f37e1 100644 --- a/patches/server/0730-Custom-Chat-Completion-Suggestions-API.patch +++ b/patches/server/0730-Custom-Chat-Completion-Suggestions-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Custom Chat Completion Suggestions API diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 7f449bc5a0644709b426dba70a5afccc26a37de8..7a4ae758616225002cc14060753bb691ee1d94bb 100644 +index d2f6fb41b16468bf03675b3a331c707e21f8c9ce..5f3045630197f6d515bc66f7fa8014814dbfd8a7 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -691,6 +691,24 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0735-Add-Velocity-IP-Forwarding-Support.patch b/patches/server/0735-Add-Velocity-IP-Forwarding-Support.patch index ef2c3507a8..a10e02c56b 100644 --- a/patches/server/0735-Add-Velocity-IP-Forwarding-Support.patch +++ b/patches/server/0735-Add-Velocity-IP-Forwarding-Support.patch @@ -228,7 +228,7 @@ index e9cd90b6bb2f57d605323add43f12962bd7cb843..0fc30ce511f449d2a3ddab28c86f7e38 } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 29f5da02f69717d8cf5bb480473023655c6d2617..f63d6b4d759fbbc5f5c5dd6b39179af93f49d10f 100644 +index a974641ca127cec9e6e2e9129623956365e23bd4..e6772dc1e4be5618b03ce405f5be1170e25ce53e 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -845,7 +845,7 @@ public final class CraftServer implements Server { diff --git a/patches/server/0736-Add-NamespacedKey-biome-methods.patch b/patches/server/0736-Add-NamespacedKey-biome-methods.patch index 2d26388547..1b67c6785e 100644 --- a/patches/server/0736-Add-NamespacedKey-biome-methods.patch +++ b/patches/server/0736-Add-NamespacedKey-biome-methods.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Add NamespacedKey biome methods Co-authored-by: Thonk <[email protected]> diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 5ba8ce0f8c516567f38a6f95662bde71086e6ae4..24cb9d97bb04a4fe60c46055520ec324fbf6fa3b 100644 +index 0e849b49329054005c20a5773de2ff15bf3f6e5d..39066b1d8df7f784e4c90b5fd47505ef65db307c 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java @@ -578,6 +578,21 @@ public final class CraftMagicNumbers implements UnsafeValues { diff --git a/patches/server/0737-Fix-plugin-loggers-on-server-shutdown.patch b/patches/server/0737-Fix-plugin-loggers-on-server-shutdown.patch index 18da0811b4..d93728cd38 100644 --- a/patches/server/0737-Fix-plugin-loggers-on-server-shutdown.patch +++ b/patches/server/0737-Fix-plugin-loggers-on-server-shutdown.patch @@ -49,7 +49,7 @@ index acdba56f025fe729398c5549175baad8e6818f62..3aba668f9a34cabc26063c61660ab22f } diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index b9b93a4e20eed028b76eab4dcb9610ae05f22faf..1acc0a579804dee7bb3d0f755c24240413ed7540 100644 +index 73225bc20d7aae0ad2a62b3500e76a8f460b5aad..171da360955017a0a2670b960c7c9431099e5439 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -19,6 +19,12 @@ public class Main { diff --git a/patches/server/0746-Mitigate-effects-of-WorldCreator-keepSpawnLoaded-ret.patch b/patches/server/0746-Mitigate-effects-of-WorldCreator-keepSpawnLoaded-ret.patch index f517c5483b..aaf56a3c17 100644 --- a/patches/server/0746-Mitigate-effects-of-WorldCreator-keepSpawnLoaded-ret.patch +++ b/patches/server/0746-Mitigate-effects-of-WorldCreator-keepSpawnLoaded-ret.patch @@ -7,10 +7,10 @@ Subject: [PATCH] Mitigate effects of WorldCreator#keepSpawnLoaded ret type TODO: Remove in 1.21? diff --git a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java -index b67dfb358a9c1ae26793557ca2151357db4b1691..a28bd14454a599014f24ed21210a8a185ac624db 100644 +index 157fbe09ab22f3218d9d3f72e8c0a5a3d727eaeb..cae5c865388aca8041233ca52b25ecf68cd37494 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java +++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java -@@ -439,6 +439,12 @@ public class Commodore { +@@ -440,6 +440,12 @@ public class Commodore { super.visitMethodInsn(Opcodes.INVOKEVIRTUAL, runtimeCbPkgPrefix() + "advancement/CraftAdvancement", "getDisplay0", desc, false); return; } diff --git a/patches/server/0750-Fix-a-bunch-of-vanilla-bugs.patch b/patches/server/0750-Fix-a-bunch-of-vanilla-bugs.patch index 074c1a9d45..197bab1c24 100644 --- a/patches/server/0750-Fix-a-bunch-of-vanilla-bugs.patch +++ b/patches/server/0750-Fix-a-bunch-of-vanilla-bugs.patch @@ -85,7 +85,7 @@ index 6854ca4d4fec2b4fa541c3fabf63787665572609..e7b444a10b244828827b3c66c5346520 } diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index b953def299faf1a13e1893d17a476f36e2d6337a..d409791325771909faaef0dffb0f7f02d1bf71af 100644 +index 071e9ef3680c5dc492c6142ccd05f6788ebc3035..61fda6927f060cdf8bcfddaaa08bbbe2c514c630 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java @@ -1027,7 +1027,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider @@ -124,7 +124,7 @@ index 6abecaac8407b992d208a9108e11fd4954a4106f..03d89f326d320c5d778c3d1e2db7d6b8 this.player.server.getPlayerList().broadcastAll(new ClientboundPlayerInfoUpdatePacket(ClientboundPlayerInfoUpdatePacket.Action.UPDATE_GAME_MODE, this.player), this.player); // CraftBukkit this.level.updateSleepingPlayerList(); diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index d430e6c08bae0a630e71c11c9eae26bef85bde36..a929b8f1c452db08a64e4be53b488cf2676e0a94 100644 +index b0a1f6cf2cc96a2ddc8232f929c134501d99411e..84add5cc89ec912389500b6140a39d6b7ddc9e86 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -260,7 +260,7 @@ public abstract class PlayerList { @@ -249,7 +249,7 @@ index 08dcc94c9eca9a5fd61055f05b7737ba5840b5bf..e0e5046c84941a8d17e18c177f3daea9 return 1; } diff --git a/src/main/java/net/minecraft/world/inventory/BeaconMenu.java b/src/main/java/net/minecraft/world/inventory/BeaconMenu.java -index 5b6133f6758d322713321b7e918db0c3e0d4be51..6173c689013ab02c83ca6ff1fde2b1e47f3e7820 100644 +index 396559c281eee9e8c677cb222721414e8d9e12a2..8b0ebf659f6b219ce2a5d10b0d79f9b89b47c911 100644 --- a/src/main/java/net/minecraft/world/inventory/BeaconMenu.java +++ b/src/main/java/net/minecraft/world/inventory/BeaconMenu.java @@ -178,6 +178,11 @@ public class BeaconMenu extends AbstractContainerMenu { diff --git a/patches/server/0754-Correctly-handle-interactions-with-items-on-cooldown.patch b/patches/server/0754-Correctly-handle-interactions-with-items-on-cooldown.patch index cc9068cb42..4f48d5e3d0 100644 --- a/patches/server/0754-Correctly-handle-interactions-with-items-on-cooldown.patch +++ b/patches/server/0754-Correctly-handle-interactions-with-items-on-cooldown.patch @@ -30,10 +30,10 @@ index 03d89f326d320c5d778c3d1e2db7d6b88753faec..717d015dd4637dd9d568b751be1dc104 this.interactResult = event.useItemInHand() == Event.Result.DENY; this.interactPosition = blockposition.immutable(); diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 55eee3a7d922f8c298b4653d733e30edc12005c5..82b98a9b6418614283ac512f59586877f577b35b 100644 +index bf2cede700b2070cc4d92e752e6d502848faf612..443c50ed1b1b077aae46864b8dc1fbe6a3b4ea85 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -550,6 +550,12 @@ public class CraftEventFactory { +@@ -554,6 +554,12 @@ public class CraftEventFactory { } public static PlayerInteractEvent callPlayerInteractEvent(net.minecraft.world.entity.player.Player who, Action action, BlockPos position, Direction direction, ItemStack itemstack, boolean cancelledBlock, InteractionHand hand, Vec3 targetPos) { @@ -46,7 +46,7 @@ index 55eee3a7d922f8c298b4653d733e30edc12005c5..82b98a9b6418614283ac512f59586877 Player player = (who == null) ? null : (Player) who.getBukkitEntity(); CraftItemStack itemInHand = CraftItemStack.asCraftMirror(itemstack); -@@ -584,6 +590,11 @@ public class CraftEventFactory { +@@ -588,6 +594,11 @@ public class CraftEventFactory { if (cancelledBlock) { event.setUseInteractedBlock(Event.Result.DENY); } diff --git a/patches/server/0756-Elder-Guardian-appearance-API.patch b/patches/server/0756-Elder-Guardian-appearance-API.patch index 05ca8f144b..8f007ec892 100644 --- a/patches/server/0756-Elder-Guardian-appearance-API.patch +++ b/patches/server/0756-Elder-Guardian-appearance-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Elder Guardian appearance API diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 7a4ae758616225002cc14060753bb691ee1d94bb..3566c607c7d66eb8d64cdcd77204b6b132287f58 100644 +index 5f3045630197f6d515bc66f7fa8014814dbfd8a7..2ec75a25de34b68e7c14416a06facce6a169bac7 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -3298,6 +3298,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0762-Add-fire-tick-delay-option.patch b/patches/server/0762-Add-fire-tick-delay-option.patch index 848f831f0e..b1626b125f 100644 --- a/patches/server/0762-Add-fire-tick-delay-option.patch +++ b/patches/server/0762-Add-fire-tick-delay-option.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add fire-tick-delay option diff --git a/src/main/java/net/minecraft/world/level/block/FireBlock.java b/src/main/java/net/minecraft/world/level/block/FireBlock.java -index 5dad1aa26a8908cba6a08398a4bad27f31d4c2c0..4d467ecf0dd8006b9fa4fb8fb5aadc0622a1e512 100644 +index 9db6df5f28be559a324ead2fcfbe189eac076e2e..4dd1e6d2e2f9775dbe7ec40d07f6b82b8f6b2834 100644 --- a/src/main/java/net/minecraft/world/level/block/FireBlock.java +++ b/src/main/java/net/minecraft/world/level/block/FireBlock.java @@ -171,7 +171,7 @@ public class FireBlock extends BaseFireBlock { @@ -18,11 +18,11 @@ index 5dad1aa26a8908cba6a08398a4bad27f31d4c2c0..4d467ecf0dd8006b9fa4fb8fb5aadc06 if (!state.canSurvive(world, pos)) { this.fireExtinguished(world, pos); // CraftBukkit - invalid place location @@ -372,11 +372,11 @@ public class FireBlock extends BaseFireBlock { - protected void onPlace(BlockState state, Level world, BlockPos pos, BlockState oldState, boolean notify, net.minecraft.world.item.context.UseOnContext context) { - super.onPlace(state, world, pos, oldState, notify, context); - // Paper end - UseOnContext param -- world.scheduleTick(pos, (Block) this, FireBlock.getFireTickDelay(world.random)); -+ world.scheduleTick(pos, this, FireBlock.getFireTickDelay(world)); // Paper - Add fire-tick-delay option + protected void onPlace(BlockState iblockdata, Level world, BlockPos blockposition, BlockState iblockdata1, boolean flag, UseOnContext context) { + super.onPlace(iblockdata, world, blockposition, iblockdata1, flag, context); + // CraftBukkit end +- world.scheduleTick(blockposition, (Block) this, FireBlock.getFireTickDelay(world.random)); ++ world.scheduleTick(blockposition, this, FireBlock.getFireTickDelay(world)); // Paper - Add fire-tick-delay option } - private static int getFireTickDelay(RandomSource random) { diff --git a/patches/server/0765-Fix-EntityArgument-suggestion-permissions-to-align-w.patch b/patches/server/0765-Fix-EntityArgument-suggestion-permissions-to-align-w.patch index c42422ceca..b285d037c7 100644 --- a/patches/server/0765-Fix-EntityArgument-suggestion-permissions-to-align-w.patch +++ b/patches/server/0765-Fix-EntityArgument-suggestion-permissions-to-align-w.patch @@ -9,18 +9,18 @@ suggestions, which especially matters when we force suggestions to the server for this type diff --git a/src/main/java/net/minecraft/commands/arguments/EntityArgument.java b/src/main/java/net/minecraft/commands/arguments/EntityArgument.java -index 78eca3243a276260ff26c3587fb60e17e0439af0..2043001c16b3530c2d3f52efda10bcad424881c0 100644 +index b6c9c230bdc8ae90ece1c3e512682c02f0e414ea..4edb23c5f08ad742bc63fda9d73d1e234482e982 100644 --- a/src/main/java/net/minecraft/commands/arguments/EntityArgument.java +++ b/src/main/java/net/minecraft/commands/arguments/EntityArgument.java -@@ -127,7 +127,12 @@ public class EntityArgument implements ArgumentType<EntitySelector> { +@@ -135,7 +135,12 @@ public class EntityArgument implements ArgumentType<EntitySelector> { StringReader stringreader = new StringReader(suggestionsbuilder.getInput()); stringreader.setCursor(suggestionsbuilder.getStart()); -- EntitySelectorParser argumentparserselector = new EntitySelectorParser(stringreader, icompletionprovider.hasPermission(2)); +- EntitySelectorParser argumentparserselector = new EntitySelectorParser(stringreader, EntitySelectorParser.allowSelectors(icompletionprovider)); + // Paper start - Fix EntityArgument suggestion permissions + final boolean permission = object instanceof CommandSourceStack stack + ? stack.bypassSelectorPermissions || stack.hasPermission(2, "minecraft.command.selector") -+ : icompletionprovider.hasPermission(2); ++ : EntitySelectorParser.allowSelectors(icompletionprovider); + EntitySelectorParser argumentparserselector = new EntitySelectorParser(stringreader, permission); + // Paper end - Fix EntityArgument suggestion permissions diff --git a/patches/server/0766-Fix-EntityCombustEvent-cancellation-cant-fully-preve.patch b/patches/server/0766-Fix-EntityCombustEvent-cancellation-cant-fully-preve.patch index d0cf5c9861..77c18397b3 100644 --- a/patches/server/0766-Fix-EntityCombustEvent-cancellation-cant-fully-preve.patch +++ b/patches/server/0766-Fix-EntityCombustEvent-cancellation-cant-fully-preve.patch @@ -21,10 +21,10 @@ index 43a2570196619bd239170de586626a7112066430..655a0f2328b641ce41c64e9bb1456e05 // CraftBukkit end } diff --git a/src/main/java/net/minecraft/world/level/block/BaseFireBlock.java b/src/main/java/net/minecraft/world/level/block/BaseFireBlock.java -index c36e64c3df09f14ffb06b81ef20c5e200e386e50..bdf432850f8228ed42b09afea79ecc5c1055c930 100644 +index 0c5409af685ef1f251db3d9f9e21295c82a1e02a..8b5918dc07f17ae5001c03dc743128fd9520b819 100644 --- a/src/main/java/net/minecraft/world/level/block/BaseFireBlock.java +++ b/src/main/java/net/minecraft/world/level/block/BaseFireBlock.java -@@ -134,6 +134,10 @@ public abstract class BaseFireBlock extends Block { +@@ -135,6 +135,10 @@ public abstract class BaseFireBlock extends Block { if (!event.isCancelled()) { entity.igniteForSeconds(event.getDuration(), false); diff --git a/patches/server/0769-Add-Player-Warden-Warning-API.patch b/patches/server/0769-Add-Player-Warden-Warning-API.patch index 647754a109..84244f79e4 100644 --- a/patches/server/0769-Add-Player-Warden-Warning-API.patch +++ b/patches/server/0769-Add-Player-Warden-Warning-API.patch @@ -10,7 +10,7 @@ public net.minecraft.world.entity.monster.warden.WardenSpawnTracker cooldownTick public net.minecraft.world.entity.monster.warden.WardenSpawnTracker increaseWarningLevel()V diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 3566c607c7d66eb8d64cdcd77204b6b132287f58..cc631c6882ee623cb1191b9d422a7adc4fa742a2 100644 +index 2ec75a25de34b68e7c14416a06facce6a169bac7..cdcdb55f896bb4128f258bf2aee91dc60100b6de 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -3303,6 +3303,41 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0774-ItemStack-damage-API.patch b/patches/server/0774-ItemStack-damage-API.patch index 24e6ad94dd..965c0e9084 100644 --- a/patches/server/0774-ItemStack-damage-API.patch +++ b/patches/server/0774-ItemStack-damage-API.patch @@ -11,7 +11,7 @@ the logic associated with damaging them public net.minecraft.world.entity.LivingEntity entityEventForEquipmentBreak(Lnet/minecraft/world/entity/EquipmentSlot;)B diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index d825c2e3808e44db9935dab4e7b528146c6d83c2..57510b85caf8914290ab0afb89cfb773158715b8 100644 +index 598507684aed7978fa2e9bae0d959c7d0f9e53d6..7c52ae813bfe47983ca94f4daf68f17e899949da 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java @@ -647,11 +647,16 @@ public final class ItemStack implements DataComponentHolder { diff --git a/patches/server/0781-fix-Instruments.patch b/patches/server/0781-fix-Instruments.patch index fd5c343d0b..3c7adaddd6 100644 --- a/patches/server/0781-fix-Instruments.patch +++ b/patches/server/0781-fix-Instruments.patch @@ -6,7 +6,7 @@ Subject: [PATCH] fix Instruments properly handle Player#playNote diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index cc631c6882ee623cb1191b9d422a7adc4fa742a2..c426dbff75f0ad3889594fba9a66669fc71b63e8 100644 +index cdcdb55f896bb4128f258bf2aee91dc60100b6de..fc0db6deca6ff3b8e083fccd312e6ff3b5a78616 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -768,7 +768,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0782-Improve-inlining-for-some-hot-BlockBehavior-and-Flui.patch b/patches/server/0782-Improve-inlining-for-some-hot-BlockBehavior-and-Flui.patch index d563036457..420107d5c3 100644 --- a/patches/server/0782-Improve-inlining-for-some-hot-BlockBehavior-and-Flui.patch +++ b/patches/server/0782-Improve-inlining-for-some-hot-BlockBehavior-and-Flui.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Improve inlining for some hot BlockBehavior and FluidState diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java -index 6fe078fdf619c4df664f1dce6a0f5d202c21b35e..9d6cc0b8dbc451dfff1ddd8e7be32d11434cdb69 100644 +index 46dd499c2023ec482ae7204d2894fb4100d9233b..a8bec3c405732e5863cf717b1fe948d00837bed2 100644 --- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java +++ b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java -@@ -906,15 +906,15 @@ public abstract class BlockBehaviour implements FeatureElement { +@@ -907,15 +907,15 @@ public abstract class BlockBehaviour implements FeatureElement { return this.shapeExceedsCube; // Paper - moved into shape cache init } @@ -28,7 +28,7 @@ index 6fe078fdf619c4df664f1dce6a0f5d202c21b35e..9d6cc0b8dbc451dfff1ddd8e7be32d11 return this.isAir; } -@@ -998,7 +998,7 @@ public abstract class BlockBehaviour implements FeatureElement { +@@ -999,7 +999,7 @@ public abstract class BlockBehaviour implements FeatureElement { } } @@ -37,7 +37,7 @@ index 6fe078fdf619c4df664f1dce6a0f5d202c21b35e..9d6cc0b8dbc451dfff1ddd8e7be32d11 return this.canOcclude; } -@@ -1214,11 +1214,11 @@ public abstract class BlockBehaviour implements FeatureElement { +@@ -1215,11 +1215,11 @@ public abstract class BlockBehaviour implements FeatureElement { return this.getBlock().builtInRegistryHolder().is(key); } diff --git a/patches/server/0785-Add-Sneaking-API-for-Entities.patch b/patches/server/0785-Add-Sneaking-API-for-Entities.patch index a8db30ee3c..aaee22c056 100644 --- a/patches/server/0785-Add-Sneaking-API-for-Entities.patch +++ b/patches/server/0785-Add-Sneaking-API-for-Entities.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add Sneaking API for Entities diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index 7c223042595c7cd5ccc554211657d9375833122b..3c1e199316ae283210529d4d27b4f9d70b4d9404 100644 +index f950102a324d07aeba260bfa82fe88728f2362e5..ac513d3162a0794f226abc80bff21c799fe5802c 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java @@ -874,6 +874,18 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { diff --git a/patches/server/0791-Flying-Fall-Damage.patch b/patches/server/0791-Flying-Fall-Damage.patch index f7fc90f3fd..1731871405 100644 --- a/patches/server/0791-Flying-Fall-Damage.patch +++ b/patches/server/0791-Flying-Fall-Damage.patch @@ -26,7 +26,7 @@ index ad334f149fe1b44d4ebe48489dcd2811ff1b5cd0..950ce40d268d89ff3c503116081db6c9 } else { if (fallDistance >= 2.0F) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index c426dbff75f0ad3889594fba9a66669fc71b63e8..cb191389007ccaae2e3af1defc5e95ee571c46ac 100644 +index fc0db6deca6ff3b8e083fccd312e6ff3b5a78616..78ab37d1359e1d44bd921428038c733b77171cd2 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -2581,6 +2581,19 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0794-Use-single-player-info-update-packet-on-join.patch b/patches/server/0794-Use-single-player-info-update-packet-on-join.patch index 4552daec45..02e36f9270 100644 --- a/patches/server/0794-Use-single-player-info-update-packet-on-join.patch +++ b/patches/server/0794-Use-single-player-info-update-packet-on-join.patch @@ -18,7 +18,7 @@ index 1b486d09bd1a84835183a6c8181933fcabb3373f..62b022a72954eeecfa141f4ec93ccb44 } diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index a929b8f1c452db08a64e4be53b488cf2676e0a94..2ea29c9491186d7a25ed3eed99ee4a488bcaa272 100644 +index 84add5cc89ec912389500b6140a39d6b7ddc9e86..944c727fd7770fe4c06af67304005664a7ab9e8a 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -361,6 +361,7 @@ public abstract class PlayerList { diff --git a/patches/server/0796-Win-Screen-API.patch b/patches/server/0796-Win-Screen-API.patch index 95dd061087..7ab535106b 100644 --- a/patches/server/0796-Win-Screen-API.patch +++ b/patches/server/0796-Win-Screen-API.patch @@ -7,7 +7,7 @@ Subject: [PATCH] Win Screen API public net.minecraft.server.level.ServerPlayer seenCredits diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index cb191389007ccaae2e3af1defc5e95ee571c46ac..756ba61af10b552c5c0bf86e506a31df0f0ce6f5 100644 +index 78ab37d1359e1d44bd921428038c733b77171cd2..384165d6747c61d0d306fa63773cbca560dfae9b 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1305,6 +1305,25 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0801-Add-EntityFertilizeEggEvent.patch b/patches/server/0801-Add-EntityFertilizeEggEvent.patch index 8c4e26f04a..691530ffc8 100644 --- a/patches/server/0801-Add-EntityFertilizeEggEvent.patch +++ b/patches/server/0801-Add-EntityFertilizeEggEvent.patch @@ -69,10 +69,10 @@ index d34d8fe70379dcad9540739ec0ae1c94f01fc46b..fadd341ff398886a4da102eefa1beb95 this.playSound(SoundEvents.SNIFFER_EGG_PLOP, 1.0F, (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 0.5F); } // Paper - Call EntityDropItemEvent diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 82b98a9b6418614283ac512f59586877f577b35b..b35c6393c3af2519be648e75c7d09038cf94ccbf 100644 +index 443c50ed1b1b077aae46864b8dc1fbe6a3b4ea85..345bc6ed3be40c8c8ae530a566a554bbc5247158 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -2168,4 +2168,28 @@ public class CraftEventFactory { +@@ -2182,4 +2182,28 @@ public class CraftEventFactory { return event.callEvent(); } // Paper end diff --git a/patches/server/0807-Fix-inventories-returning-null-Locations.patch b/patches/server/0807-Fix-inventories-returning-null-Locations.patch index eabfae28c5..23413d6b03 100644 --- a/patches/server/0807-Fix-inventories-returning-null-Locations.patch +++ b/patches/server/0807-Fix-inventories-returning-null-Locations.patch @@ -30,7 +30,7 @@ index c26161784359ea167e11de8aa58eda3b4851059c..6632cf24ebe6d147950a1fdb87666093 } diff --git a/src/main/java/net/minecraft/world/inventory/BeaconMenu.java b/src/main/java/net/minecraft/world/inventory/BeaconMenu.java -index 6173c689013ab02c83ca6ff1fde2b1e47f3e7820..1b6fd16d8c6195c6f7b65c7621d5f9bd15c46a75 100644 +index 8b0ebf659f6b219ce2a5d10b0d79f9b89b47c911..a735aeeb59f79154ce797c6e2f5600305f46d217 100644 --- a/src/main/java/net/minecraft/world/inventory/BeaconMenu.java +++ b/src/main/java/net/minecraft/world/inventory/BeaconMenu.java @@ -52,6 +52,12 @@ public class BeaconMenu extends AbstractContainerMenu { diff --git a/patches/server/0808-Add-Shearable-API.patch b/patches/server/0808-Add-Shearable-API.patch index 675a1bf358..17902a41b9 100644 --- a/patches/server/0808-Add-Shearable-API.patch +++ b/patches/server/0808-Add-Shearable-API.patch @@ -32,7 +32,7 @@ index 0000000000000000000000000000000000000000..bcf254e3c81cf1e401bddc850fb24ad2 + } +} diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftBogged.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftBogged.java -index b252236369315502278e9b7c93709a347ec16636..93481e2828f945b11ae9a20a8e5286232b449fa9 100644 +index 0139e85c0751564bb4d2847b7b2e48f75fee9e53..e8e4704304504e69c7964dcd4df8ce5db9e92bf6 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftBogged.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftBogged.java @@ -4,7 +4,7 @@ import org.bukkit.craftbukkit.CraftServer; @@ -45,7 +45,7 @@ index b252236369315502278e9b7c93709a347ec16636..93481e2828f945b11ae9a20a8e528623 public CraftBogged(CraftServer server, net.minecraft.world.entity.monster.Bogged entity) { super(server, entity); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java -index 986f7b18112ef183de3bbff269a92bf6ac945477..9cc81bcccbf1141f66fedada1359b7c0dfa8e22a 100644 +index 986f7b18112ef183de3bbff269a92bf6ac945477..abba0986cc562f688682ba5e4822837a503586eb 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java @@ -14,7 +14,7 @@ import org.bukkit.entity.MushroomCow; @@ -57,6 +57,18 @@ index 986f7b18112ef183de3bbff269a92bf6ac945477..9cc81bcccbf1141f66fedada1359b7c0 public CraftMushroomCow(CraftServer server, net.minecraft.world.entity.animal.MushroomCow entity) { super(server, entity); } +@@ -105,4 +105,11 @@ public class CraftMushroomCow extends CraftCow implements MushroomCow { + public String toString() { + return "CraftMushroomCow"; + } ++ ++ // Paper start ++ @Override ++ public void setSheared(boolean sheared) { ++ if (sheared) this.shear(); ++ } ++ // Paper end + } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftSheep.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftSheep.java index 030bf7b6312799231d0b614ba5c84fec23c276e3..37291d7ad9fdf0fe78894f82a418f40bb581f58b 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftSheep.java @@ -71,7 +83,7 @@ index 030bf7b6312799231d0b614ba5c84fec23c276e3..37291d7ad9fdf0fe78894f82a418f40b super(server, entity); } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowman.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowman.java -index 1e9807b8f468742d208f817e22d7625106fc1b58..4ce2373ff71c3c1b8951646e057587a3ab09e145 100644 +index 1e9807b8f468742d208f817e22d7625106fc1b58..a0bd62d6abaa195bc49063fa23e87a7697f24b99 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowman.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowman.java @@ -4,7 +4,7 @@ import net.minecraft.world.entity.animal.SnowGolem; @@ -83,6 +95,18 @@ index 1e9807b8f468742d208f817e22d7625106fc1b58..4ce2373ff71c3c1b8951646e057587a3 public CraftSnowman(CraftServer server, SnowGolem entity) { super(server, entity); } +@@ -28,4 +28,11 @@ public class CraftSnowman extends CraftGolem implements Snowman, com.destroystok + public String toString() { + return "CraftSnowman"; + } ++ ++ // Paper start ++ @Override ++ public void setSheared(boolean sheared) { ++ this.setDerp(sheared); ++ } ++ // Paper end + } diff --git a/src/test/java/io/papermc/paper/entity/ShearableTest.java b/src/test/java/io/papermc/paper/entity/ShearableTest.java new file mode 100644 index 0000000000000000000000000000000000000000..fc8010c5fa0027d45d3c10d67e20631951714c40 diff --git a/patches/server/0821-Expand-PlayerItemMendEvent.patch b/patches/server/0821-Expand-PlayerItemMendEvent.patch index 6437d9ecb4..4de6cbf26d 100644 --- a/patches/server/0821-Expand-PlayerItemMendEvent.patch +++ b/patches/server/0821-Expand-PlayerItemMendEvent.patch @@ -49,10 +49,10 @@ index 384165d6747c61d0d306fa63773cbca560dfae9b..e7235efba6b68917a646083c150655cb } } diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index b35c6393c3af2519be648e75c7d09038cf94ccbf..23e24853e8540cecb2145471d548cad1b2539447 100644 +index 345bc6ed3be40c8c8ae530a566a554bbc5247158..c7e5f8f759781dc57418631c1736528fd47d7063 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1280,10 +1280,10 @@ public class CraftEventFactory { +@@ -1284,10 +1284,10 @@ public class CraftEventFactory { return event; } diff --git a/patches/server/0824-Fix-block-place-logic.patch b/patches/server/0824-Fix-block-place-logic.patch index 3796cc773d..accea4ee7c 100644 --- a/patches/server/0824-Fix-block-place-logic.patch +++ b/patches/server/0824-Fix-block-place-logic.patch @@ -22,7 +22,7 @@ index 7d76cdc59984b156628273c8357485eb10046007..7180996027f70aef7afe32fb2adfce64 itemstack.consume(1, entityhuman); return InteractionResult.sidedSuccess(world.isClientSide); diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 210c3b6167dac93e550fe849e34b5aa404ab6dce..ed1c50d31fc077e4e009719fa622a44edefcdf2c 100644 +index cc92d2e8b77c75da1d8b850c3bc251e8ac221c24..0a3e56302470f239d4840e4e32d2a0ce4611ff65 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java @@ -552,17 +552,18 @@ public abstract class Level implements LevelAccessor, AutoCloseable { diff --git a/patches/server/0825-Fix-spigot-sound-playing-for-BlockItem-ItemStacks.patch b/patches/server/0825-Fix-spigot-sound-playing-for-BlockItem-ItemStacks.patch index 89ec0d95ff..42a45f0c62 100644 --- a/patches/server/0825-Fix-spigot-sound-playing-for-BlockItem-ItemStacks.patch +++ b/patches/server/0825-Fix-spigot-sound-playing-for-BlockItem-ItemStacks.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix spigot sound playing for BlockItem ItemStacks diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index 57510b85caf8914290ab0afb89cfb773158715b8..8777e634a69825302da7ed5031a344b80724783e 100644 +index 7c52ae813bfe47983ca94f4daf68f17e899949da..7cb7443aa60b9a552d8d9b67ddbf8b3e54af24e8 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java @@ -571,7 +571,11 @@ public final class ItemStack implements DataComponentHolder { diff --git a/patches/server/0827-Don-t-enforce-icanhasbukkit-default-if-alias-block-e.patch b/patches/server/0827-Don-t-enforce-icanhasbukkit-default-if-alias-block-e.patch index 5c55e8560a..f89f6dd523 100644 --- a/patches/server/0827-Don-t-enforce-icanhasbukkit-default-if-alias-block-e.patch +++ b/patches/server/0827-Don-t-enforce-icanhasbukkit-default-if-alias-block-e.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Don't enforce icanhasbukkit default if alias block exists diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 32d2e6a4ce092fee061b65d3c839c2da83865908..7197cbf15ff9382cbc59c4a58e2f189c8cacbaaa 100644 +index e6772dc1e4be5618b03ce405f5be1170e25ce53e..5df30c692b0992c023558b5c2a79f9fbfcadf663 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -355,7 +355,11 @@ public final class CraftServer implements Server { diff --git a/patches/server/0832-Add-event-for-player-editing-sign.patch b/patches/server/0832-Add-event-for-player-editing-sign.patch index 231c6c0fc3..8c26ae27ea 100644 --- a/patches/server/0832-Add-event-for-player-editing-sign.patch +++ b/patches/server/0832-Add-event-for-player-editing-sign.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add event for player editing sign diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index 8777e634a69825302da7ed5031a344b80724783e..a6ca820adf6e86f8358967d8d3b2e45cd1135b2c 100644 +index 7cb7443aa60b9a552d8d9b67ddbf8b3e54af24e8..1016541b8f01cdb45ae96fbb777c6c38598fcc35 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java @@ -550,7 +550,7 @@ public final class ItemStack implements DataComponentHolder { diff --git a/patches/server/0836-Call-missing-BlockDispenseEvent.patch b/patches/server/0836-Call-missing-BlockDispenseEvent.patch index ae85dc5678..321faa739a 100644 --- a/patches/server/0836-Call-missing-BlockDispenseEvent.patch +++ b/patches/server/0836-Call-missing-BlockDispenseEvent.patch @@ -50,10 +50,10 @@ index 96db0b1041a4c0f054d4f3f2bdced960b119664e..78951f50188528718cdb3dbbaabe3f9f for (int k = 0; k < 5; ++k) { worldserver.sendParticles(ParticleTypes.SPLASH, (double) blockposition.getX() + worldserver.random.nextDouble(), (double) (blockposition.getY() + 1), (double) blockposition.getZ() + worldserver.random.nextDouble(), 1, 0.0D, 0.0D, 0.0D, 1.0D); diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 23e24853e8540cecb2145471d548cad1b2539447..1f73ee4e284ca6b0bd6d387337a4c1084f3210e5 100644 +index c7e5f8f759781dc57418631c1736528fd47d7063..a982c6f6a0dc5d436178b1e70cdf29e3ae951ee5 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -2169,6 +2169,32 @@ public class CraftEventFactory { +@@ -2183,6 +2183,32 @@ public class CraftEventFactory { } // Paper end diff --git a/patches/server/0840-fix-item-meta-for-tadpole-buckets.patch b/patches/server/0840-fix-item-meta-for-tadpole-buckets.patch index 0fc39b3ea1..43d485644b 100644 --- a/patches/server/0840-fix-item-meta-for-tadpole-buckets.patch +++ b/patches/server/0840-fix-item-meta-for-tadpole-buckets.patch @@ -5,10 +5,10 @@ Subject: [PATCH] fix item meta for tadpole buckets diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemMetas.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemMetas.java -index 4ae9930c2d74e5b1e3ad0c2ecf6556dc59cbf23c..a6c78854c10362864c2297de903ab9594cdb1eb6 100644 +index c9fbc01be0b0e7fd1cafb091d06496f4ba1e7c2c..a4c4ba0d02f9a072236ce86c1e98e2c60b059cb8 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemMetas.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemMetas.java -@@ -286,7 +286,7 @@ public final class CraftItemMetas { +@@ -263,7 +263,7 @@ public final class CraftItemMetas { if (itemType == ItemType.SUSPICIOUS_STEW) { return CraftItemMetas.asType(CraftItemMetas.SUSPICIOUS_STEW_META_DATA); } @@ -30,7 +30,7 @@ index 27af7ca9d62bdb4a24be5af139c181d7bc271ba5..3ff0340c40e9dc9a6e690de15ccade7a Material.GLOW_ITEM_FRAME, Material.PAINTING diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java -index a1d8da4e0de3f84194f28d7d18fa795d53714590..d6018439015583fa0344c7c01b2e60a13de29795 100644 +index 0715f43f3f8235d28a12b9d49d78c765a946c53f..b6da1c2902139d4c7b01ac7b3407d4f6ac3990e2 100644 --- a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java +++ b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java @@ -208,6 +208,27 @@ public class ItemMetaTest extends AbstractTestingBase { diff --git a/patches/server/0841-Fix-BanList-API.patch b/patches/server/0841-Fix-BanList-API.patch index 780f2ca5be..b3274235b6 100644 --- a/patches/server/0841-Fix-BanList-API.patch +++ b/patches/server/0841-Fix-BanList-API.patch @@ -208,7 +208,7 @@ index 172202accf4448a933fcf1ff820316c7910dd7f7..50ee7656580d386db473c054f5c5ec57 return null; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index b3faca24fa8bdb22d1bf3e581d0396bc444a9f5f..28536a8bfab2c8bdde03852efa0e41cf19a37a9c 100644 +index e7235efba6b68917a646083c150655cb42a738e5..32e1830464395cb1f462777f3fb14e766c5e3217 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1747,23 +1747,23 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0845-ExperienceOrb-should-call-EntitySpawnEvent.patch b/patches/server/0845-ExperienceOrb-should-call-EntitySpawnEvent.patch index 83756a84b2..a1d1f4b3d7 100644 --- a/patches/server/0845-ExperienceOrb-should-call-EntitySpawnEvent.patch +++ b/patches/server/0845-ExperienceOrb-should-call-EntitySpawnEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] ExperienceOrb should call EntitySpawnEvent diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 1f73ee4e284ca6b0bd6d387337a4c1084f3210e5..35afad4e995f7e94d7a4541157b237c73d1b9635 100644 +index a982c6f6a0dc5d436178b1e70cdf29e3ae951ee5..04ff9dfb7978e82d9d8ae96c92b598bf63f542f4 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -740,7 +740,8 @@ public class CraftEventFactory { +@@ -744,7 +744,8 @@ public class CraftEventFactory { // Spigot start - SPIGOT-7523: Merge after spawn event and only merge if the event was not cancelled (gets checked above) if (entity instanceof net.minecraft.world.entity.ExperienceOrb xp) { double radius = world.spigotConfig.expMerge; diff --git a/patches/server/0849-Folia-scheduler-and-owned-region-API.patch b/patches/server/0849-Folia-scheduler-and-owned-region-API.patch index 33197e551c..dcb44af963 100644 --- a/patches/server/0849-Folia-scheduler-and-owned-region-API.patch +++ b/patches/server/0849-Folia-scheduler-and-owned-region-API.patch @@ -1251,7 +1251,7 @@ index 3dd70063ab5434e5f57da6ae084316aa6570b7d5..0c145c6c53e486bc44cf83579b18add6 public void setLevelCallback(EntityInLevelCallback changeListener) { this.levelCallback = changeListener; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index ed6210d2490f8584c21537eaa380d990fb73e03d..3e78a420ea183f4044873bb1fd89e9b9749032b8 100644 +index 5df30c692b0992c023558b5c2a79f9fbfcadf663..fffdb6db002ce36ecd60bd8f916c878ac8423fed 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -310,6 +310,76 @@ public final class CraftServer implements Server { diff --git a/patches/server/0851-API-for-updating-recipes-on-clients.patch b/patches/server/0851-API-for-updating-recipes-on-clients.patch index 373578055d..a561324275 100644 --- a/patches/server/0851-API-for-updating-recipes-on-clients.patch +++ b/patches/server/0851-API-for-updating-recipes-on-clients.patch @@ -39,7 +39,7 @@ index f9dcbf7d51680e8dfdda1350e0632dec675f3d44..1b83d8f723410c405746faa59783e6ba Iterator iterator1 = this.players.iterator(); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 3e78a420ea183f4044873bb1fd89e9b9749032b8..e81ec7b81302ea5eb5fe75117a7aacbb8b88d0a6 100644 +index fffdb6db002ce36ecd60bd8f916c878ac8423fed..d7b495643914d651d7b8b04e9a5595ff1e05e4e2 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -1174,6 +1174,18 @@ public final class CraftServer implements Server { diff --git a/patches/server/0853-Only-capture-actual-tree-growth.patch b/patches/server/0853-Only-capture-actual-tree-growth.patch index 74ca9ab6b6..c8bdd0bb61 100644 --- a/patches/server/0853-Only-capture-actual-tree-growth.patch +++ b/patches/server/0853-Only-capture-actual-tree-growth.patch @@ -17,7 +17,7 @@ index 78951f50188528718cdb3dbbaabe3f9f2760ffe3..7826e2a52da47914aca39fef958b8f39 } } diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index a6ca820adf6e86f8358967d8d3b2e45cd1135b2c..780b2fada591fb1b504fbf4828c31ec0dd1c25db 100644 +index 1016541b8f01cdb45ae96fbb777c6c38598fcc35..11c507b399f97c4c0bbe220e8a3c1cdb851c8a0a 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java @@ -466,6 +466,7 @@ public final class ItemStack implements DataComponentHolder { @@ -29,7 +29,7 @@ index a6ca820adf6e86f8358967d8d3b2e45cd1135b2c..780b2fada591fb1b504fbf4828c31ec0 entityhuman.awardStat(Stats.ITEM_USED.get(item)); // SPIGOT-7236 - award stat } diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index ed1c50d31fc077e4e009719fa622a44edefcdf2c..8337f2f1d650fc7efb830a7034e3676dc0695ee4 100644 +index 0a3e56302470f239d4840e4e32d2a0ce4611ff65..3f87e60c0d43703a8450b5920dac59a970809397 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java @@ -1378,4 +1378,14 @@ public abstract class Level implements LevelAccessor, AutoCloseable { diff --git a/patches/server/0856-Use-correct-seed-on-api-world-load.patch b/patches/server/0856-Use-correct-seed-on-api-world-load.patch index c94e81abb9..311c004535 100644 --- a/patches/server/0856-Use-correct-seed-on-api-world-load.patch +++ b/patches/server/0856-Use-correct-seed-on-api-world-load.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Use correct seed on api world load diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index e81ec7b81302ea5eb5fe75117a7aacbb8b88d0a6..e77a8a77e1b2d5b91083fab6287467fd947092ee 100644 +index d7b495643914d651d7b8b04e9a5595ff1e05e4e2..35b96f8151b87a71b1bebdbdad75964a6f5929d5 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -1396,7 +1396,7 @@ public final class CraftServer implements Server { diff --git a/patches/server/0859-Fix-custom-statistic-criteria-creation.patch b/patches/server/0859-Fix-custom-statistic-criteria-creation.patch index bd32b5af31..a3e8b66e3a 100644 --- a/patches/server/0859-Fix-custom-statistic-criteria-creation.patch +++ b/patches/server/0859-Fix-custom-statistic-criteria-creation.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix custom statistic criteria creation diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 24cb9d97bb04a4fe60c46055520ec324fbf6fa3b..398068e8ffa77ac7199baf7aaab5b60c9dc639f5 100644 +index 39066b1d8df7f784e4c90b5fd47505ef65db307c..2d5cb690c332732d1d2a9e78918cd5e8595b37e9 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java @@ -593,6 +593,14 @@ public final class CraftMagicNumbers implements UnsafeValues { diff --git a/patches/server/0860-Bandaid-fix-for-Effect.patch b/patches/server/0860-Bandaid-fix-for-Effect.patch index 37c8fc587f..9dd7805368 100644 --- a/patches/server/0860-Bandaid-fix-for-Effect.patch +++ b/patches/server/0860-Bandaid-fix-for-Effect.patch @@ -81,7 +81,7 @@ index 0c5a583f2ced1ae5e1e92a045ef2ef1cd5b35496..5c83ca573ccaa75a1d4e8129c96a24e3 // Special case: the axis is optional for ELECTRIC_SPARK Preconditions.checkArgument(effect.getData() == null || effect == Effect.ELECTRIC_SPARK, "Wrong kind of data for the %s effect", effect); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 28536a8bfab2c8bdde03852efa0e41cf19a37a9c..cb41fad4b94c4da64a699dc1b0848fc08ff2c456 100644 +index 32e1830464395cb1f462777f3fb14e766c5e3217..9cf67deacf9d01e3835705260a358513987fc3ba 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -917,7 +917,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0863-Deprecate-and-replace-methods-with-old-StructureType.patch b/patches/server/0863-Deprecate-and-replace-methods-with-old-StructureType.patch index c40f681341..51dd09f361 100644 --- a/patches/server/0863-Deprecate-and-replace-methods-with-old-StructureType.patch +++ b/patches/server/0863-Deprecate-and-replace-methods-with-old-StructureType.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Deprecate and replace methods with old StructureType diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index e77a8a77e1b2d5b91083fab6287467fd947092ee..7ea2676397025bdbe20f88ec122bd6d545dcf959 100644 +index 35b96f8151b87a71b1bebdbdad75964a6f5929d5..1df6635c5431fb33b476ecdf45bdbd2ce2b8920d 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -2001,6 +2001,11 @@ public final class CraftServer implements Server { diff --git a/patches/server/0868-Add-Listing-API-for-Player.patch b/patches/server/0868-Add-Listing-API-for-Player.patch index bb270bf016..f33015a234 100644 --- a/patches/server/0868-Add-Listing-API-for-Player.patch +++ b/patches/server/0868-Add-Listing-API-for-Player.patch @@ -82,7 +82,7 @@ index 6247a21c9c391abf1f6db3482c659593e4f29355..9ccca41bf23efadba5329cc584bbcdca static class EntryBuilder { diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index be6bf7afa3cea4ed48f363e89ccd079062edc8d9..9b1a6d8351fb473eec75a2fd08fb892b770e3586 100644 +index 1b83d8f723410c405746faa59783e6ba7a66fd56..eec536d493575f593dd71c63944b047566f3822d 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -359,14 +359,22 @@ public abstract class PlayerList { @@ -119,7 +119,7 @@ index be6bf7afa3cea4ed48f363e89ccd079062edc8d9..9b1a6d8351fb473eec75a2fd08fb892b // Paper end - Use single player info update packet on join player.sentListPacket = true; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index cb41fad4b94c4da64a699dc1b0848fc08ff2c456..c80cbc9dece765091b2ad9281bdc061df8b491dc 100644 +index 9cf67deacf9d01e3835705260a358513987fc3ba..78dcc656807cafa52707ef4139fe6176f6f16021 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -201,6 +201,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0870-Add-BlockFace-to-BlockDamageEvent.patch b/patches/server/0870-Add-BlockFace-to-BlockDamageEvent.patch index f2de8e9aa8..15b336933f 100644 --- a/patches/server/0870-Add-BlockFace-to-BlockDamageEvent.patch +++ b/patches/server/0870-Add-BlockFace-to-BlockDamageEvent.patch @@ -18,10 +18,10 @@ index c680f081ba548f84f07a968a46811090c53e57e3..d839f8df658c894f144ba4637d290ffb if (blockEvent.isCancelled()) { // Let the client know the block still exists diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 35afad4e995f7e94d7a4541157b237c73d1b9635..9d7bcd7a99cfda0776d267bada384304558fa6fe 100644 +index 04ff9dfb7978e82d9d8ae96c92b598bf63f542f4..fcd4a6d5fff3f30c84688081088e577fa6dd7c5b 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -655,13 +655,13 @@ public class CraftEventFactory { +@@ -659,13 +659,13 @@ public class CraftEventFactory { /** * BlockDamageEvent */ diff --git a/patches/server/0878-Implement-OfflinePlayer-isConnected.patch b/patches/server/0878-Implement-OfflinePlayer-isConnected.patch index 2d00249134..96316a2a2a 100644 --- a/patches/server/0878-Implement-OfflinePlayer-isConnected.patch +++ b/patches/server/0878-Implement-OfflinePlayer-isConnected.patch @@ -23,7 +23,7 @@ index 4d654c4f0b6210a9841427789ba70ce5d1d308be..9d93130f23addb18b97d7f5ec013faef public String getName() { Player player = this.getPlayer(); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index c80cbc9dece765091b2ad9281bdc061df8b491dc..a996f721fa0794a4551ff1e99ea1b66a723bfaff 100644 +index 78dcc656807cafa52707ef4139fe6176f6f16021..a2dd33a9bb61427005e1edb1dcb1dfa23030d0ee 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -256,6 +256,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0880-Add-titleOverride-to-InventoryOpenEvent.patch b/patches/server/0880-Add-titleOverride-to-InventoryOpenEvent.patch index 629f589fc2..082092e455 100644 --- a/patches/server/0880-Add-titleOverride-to-InventoryOpenEvent.patch +++ b/patches/server/0880-Add-titleOverride-to-InventoryOpenEvent.patch @@ -79,10 +79,10 @@ index 12ab8f7cde88cd6ce3ad474fe2843d5d30c3c0d7..c1bad887d1340ebc7c63fda3dceff929 if (!player.isImmobile()) player.connection.send(new ClientboundOpenScreenPacket(container.containerId, windowType, io.papermc.paper.adventure.PaperAdventure.asVanilla(adventure$title))); // Paper - Prevent opening inventories when frozen player.containerMenu = container; diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 9d7bcd7a99cfda0776d267bada384304558fa6fe..6ca59ba6a713e452d146182d143b99b07696af8b 100644 +index fcd4a6d5fff3f30c84688081088e577fa6dd7c5b..e54b93b366ce42454179a23acdd0353ace0d486e 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1397,10 +1397,21 @@ public class CraftEventFactory { +@@ -1401,10 +1401,21 @@ public class CraftEventFactory { } public static AbstractContainerMenu callInventoryOpenEvent(ServerPlayer player, AbstractContainerMenu container) { @@ -105,7 +105,7 @@ index 9d7bcd7a99cfda0776d267bada384304558fa6fe..6ca59ba6a713e452d146182d143b99b0 if (player.containerMenu != player.inventoryMenu) { // fire INVENTORY_CLOSE if one already open player.connection.handleContainerClose(new ServerboundContainerClosePacket(player.containerMenu.containerId), InventoryCloseEvent.Reason.OPEN_NEW); // Paper - Inventory close reason } -@@ -1415,10 +1426,10 @@ public class CraftEventFactory { +@@ -1419,10 +1430,10 @@ public class CraftEventFactory { if (event.isCancelled()) { container.transferTo(player.containerMenu, craftPlayer); diff --git a/patches/server/0885-Call-BlockRedstoneEvents-for-lecterns.patch b/patches/server/0885-Call-BlockRedstoneEvents-for-lecterns.patch index b2cf0ce209..2c76754071 100644 --- a/patches/server/0885-Call-BlockRedstoneEvents-for-lecterns.patch +++ b/patches/server/0885-Call-BlockRedstoneEvents-for-lecterns.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Call BlockRedstoneEvents for lecterns diff --git a/src/main/java/net/minecraft/world/level/block/LecternBlock.java b/src/main/java/net/minecraft/world/level/block/LecternBlock.java -index 5ff1e755301336a4e6ec6757510d0c595eacd7a6..f420989056c5c86c94333361f1733fd4b7488283 100644 +index 751ff3d51f8ae57f847c3acf7a7cd663a6ae1c68..0c52e1f8bc233bb66e53f4c69e1d8757382bbe81 100644 --- a/src/main/java/net/minecraft/world/level/block/LecternBlock.java +++ b/src/main/java/net/minecraft/world/level/block/LecternBlock.java @@ -179,6 +179,16 @@ public class LecternBlock extends BaseEntityBlock { diff --git a/patches/server/0889-Add-missing-InventoryHolders-to-inventories.patch b/patches/server/0889-Add-missing-InventoryHolders-to-inventories.patch index ae956d4693..abdf8c8bea 100644 --- a/patches/server/0889-Add-missing-InventoryHolders-to-inventories.patch +++ b/patches/server/0889-Add-missing-InventoryHolders-to-inventories.patch @@ -77,7 +77,7 @@ index 428e454116804c27496cfbf796edd44780890d33..4c7e91977fa590abfe7eb3704d8008ed + // Paper end - Add missing InventoryHolders } diff --git a/src/main/java/net/minecraft/world/inventory/BeaconMenu.java b/src/main/java/net/minecraft/world/inventory/BeaconMenu.java -index 1b6fd16d8c6195c6f7b65c7621d5f9bd15c46a75..7f513e8c4f81524aee9326ddbbc6bec0b3fa1b27 100644 +index a735aeeb59f79154ce797c6e2f5600305f46d217..b93c118d957f0a2f40e2f31fd6400bd69438cf72 100644 --- a/src/main/java/net/minecraft/world/inventory/BeaconMenu.java +++ b/src/main/java/net/minecraft/world/inventory/BeaconMenu.java @@ -42,7 +42,7 @@ public class BeaconMenu extends AbstractContainerMenu { @@ -148,10 +148,10 @@ index 85e336637db8643fc5aca1dba724c9b341cbf46f..12b466ccb7c36021cf807c4f3fd2bcb0 @Override public <T> Optional<T> evaluate(BiFunction<Level, BlockPos, T> getter) { diff --git a/src/main/java/net/minecraft/world/inventory/EnchantmentMenu.java b/src/main/java/net/minecraft/world/inventory/EnchantmentMenu.java -index 6f88ce0076460215f5c1a965aa2bd7050071b611..c1b9c3ad2cccfa520e9d73b786142624ac5f3380 100644 +index 2fa009b33bccd6aeee30f23f9207ab039740d95d..fff1c39920e7d7051dfe3dd39c77865d3bdf113e 100644 --- a/src/main/java/net/minecraft/world/inventory/EnchantmentMenu.java +++ b/src/main/java/net/minecraft/world/inventory/EnchantmentMenu.java -@@ -66,7 +66,7 @@ public class EnchantmentMenu extends AbstractContainerMenu { +@@ -63,7 +63,7 @@ public class EnchantmentMenu extends AbstractContainerMenu { public EnchantmentMenu(int syncId, Inventory playerInventory, ContainerLevelAccess context) { super(MenuType.ENCHANTMENT, syncId); @@ -206,7 +206,7 @@ index be840717e180b6b5abd14db6cc9263349737f9a3..7de5e47f9a54263734eeef855a2dc07e public void setChanged() { super.setChanged(); diff --git a/src/main/java/net/minecraft/world/inventory/LoomMenu.java b/src/main/java/net/minecraft/world/inventory/LoomMenu.java -index 72ad78659a373213ed1f37498754adaf18f1f68b..4f3f6ea43030853bd9df067358a1f4d16c40e6d4 100644 +index f76ef029132c6a08d4e70585bc440eccdc626b16..7d7b4e53682107a1a75a7aa205be1e6bfdc8c551 100644 --- a/src/main/java/net/minecraft/world/inventory/LoomMenu.java +++ b/src/main/java/net/minecraft/world/inventory/LoomMenu.java @@ -73,7 +73,7 @@ public class LoomMenu extends AbstractContainerMenu { @@ -261,7 +261,7 @@ index d4592218d761eb38402e3d95c642e80a708cb333..4c4266a85c38e41e6c7e6144a68624f4 public ResultContainer() { this.itemStacks = NonNullList.withSize(1, ItemStack.EMPTY); diff --git a/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java b/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java -index 977ccef3c9fa7685209f3eca894a3b69501ebcc1..5ddae1afab0a68465ea60395c84b0997ee994f88 100644 +index 37e75c02c374314372630f4bda0b92519809f2a4..5a0015f761f6a25d7bb7b9cfe7a9b4771a6a37ec 100644 --- a/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java +++ b/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java @@ -69,7 +69,7 @@ public class StonecutterMenu extends AbstractContainerMenu { diff --git a/patches/server/0897-Fix-UnsafeValues-loadAdvancement.patch b/patches/server/0897-Fix-UnsafeValues-loadAdvancement.patch index d8143eab89..c1cfc35cc9 100644 --- a/patches/server/0897-Fix-UnsafeValues-loadAdvancement.patch +++ b/patches/server/0897-Fix-UnsafeValues-loadAdvancement.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix UnsafeValues#loadAdvancement diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 48eeac0795c479ebb2ff64005b1405421131fcd7..1d98c0e9f138f122aa73e2f1dd6d485d7865720d 100644 +index 2d5cb690c332732d1d2a9e78918cd5e8595b37e9..5cbcfef31e2acdf27fc52f466ee70d9146d0228d 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java @@ -302,9 +302,30 @@ public final class CraftMagicNumbers implements UnsafeValues { diff --git a/patches/server/0898-Add-player-idle-duration-API.patch b/patches/server/0898-Add-player-idle-duration-API.patch index 9e5130fc3a..0c646e1e0a 100644 --- a/patches/server/0898-Add-player-idle-duration-API.patch +++ b/patches/server/0898-Add-player-idle-duration-API.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Add player idle duration API Implements API for getting and resetting a player's idle duration. diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index a996f721fa0794a4551ff1e99ea1b66a723bfaff..e443e260afbda55cc9888efd60d9b5f56dcbf55b 100644 +index a2dd33a9bb61427005e1edb1dcb1dfa23030d0ee..f474b6f880b8d03d6b6a29203509ac0fdd9faaf1 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -3419,6 +3419,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0901-Allow-null-itemstack-for-Player-sendEquipmentChange.patch b/patches/server/0901-Allow-null-itemstack-for-Player-sendEquipmentChange.patch index ec4d42387a..fdde374c47 100644 --- a/patches/server/0901-Allow-null-itemstack-for-Player-sendEquipmentChange.patch +++ b/patches/server/0901-Allow-null-itemstack-for-Player-sendEquipmentChange.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Allow null itemstack for Player#sendEquipmentChange diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index e443e260afbda55cc9888efd60d9b5f56dcbf55b..f337c32fa4521d6ddd1c4d6102404db389f23b71 100644 +index f474b6f880b8d03d6b6a29203509ac0fdd9faaf1..51b524d3c7cd5e0f59056c1fd8f71171732945b8 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1127,7 +1127,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0911-Fix-missing-event-call-for-entity-teleport-API.patch b/patches/server/0911-Fix-missing-event-call-for-entity-teleport-API.patch index 79cebb8989..d567759368 100644 --- a/patches/server/0911-Fix-missing-event-call-for-entity-teleport-API.patch +++ b/patches/server/0911-Fix-missing-event-call-for-entity-teleport-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix missing event call for entity teleport API diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index a8b9b50991361160880b9fc0a94cad30c319e62e..b8eb9166e44da8745a056bf68f2f9316ce25d7a7 100644 +index 580427bf1521ac9fef37f7464e12a7bfe4fbfb10..9ca1fee03bfa557f1df7388c6043c9ec6d02a79a 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java @@ -258,6 +258,17 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { diff --git a/patches/server/0915-Fix-CraftMetaItem-getAttributeModifier-duplication-c.patch b/patches/server/0915-Fix-CraftMetaItem-getAttributeModifier-duplication-c.patch index ad38c13cd7..32e393d2a8 100644 --- a/patches/server/0915-Fix-CraftMetaItem-getAttributeModifier-duplication-c.patch +++ b/patches/server/0915-Fix-CraftMetaItem-getAttributeModifier-duplication-c.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix CraftMetaItem#getAttributeModifier duplication check diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index 0b87cfbdf039ee5bc017d2b1783c7c4853047952..5a455354561389194b0e61c03f4b2e9285b17a3b 100644 +index 5c76ba7f9ceb285d27e18369172612205be96224..11f55ef2645d50bbc24bd245ffe3ac98180315d8 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -@@ -1405,7 +1405,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1412,7 +1412,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { Preconditions.checkNotNull(modifier, "AttributeModifier cannot be null"); this.checkAttributeList(); for (Map.Entry<Attribute, AttributeModifier> entry : this.attributeModifiers.entries()) { diff --git a/patches/server/0916-Restore-vanilla-entity-drops-behavior.patch b/patches/server/0916-Restore-vanilla-entity-drops-behavior.patch index 41f35bee2a..da511c7232 100644 --- a/patches/server/0916-Restore-vanilla-entity-drops-behavior.patch +++ b/patches/server/0916-Restore-vanilla-entity-drops-behavior.patch @@ -152,10 +152,10 @@ index 5bcb9a53ebebeef4bd6ec2458df4b63002ebd804..2f398750bfee5758ad8b1367b6fc1436 } } diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 6ca59ba6a713e452d146182d143b99b07696af8b..be1fa84dfdec0e31f9e2ca47ad3719dd6678b49c 100644 +index e54b93b366ce42454179a23acdd0353ace0d486e..56c25507ebe2d7e48b18ade462bfcca94bd67e74 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -969,18 +969,24 @@ public class CraftEventFactory { +@@ -973,18 +973,24 @@ public class CraftEventFactory { } public static EntityDeathEvent callEntityDeathEvent(net.minecraft.world.entity.LivingEntity victim, DamageSource damageSource) { @@ -184,7 +184,7 @@ index 6ca59ba6a713e452d146182d143b99b07696af8b..be1fa84dfdec0e31f9e2ca47ad3719dd populateFields(victim, event); // Paper - make cancellable CraftWorld world = (CraftWorld) entity.getWorld(); Bukkit.getServer().getPluginManager().callEvent(event); -@@ -994,20 +1000,24 @@ public class CraftEventFactory { +@@ -998,20 +1004,24 @@ public class CraftEventFactory { victim.expToDrop = event.getDroppedExp(); lootCheck.run(); // Paper - advancement triggers before destroying items @@ -213,7 +213,7 @@ index 6ca59ba6a713e452d146182d143b99b07696af8b..be1fa84dfdec0e31f9e2ca47ad3719dd event.setKeepInventory(keepInventory); event.setKeepLevel(victim.keepLevel); // SPIGOT-2222: pre-set keepLevel populateFields(victim, event); // Paper - make cancellable -@@ -1025,16 +1035,14 @@ public class CraftEventFactory { +@@ -1029,16 +1039,14 @@ public class CraftEventFactory { victim.expToDrop = event.getDroppedExp(); victim.newExp = event.getNewExp(); diff --git a/patches/server/0917-Dont-resend-blocks-on-interactions.patch b/patches/server/0917-Dont-resend-blocks-on-interactions.patch index 3e498be31c..822d354138 100644 --- a/patches/server/0917-Dont-resend-blocks-on-interactions.patch +++ b/patches/server/0917-Dont-resend-blocks-on-interactions.patch @@ -149,7 +149,7 @@ index 6caed156ed0cfe0017d578f58cb963ee68272d78..321188173918d0d60858a258400dfd68 return false; } diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index 780b2fada591fb1b504fbf4828c31ec0dd1c25db..fa4bdf8bdbd6eaeb854e62a2acb45d7998e4aa2b 100644 +index 11c507b399f97c4c0bbe220e8a3c1cdb851c8a0a..ebe470ca361ec5747a843b60d82f567d41d7c9fa 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java @@ -500,10 +500,12 @@ public final class ItemStack implements DataComponentHolder { diff --git a/patches/server/0919-Improve-Registry.patch b/patches/server/0919-Improve-Registry.patch index d912757a1f..65127420f7 100644 --- a/patches/server/0919-Improve-Registry.patch +++ b/patches/server/0919-Improve-Registry.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Improve Registry diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java b/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java -index 002449e66f83a419afa8357d2e7192670eaf869e..b6c7522ff8522cdadf3b291a9c2ac87c60b85d2a 100644 +index 21d104d07e86c7961b8de56403c9d4004a79ba27..96e7a493eeef865eb52e92aeec993b67d8d4a4fa 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java @@ -151,6 +151,7 @@ public class CraftRegistry<B extends Keyed, M> implements Registry<B> { diff --git a/patches/server/0921-Add-experience-points-API.patch b/patches/server/0921-Add-experience-points-API.patch index f29e610a9b..92be0f2b48 100644 --- a/patches/server/0921-Add-experience-points-API.patch +++ b/patches/server/0921-Add-experience-points-API.patch @@ -18,7 +18,7 @@ index 950ce40d268d89ff3c503116081db6c9ccd65329..454b29d8c9e42e328933aa578f49d28f // Paper start - send while respecting visibility private static void sendSoundEffect(Player fromEntity, double x, double y, double z, SoundEvent soundEffect, SoundSource soundCategory, float volume, float pitch) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index f337c32fa4521d6ddd1c4d6102404db389f23b71..4d3838c5184296451089697fd3f7438a7f1be762 100644 +index 51b524d3c7cd5e0f59056c1fd8f71171732945b8..1490d15f1ffa83653b20a4bb47584c4c554a3384 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1921,6 +1921,49 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0922-Add-drops-to-shear-events.patch b/patches/server/0922-Add-drops-to-shear-events.patch index 6741c44832..ab07441a8c 100644 --- a/patches/server/0922-Add-drops-to-shear-events.patch +++ b/patches/server/0922-Add-drops-to-shear-events.patch @@ -317,10 +317,10 @@ index dc6230458e09f7555eee7f6a567ff60ad454666b..9d50b9ac8084f3db1844cc7ad1ce9153 public boolean readyForShearing() { return !this.isSheared() && this.isAlive(); diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index be1fa84dfdec0e31f9e2ca47ad3719dd6678b49c..d7bf00745a9016d0fe0c1d39ffaaac44276251d4 100644 +index 56c25507ebe2d7e48b18ade462bfcca94bd67e74..55d20ca20003fb0ee62a9730d31d1a741951aa3d 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1676,20 +1676,20 @@ public class CraftEventFactory { +@@ -1690,20 +1690,20 @@ public class CraftEventFactory { player.level().getCraftServer().getPluginManager().callEvent(event); } diff --git a/patches/server/0925-Properly-handle-experience-dropping-on-block-break.patch b/patches/server/0925-Properly-handle-experience-dropping-on-block-break.patch index 21b63430dd..c5ffca5d89 100644 --- a/patches/server/0925-Properly-handle-experience-dropping-on-block-break.patch +++ b/patches/server/0925-Properly-handle-experience-dropping-on-block-break.patch @@ -68,10 +68,10 @@ index c083dc8b2a69c3747b250d13f1a28ad22b5e6119..bf52c36f31992a01a7403d8c85151327 } diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java -index 9d6cc0b8dbc451dfff1ddd8e7be32d11434cdb69..87289d8ab94705999c67457a28538e7a5576acc3 100644 +index a8bec3c405732e5863cf717b1fe948d00837bed2..240c250a93289776686d09d7eae17c07d7278da5 100644 --- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java +++ b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java -@@ -1118,6 +1118,7 @@ public abstract class BlockBehaviour implements FeatureElement { +@@ -1119,6 +1119,7 @@ public abstract class BlockBehaviour implements FeatureElement { public void spawnAfterBreak(ServerLevel world, BlockPos pos, ItemStack tool, boolean dropExperience) { this.getBlock().spawnAfterBreak(this.asState(), world, pos, tool, dropExperience); diff --git a/patches/server/0926-Fixup-NamespacedKey-handling.patch b/patches/server/0926-Fixup-NamespacedKey-handling.patch index fb00b008ce..34d242b8aa 100644 --- a/patches/server/0926-Fixup-NamespacedKey-handling.patch +++ b/patches/server/0926-Fixup-NamespacedKey-handling.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fixup NamespacedKey handling diff --git a/src/main/java/net/minecraft/world/inventory/LoomMenu.java b/src/main/java/net/minecraft/world/inventory/LoomMenu.java -index 4f3f6ea43030853bd9df067358a1f4d16c40e6d4..531336c44c46555fef8c001fe8ca00c93624ad42 100644 +index 7d7b4e53682107a1a75a7aa205be1e6bfdc8c551..0e954dfe82ed263cbe63dbf49ff49e83f38228b8 100644 --- a/src/main/java/net/minecraft/world/inventory/LoomMenu.java +++ b/src/main/java/net/minecraft/world/inventory/LoomMenu.java @@ -171,12 +171,28 @@ public class LoomMenu extends AbstractContainerMenu { @@ -52,10 +52,10 @@ index e34deaf398dc6722c3128bdd6b9bc16da2d33bf7..f028daa4f23a1f1868c9922991259739 public static NamespacedKey minecraftToBukkitKey(ResourceKey<LootTable> minecraft) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java b/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java -index b6c7522ff8522cdadf3b291a9c2ac87c60b85d2a..fc9aec589414bf8d3f672183928235b5b51d1a02 100644 +index 96e7a493eeef865eb52e92aeec993b67d8d4a4fa..c2824cc07b761958a0df4b110bdfc53bd853b9e7 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java -@@ -118,6 +118,16 @@ public class CraftRegistry<B extends Keyed, M> implements Registry<B> { +@@ -120,6 +120,18 @@ public class CraftRegistry<B extends Keyed, M> implements Registry<B> { + ", this can happen if a plugin creates its own registry entry with out properly registering it."); } @@ -69,9 +69,11 @@ index b6c7522ff8522cdadf3b291a9c2ac87c60b85d2a..fc9aec589414bf8d3f672183928235b5 + } + // Paper end - fixup upstream being dum + - // Paper - move to PaperRegistries - ++ // Paper - move to PaperRegistries ++ // Paper - NOTE: As long as all uses of the method below relate to *serialization* via ConfigurationSerializable, it's fine + public static <B extends Keyed> B get(Registry<B> bukkit, NamespacedKey namespacedKey, ApiVersion apiVersion) { + if (bukkit instanceof CraftRegistry<B, ?> craft) { diff --git a/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttribute.java b/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttribute.java index cc97638e038ea64ad180ebfded2528aa07d1809e..10e4318782107644f67818109784fff60d017e0a 100644 --- a/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttribute.java diff --git a/patches/server/0929-Add-PlayerTradeEvent-and-PlayerPurchaseEvent.patch b/patches/server/0929-Add-PlayerTradeEvent-and-PlayerPurchaseEvent.patch index a58beffec5..42c7c99313 100644 --- a/patches/server/0929-Add-PlayerTradeEvent-and-PlayerPurchaseEvent.patch +++ b/patches/server/0929-Add-PlayerTradeEvent-and-PlayerPurchaseEvent.patch @@ -107,7 +107,7 @@ index 4c7e91977fa590abfe7eb3704d8008ed6d4e3ab3..32910f677b0522ac8ec513fa0d00b714 break; } diff --git a/src/main/java/net/minecraft/world/inventory/MerchantMenu.java b/src/main/java/net/minecraft/world/inventory/MerchantMenu.java -index ecefd4075c097e2118ec23e87baf36465c40f85f..2992e86f5f83431e230162380b33721df785ba91 100644 +index e45ab844afdf1a65f23eeff4c4d6cd9e3a8a28e2..5de2030452b96a4df7ce0be82f07e002db595dee 100644 --- a/src/main/java/net/minecraft/world/inventory/MerchantMenu.java +++ b/src/main/java/net/minecraft/world/inventory/MerchantMenu.java @@ -135,12 +135,12 @@ public class MerchantMenu extends AbstractContainerMenu { diff --git a/patches/server/0931-Add-api-for-spawn-egg-texture-colors.patch b/patches/server/0931-Add-api-for-spawn-egg-texture-colors.patch index bc65a0c926..f8a65ad281 100644 --- a/patches/server/0931-Add-api-for-spawn-egg-texture-colors.patch +++ b/patches/server/0931-Add-api-for-spawn-egg-texture-colors.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add api for spawn egg texture colors diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 9449fe944c7a06a8fdeaf0a0dfc7280950fdb6db..87e5ce7b30efe8ec99191208636b1420e4d002a1 100644 +index 5cbcfef31e2acdf27fc52f466ee70d9146d0228d..9ea1ce24d831a828ae3c9c9863aef12e46dd501d 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java @@ -637,6 +637,15 @@ public final class CraftMagicNumbers implements UnsafeValues { diff --git a/patches/server/0932-Add-Lifecycle-Event-system.patch b/patches/server/0932-Add-Lifecycle-Event-system.patch index cb31df174d..ec325e375d 100644 --- a/patches/server/0932-Add-Lifecycle-Event-system.patch +++ b/patches/server/0932-Add-Lifecycle-Event-system.patch @@ -719,7 +719,7 @@ index 2e96308696e131f3f013469a395e5ddda2c5d529..65a66e484c1c39c5f41d97db52f31c67 } catch (Throwable e) { LOGGER.error("Failed to run bootstrapper for %s. This plugin will not be loaded.".formatted(provider.getSource()), e); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 7ea2676397025bdbe20f88ec122bd6d545dcf959..61c19b1005dc387d671fd72331a8774c4c16c7ed 100644 +index 1df6635c5431fb33b476ecdf45bdbd2ce2b8920d..d803afb8ed566b4be1f651a945b5230b2f5f26db 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -1047,6 +1047,11 @@ public final class CraftServer implements Server { @@ -735,7 +735,7 @@ index 7ea2676397025bdbe20f88ec122bd6d545dcf959..61c19b1005dc387d671fd72331a8774c this.reloadCount++; this.configuration = YamlConfiguration.loadConfiguration(this.getConfigFile()); diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 87e5ce7b30efe8ec99191208636b1420e4d002a1..09cba6563ae754f51cfb352ba63e097fc2bd9b65 100644 +index 9ea1ce24d831a828ae3c9c9863aef12e46dd501d..ef56c54bd724137c1efbbac574e54027d7f7f5bc 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java @@ -646,6 +646,13 @@ public final class CraftMagicNumbers implements UnsafeValues { diff --git a/patches/server/0933-ItemStack-Tooltip-API.patch b/patches/server/0933-ItemStack-Tooltip-API.patch index 8858ce7085..bdec7c8b91 100644 --- a/patches/server/0933-ItemStack-Tooltip-API.patch +++ b/patches/server/0933-ItemStack-Tooltip-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] ItemStack Tooltip API diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 09cba6563ae754f51cfb352ba63e097fc2bd9b65..364202607498b376422d02d91965430e90d21fec 100644 +index ef56c54bd724137c1efbbac574e54027d7f7f5bc..9739f2d97ea64452a92f254cb2d0e1274c691944 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java @@ -622,6 +622,21 @@ public final class CraftMagicNumbers implements UnsafeValues { diff --git a/patches/server/0937-improve-BanList-types.patch b/patches/server/0937-improve-BanList-types.patch index 9e9699167e..be98af338a 100644 --- a/patches/server/0937-improve-BanList-types.patch +++ b/patches/server/0937-improve-BanList-types.patch @@ -5,7 +5,7 @@ Subject: [PATCH] improve BanList types diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 61c19b1005dc387d671fd72331a8774c4c16c7ed..b72a71d6a37956b0f4ca74c2ed8eaf044cac4b81 100644 +index d803afb8ed566b4be1f651a945b5230b2f5f26db..36997d8d15c23587317b4c115726892980a9086e 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -2254,6 +2254,21 @@ public final class CraftServer implements Server { diff --git a/patches/server/0948-Fix-DamageSource-API.patch b/patches/server/0948-Fix-DamageSource-API.patch index d9d164622a..d0e22f931c 100644 --- a/patches/server/0948-Fix-DamageSource-API.patch +++ b/patches/server/0948-Fix-DamageSource-API.patch @@ -220,10 +220,10 @@ index 4c6e15535fa40aad8cf1920f392589404f9ba79c..35eb95ef6fb6a0f7ea63351e90741c48 } } diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index d7bf00745a9016d0fe0c1d39ffaaac44276251d4..67aa8ebd1c4915fc7f18e3cf263eedf9b671a632 100644 +index 55d20ca20003fb0ee62a9730d31d1a741951aa3d..8d40f6008fa97db39af46ab4b43656c28571ea41 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1088,7 +1088,7 @@ public class CraftEventFactory { +@@ -1092,7 +1092,7 @@ public class CraftEventFactory { private static EntityDamageEvent handleEntityDamageEvent(Entity entity, DamageSource source, Map<DamageModifier, Double> modifiers, Map<DamageModifier, Function<? super Double, Double>> modifierFunctions, boolean cancelled) { CraftDamageSource bukkitDamageSource = new CraftDamageSource(source); diff --git a/patches/server/0949-Fix-creation-of-invalid-block-entity-during-world-ge.patch b/patches/server/0949-Fix-creation-of-invalid-block-entity-during-world-ge.patch index d810be487e..8e09c4fb05 100644 --- a/patches/server/0949-Fix-creation-of-invalid-block-entity-during-world-ge.patch +++ b/patches/server/0949-Fix-creation-of-invalid-block-entity-during-world-ge.patch @@ -36,10 +36,10 @@ index 682c8cfbd917c086072f1756861a340800ea40da..b26a4a38144ec1b171db911bbf949b53 nbttagcompound.putInt("x", pos.getX()); diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -index c7be1f8fdca34bcc12ecbe40ee5f426e0cd068d7..7f8983a2102787b13e5d28d6981055da6acd1012 100644 +index 59f9ff720e92c69e11afe7f6ccecd81b0e54a74d..86eb9029969f4de3ada7be9e135e9764172b85f5 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -@@ -956,9 +956,14 @@ public class LevelChunk extends ChunkAccess { +@@ -961,9 +961,14 @@ public class LevelChunk extends ChunkAccess { if (this.blockEntity.getType().isValid(iblockdata)) { this.ticker.tick(LevelChunk.this.level, this.blockEntity.getBlockPos(), iblockdata, this.blockEntity); this.loggedInvalidBlockState = false; diff --git a/patches/server/0952-Item-Mutation-Fixes.patch b/patches/server/0952-Item-Mutation-Fixes.patch index 0e20a90a87..bad3be61f9 100644 --- a/patches/server/0952-Item-Mutation-Fixes.patch +++ b/patches/server/0952-Item-Mutation-Fixes.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Item Mutation Fixes diff --git a/src/main/java/net/minecraft/world/inventory/EnchantmentMenu.java b/src/main/java/net/minecraft/world/inventory/EnchantmentMenu.java -index c1b9c3ad2cccfa520e9d73b786142624ac5f3380..07223046761cb2186d75de8edc03a91d2e8e8b2f 100644 +index fff1c39920e7d7051dfe3dd39c77865d3bdf113e..1ef014b29645ed09ccffb898f1819428c3dc6259 100644 --- a/src/main/java/net/minecraft/world/inventory/EnchantmentMenu.java +++ b/src/main/java/net/minecraft/world/inventory/EnchantmentMenu.java -@@ -235,7 +235,7 @@ public class EnchantmentMenu extends AbstractContainerMenu { +@@ -232,7 +232,7 @@ public class EnchantmentMenu extends AbstractContainerMenu { return false; } else if (this.costs[id] > 0 && !itemstack.isEmpty() && (player.experienceLevel >= j && player.experienceLevel >= this.costs[id] || player.getAbilities().instabuild)) { this.access.execute((world, blockposition) -> { @@ -17,7 +17,7 @@ index c1b9c3ad2cccfa520e9d73b786142624ac5f3380..07223046761cb2186d75de8edc03a91d List<EnchantmentInstance> list = this.getEnchantmentList(world.registryAccess(), itemstack, id, this.costs[id]); // CraftBukkit start -@@ -258,10 +258,16 @@ public class EnchantmentMenu extends AbstractContainerMenu { +@@ -255,10 +255,16 @@ public class EnchantmentMenu extends AbstractContainerMenu { return; } // CraftBukkit end diff --git a/patches/server/0953-Per-world-ticks-per-spawn-settings.patch b/patches/server/0953-Per-world-ticks-per-spawn-settings.patch index ea163724cf..0d7c9ea5b4 100644 --- a/patches/server/0953-Per-world-ticks-per-spawn-settings.patch +++ b/patches/server/0953-Per-world-ticks-per-spawn-settings.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Per world ticks per spawn settings diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 2f1acea765d1b6726863cdc89707ca6148548493..81bdb6e64e04641f741c2c3350236685b097ec7a 100644 +index 471fd54edf6aa962d997878ee638974f7f594fa8..b7bf7b3b91046c81467aeb483087e12b6d9191bf 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java @@ -186,6 +186,15 @@ public abstract class Level implements LevelAccessor, AutoCloseable { diff --git a/patches/server/0955-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch b/patches/server/0955-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch index 3fdb9f8fe4..419e036508 100644 --- a/patches/server/0955-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch +++ b/patches/server/0955-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch @@ -107,10 +107,10 @@ index e6bfbe2588e0c2a1be14e38d654e889d392ad4db..e0c62227b279a5fe0f3868fbf9ce8c78 world.playSound((Player) null, pos, SoundEvents.PISTON_CONTRACT, SoundSource.BLOCKS, 0.5F, world.random.nextFloat() * 0.15F + 0.6F); diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java -index 87289d8ab94705999c67457a28538e7a5576acc3..fe7dc02ea55c2bcd39d12bfd4d315f0b8c7014c3 100644 +index 240c250a93289776686d09d7eae17c07d7278da5..f2036917c5ba9f536087d7ee559704055469730e 100644 --- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java +++ b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java -@@ -173,7 +173,7 @@ public abstract class BlockBehaviour implements FeatureElement { +@@ -174,7 +174,7 @@ public abstract class BlockBehaviour implements FeatureElement { } protected void onExplosionHit(BlockState state, Level world, BlockPos pos, Explosion explosion, BiConsumer<ItemStack, BlockPos> stackMerger) { @@ -119,7 +119,7 @@ index 87289d8ab94705999c67457a28538e7a5576acc3..fe7dc02ea55c2bcd39d12bfd4d315f0b Block block = state.getBlock(); boolean flag = explosion.getIndirectSourceEntity() instanceof Player; -@@ -253,7 +253,7 @@ public abstract class BlockBehaviour implements FeatureElement { +@@ -254,7 +254,7 @@ public abstract class BlockBehaviour implements FeatureElement { } protected boolean canBeReplaced(BlockState state, BlockPlaceContext context) { @@ -128,7 +128,7 @@ index 87289d8ab94705999c67457a28538e7a5576acc3..fe7dc02ea55c2bcd39d12bfd4d315f0b } protected boolean canBeReplaced(BlockState state, Fluid fluid) { -@@ -882,6 +882,12 @@ public abstract class BlockBehaviour implements FeatureElement { +@@ -883,6 +883,12 @@ public abstract class BlockBehaviour implements FeatureElement { return this.legacySolid; } @@ -141,7 +141,7 @@ index 87289d8ab94705999c67457a28538e7a5576acc3..fe7dc02ea55c2bcd39d12bfd4d315f0b public boolean isValidSpawn(BlockGetter world, BlockPos pos, EntityType<?> type) { return this.getBlock().properties.isValidSpawn.test(this.asState(), world, pos, type); } -@@ -985,7 +991,7 @@ public abstract class BlockBehaviour implements FeatureElement { +@@ -986,7 +992,7 @@ public abstract class BlockBehaviour implements FeatureElement { } public PushReaction getPistonPushReaction() { diff --git a/patches/server/0958-Deep-clone-nbt-tags-in-PDC.patch b/patches/server/0958-Deep-clone-nbt-tags-in-PDC.patch index f833a51efa..f559f0cd9d 100644 --- a/patches/server/0958-Deep-clone-nbt-tags-in-PDC.patch +++ b/patches/server/0958-Deep-clone-nbt-tags-in-PDC.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Deep clone nbt tags in PDC diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index 5a455354561389194b0e61c03f4b2e9285b17a3b..2cf89147025066f34c12b9956d18451487fb2799 100644 +index 11f55ef2645d50bbc24bd245ffe3ac98180315d8..ba49ac74a19ee1f14706c7f769aac35fa821ef7d 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java @@ -322,7 +322,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @@ -17,7 +17,7 @@ index 5a455354561389194b0e61c03f4b2e9285b17a3b..2cf89147025066f34c12b9956d184514 this.customTag = meta.customTag; -@@ -1690,7 +1690,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1697,7 +1697,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { clone.customTag = this.customTag.copy(); } clone.removedTags = Sets.newHashSet(this.removedTags); diff --git a/patches/server/0959-Support-old-UUID-format-for-NBT.patch b/patches/server/0959-Support-old-UUID-format-for-NBT.patch index a38c2a7f7b..68ff8a5255 100644 --- a/patches/server/0959-Support-old-UUID-format-for-NBT.patch +++ b/patches/server/0959-Support-old-UUID-format-for-NBT.patch @@ -8,7 +8,7 @@ We have stored UUID in plenty of places that did not get DFU'd So just look for old format and load it if it exists. diff --git a/src/main/java/net/minecraft/nbt/CompoundTag.java b/src/main/java/net/minecraft/nbt/CompoundTag.java -index df246d69591e1a5822a0109c99b0f67996da71fa..4e005b7b062e3231f564d284887ea1c2783a4e7d 100644 +index e88161e662d5605b50aead673c9b3794874e5f7f..d7bb00a946346dff0b0269cbd65276e146a63fb0 100644 --- a/src/main/java/net/minecraft/nbt/CompoundTag.java +++ b/src/main/java/net/minecraft/nbt/CompoundTag.java @@ -232,6 +232,12 @@ public class CompoundTag implements Tag { diff --git a/patches/server/0962-Fix-ItemFlags.patch b/patches/server/0962-Fix-ItemFlags.patch index d750443ba5..46e55a9780 100644 --- a/patches/server/0962-Fix-ItemFlags.patch +++ b/patches/server/0962-Fix-ItemFlags.patch @@ -33,7 +33,7 @@ index 73fe41322e0349ad1d46a760f621b6c91112e90e..19af55ec2bf62b70bd3be44f499b32f5 @Override diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index 2cf89147025066f34c12b9956d18451487fb2799..078b75f027b99a8a2a6a3ee19d087acc03eefe12 100644 +index ba49ac74a19ee1f14706c7f769aac35fa821ef7d..6f3ab40a9d0bccd9a2c439bf0e200ba5cf0f5f6e 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java @@ -245,6 +245,12 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @@ -81,7 +81,7 @@ index 2cf89147025066f34c12b9956d18451487fb2799..078b75f027b99a8a2a6a3ee19d087acc Set<Map.Entry<DataComponentType<?>, Optional<?>>> keys = tag.entrySet(); for (Map.Entry<DataComponentType<?>, Optional<?>> key : keys) { -@@ -620,7 +644,15 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -627,7 +651,15 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { try { CompoundTag unhandledTag = NbtIo.readCompressed(buf, NbtAccounter.unlimitedHeap()); DataComponentPatch unhandledPatch = DataComponentPatch.CODEC.parse(MinecraftServer.getDefaultRegistryAccess().createSerializationContext(NbtOps.INSTANCE), unhandledTag).result().get(); @@ -98,7 +98,7 @@ index 2cf89147025066f34c12b9956d18451487fb2799..078b75f027b99a8a2a6a3ee19d087acc for (Entry<DataComponentType<?>, Optional<?>> entry : unhandledPatch.entrySet()) { // Move removed unhandled tags to dedicated removedTags -@@ -863,6 +895,15 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -870,6 +902,15 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { itemTag.put(CraftMetaItem.MAX_DAMAGE, this.maxDamage); } @@ -114,7 +114,7 @@ index 2cf89147025066f34c12b9956d18451487fb2799..078b75f027b99a8a2a6a3ee19d087acc for (Map.Entry<DataComponentType<?>, Optional<?>> e : this.unhandledTags.build().entrySet()) { e.getValue().ifPresent((value) -> { itemTag.builder.set((DataComponentType) e.getKey(), value); -@@ -951,7 +992,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -958,7 +999,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @Overridden boolean isEmpty() { @@ -123,7 +123,7 @@ index 2cf89147025066f34c12b9956d18451487fb2799..078b75f027b99a8a2a6a3ee19d087acc } // Paper start -@@ -1621,6 +1662,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1628,6 +1669,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { && (this.hasJukeboxPlayable() ? that.hasJukeboxPlayable() && this.jukebox.equals(that.jukebox) : !that.hasJukeboxPlayable()) && (this.hasDamage() ? that.hasDamage() && this.damage == that.damage : !that.hasDamage()) && (this.hasMaxDamage() ? that.hasMaxDamage() && this.maxDamage.equals(that.maxDamage) : !that.hasMaxDamage()) @@ -132,7 +132,7 @@ index 2cf89147025066f34c12b9956d18451487fb2799..078b75f027b99a8a2a6a3ee19d087acc && (this.version == that.version); } -@@ -1666,6 +1709,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1673,6 +1716,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { hash = 61 * hash + (this.hasDamage() ? this.damage : 0); hash = 61 * hash + (this.hasMaxDamage() ? 1231 : 1237); hash = 61 * hash + (this.hasAttributeModifiers() ? this.attributeModifiers.hashCode() : 0); @@ -141,7 +141,7 @@ index 2cf89147025066f34c12b9956d18451487fb2799..078b75f027b99a8a2a6a3ee19d087acc hash = 61 * hash + this.version; return hash; } -@@ -1710,6 +1755,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1717,6 +1762,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { clone.damage = this.damage; clone.maxDamage = this.maxDamage; clone.version = this.version; @@ -156,7 +156,7 @@ index 2cf89147025066f34c12b9956d18451487fb2799..078b75f027b99a8a2a6a3ee19d087acc return clone; } catch (CloneNotSupportedException e) { throw new Error(e); -@@ -1827,6 +1880,16 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1834,6 +1887,16 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { } } @@ -173,7 +173,7 @@ index 2cf89147025066f34c12b9956d18451487fb2799..078b75f027b99a8a2a6a3ee19d087acc if (!this.unhandledTags.isEmpty()) { Tag unhandled = DataComponentPatch.CODEC.encodeStart(MinecraftServer.getDefaultRegistryAccess().createSerializationContext(NbtOps.INSTANCE), this.unhandledTags.build()).getOrThrow(IllegalStateException::new); try { -@@ -1837,6 +1900,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1844,6 +1907,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { Logger.getLogger(CraftMetaItem.class.getName()).log(Level.SEVERE, null, ex); } } @@ -188,7 +188,7 @@ index 2cf89147025066f34c12b9956d18451487fb2799..078b75f027b99a8a2a6a3ee19d087acc if (!this.removedTags.isEmpty()) { RegistryAccess registryAccess = CraftRegistry.getMinecraftRegistry(); -@@ -1990,6 +2061,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1997,6 +2068,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { CraftMetaItem.MAX_DAMAGE.TYPE, CraftMetaItem.CUSTOM_DATA.TYPE, CraftMetaItem.ATTRIBUTES.TYPE, diff --git a/patches/server/0963-Fix-Player-setBlockUpdate.patch b/patches/server/0963-Fix-Player-setBlockUpdate.patch index 81049f5c54..af479baa93 100644 --- a/patches/server/0963-Fix-Player-setBlockUpdate.patch +++ b/patches/server/0963-Fix-Player-setBlockUpdate.patch @@ -18,7 +18,7 @@ index 397eb1a101bd60f49dbb2fa8eddf28f6f233167f..e28bc898786542f695017ff0a0366768 } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 4d3838c5184296451089697fd3f7438a7f1be762..94524dee7e3ff78d378bd7812c49d041d07e138d 100644 +index 1490d15f1ffa83653b20a4bb47584c4c554a3384..29c5855b9d31e803eb856584b92dfd35f6fad39a 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1118,6 +1118,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0964-Fix-helmet-damage-reduction-inconsistencies.patch b/patches/server/0964-Fix-helmet-damage-reduction-inconsistencies.patch index 065e1dca21..5625be10a3 100644 --- a/patches/server/0964-Fix-helmet-damage-reduction-inconsistencies.patch +++ b/patches/server/0964-Fix-helmet-damage-reduction-inconsistencies.patch @@ -7,10 +7,10 @@ Affect the falling stalactite damage type where the reduction is not applied like in Vanilla diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 67aa8ebd1c4915fc7f18e3cf263eedf9b671a632..0ab53d46f0b8f3f3791dd01766738522c86932e8 100644 +index 8d40f6008fa97db39af46ab4b43656c28571ea41..157a0eb8194c8fb6da4d0322b40c805918867e7f 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1222,7 +1222,7 @@ public class CraftEventFactory { +@@ -1226,7 +1226,7 @@ public class CraftEventFactory { modifiers.put(DamageModifier.FREEZING, freezingModifier); modifierFunctions.put(DamageModifier.FREEZING, freezing); } diff --git a/patches/server/0966-improve-checking-handled-tags-in-itemmeta.patch b/patches/server/0966-improve-checking-handled-tags-in-itemmeta.patch index 6e7216cfea..aa8b2ec38f 100644 --- a/patches/server/0966-improve-checking-handled-tags-in-itemmeta.patch +++ b/patches/server/0966-improve-checking-handled-tags-in-itemmeta.patch @@ -4,11 +4,41 @@ Date: Mon, 10 Jul 2023 16:10:15 -0700 Subject: [PATCH] improve checking handled tags in itemmeta +diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java +index abba0986cc562f688682ba5e4822837a503586eb..5ac263889ff9cc4f4f6365ccb57917a23ad6edc1 100644 +--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java ++++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java +@@ -111,5 +111,10 @@ public class CraftMushroomCow extends CraftCow implements MushroomCow, io.paperm + public void setSheared(boolean sheared) { + if (sheared) this.shear(); + } ++ ++ @Override ++ public boolean isSheared() { ++ return false; ++ } + // Paper end + } +diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowman.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowman.java +index a0bd62d6abaa195bc49063fa23e87a7697f24b99..05cee4906169425ee6e80cf1302f2fa01f09d58f 100644 +--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowman.java ++++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowman.java +@@ -34,5 +34,10 @@ public class CraftSnowman extends CraftGolem implements Snowman, com.destroystok + public void setSheared(boolean sheared) { + this.setDerp(sheared); + } ++ ++ @Override ++ public boolean isSheared() { ++ return this.isDerp(); ++ } + // Paper end + } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemMetas.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemMetas.java -index a6c78854c10362864c2297de903ab9594cdb1eb6..251aac8690f15be2ad0e3f6399676205b7d7860c 100644 +index a4c4ba0d02f9a072236ce86c1e98e2c60b059cb8..c9cda18761c6f925f7490984a7e035396a44a73a 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemMetas.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemMetas.java -@@ -32,116 +32,116 @@ import org.bukkit.inventory.meta.TropicalFishBucketMeta; +@@ -39,120 +39,120 @@ import org.bukkit.inventory.meta.TropicalFishBucketMeta; public final class CraftItemMetas { @@ -107,6 +137,11 @@ index a6c78854c10362864c2297de903ab9594cdb1eb6..251aac8690f15be2ad0e3f6399676205 + (item, extras) -> new CraftMetaBlockState(item.getComponentsPatch(), CraftItemType.minecraftToBukkit(item.getItem()), extras), (type, meta) -> new CraftMetaBlockState(meta, type.asMaterial())); + private static final ItemMetaData<ShieldMeta> SHIELD_META_DATA = new ItemMetaData<>(ShieldMeta.class, +- item -> new CraftMetaShield(item.getComponentsPatch()), ++ (item, extras) -> new CraftMetaShield(item.getComponentsPatch()), // Paper + (type, meta) -> new CraftMetaShield(meta)); + private static final ItemMetaData<TropicalFishBucketMeta> TROPICAL_FISH_BUCKET_META_DATA = new ItemMetaData<>(TropicalFishBucketMeta.class, - item -> new CraftMetaTropicalFishBucket(item.getComponentsPatch()), + (item, extras) -> new CraftMetaTropicalFishBucket(item.getComponentsPatch(), extras), @@ -286,10 +321,10 @@ index c56fb1eeea79176c4dbb1e9c0a8023f86220fe6a..1c17fb294d83d99ae657eff6a8a986bf getOrEmpty(tag, CraftMetaBanner.PATTERNS).ifPresent((entityTag) -> { List<BannerPatternLayers.Layer> patterns = entityTag.layers(); diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java -index 4faada5f974214f3054dc1bec9c79e2600c8df48..d7e5491cc0296563fb9fdf28d64b21a10c08ea4a 100644 +index 23dbc56edf0d16cf07ced2899942abae28397694..ed6e9d1f2d42392d92f4e3ae6f67c8d4ed700fb5 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java -@@ -69,8 +69,8 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta +@@ -70,8 +70,8 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta this.blockEntityTag = te.blockEntityTag; } @@ -301,7 +336,7 @@ index 4faada5f974214f3054dc1bec9c79e2600c8df48..d7e5491cc0296563fb9fdf28d64b21a1 getOrEmpty(tag, CraftMetaBlockState.BLOCK_ENTITY_TAG).ifPresent((nbt) -> { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java -index 552ebe67f87b48734adf0da8ef78dcac9dd670a2..e064af399dcae40b4f35aa993d356b1462f91d6c 100644 +index 32e5188442551b3e72e1d4826d836d622d0e438a..257c835bc280eee9ee73ae75b5249bb568a687d0 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java @@ -64,8 +64,8 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta, WritableBo @@ -316,7 +351,7 @@ index 552ebe67f87b48734adf0da8ef78dcac9dd670a2..e064af399dcae40b4f35aa993d356b14 getOrEmpty(tag, CraftMetaBook.BOOK_CONTENT).ifPresent((writable) -> { List<Filterable<String>> pages = writable.pages(); diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBookSigned.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBookSigned.java -index 162997fc80dfe2df1f13c802c1b610f04cb9d05a..806c1cbee7c4e23eee38c8f400ec2d924c9a360c 100644 +index fd3b12477c30d1eabdbe57ea779027931e9dd957..cbb3d80cc7cd81b2505dff999a0baede737165f7 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBookSigned.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBookSigned.java @@ -78,8 +78,8 @@ public class CraftMetaBookSigned extends CraftMetaItem implements BookMeta { @@ -451,7 +486,7 @@ index 8c1d2d0521da52f9a1262f5433da21700b9b0454..9600b23666668d7d581e2920a4e03e59 getOrEmpty(tag, CraftMetaFirework.FIREWORKS).ifPresent((fireworks) -> { this.power = fireworks.flightDuration(); diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index 078b75f027b99a8a2a6a3ee19d087acc03eefe12..1903a6948242e2dc40302a0acb9171fc3cc3000e 100644 +index 6f3ab40a9d0bccd9a2c439bf0e200ba5cf0f5f6e..f9025eb9d733258a08fd31197920a93e2481f308 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java @@ -339,7 +339,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @@ -481,7 +516,7 @@ index 078b75f027b99a8a2a6a3ee19d087acc03eefe12..1903a6948242e2dc40302a0acb9171fc key.getValue().ifPresent((value) -> { this.unhandledTags.set((DataComponentType) key.getKey(), value); }); -@@ -2036,67 +2043,75 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -2043,68 +2050,76 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { this.version = version; } @@ -521,6 +556,7 @@ index 078b75f027b99a8a2a6a3ee19d087acc03eefe12..1903a6948242e2dc40302a0acb9171fc - CraftMetaMap.MAP_COLOR.TYPE, - CraftMetaMap.MAP_ID.TYPE, - CraftMetaPotion.POTION_CONTENTS.TYPE, +- CraftMetaShield.BASE_COLOR.TYPE, - CraftMetaSkull.SKULL_PROFILE.TYPE, - CraftMetaSkull.NOTE_BLOCK_SOUND.TYPE, - CraftMetaSpawnEgg.ENTITY_TAG.TYPE, @@ -597,6 +633,7 @@ index 078b75f027b99a8a2a6a3ee19d087acc03eefe12..1903a6948242e2dc40302a0acb9171fc + map.put(CraftMetaMusicInstrument.class, Set.of(CraftMetaMusicInstrument.GOAT_HORN_INSTRUMENT.TYPE)); + map.put(CraftMetaOminousBottle.class, Set.of(CraftMetaOminousBottle.OMINOUS_BOTTLE_AMPLIFIER.TYPE)); + map.put(CraftMetaPotion.class, Set.of(CraftMetaPotion.POTION_CONTENTS.TYPE)); ++ map.put(CraftMetaShield.class, Set.of(CraftMetaShield.BASE_COLOR.TYPE)); + map.put(CraftMetaSkull.class, Set.of(CraftMetaSkull.SKULL_PROFILE.TYPE, CraftMetaSkull.NOTE_BLOCK_SOUND.TYPE)); + map.put(CraftMetaSpawnEgg.class, Set.of(CraftMetaSpawnEgg.ENTITY_TAG.TYPE)); + map.put(CraftMetaSuspiciousStew.class, Set.of(CraftMetaSuspiciousStew.EFFECTS.TYPE)); @@ -706,6 +743,19 @@ index d1cb8d520b6d7b0981d70412def71e7aab04560a..7f9182809f6e67ff571db0f365bc7e05 getOrEmpty(tag, CraftMetaPotion.POTION_CONTENTS).ifPresent((potionContents) -> { potionContents.potion().ifPresent((potion) -> { this.type = CraftPotionType.minecraftHolderToBukkit(potion); +diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaShield.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaShield.java +index 2ad744875fea490eb8aa3883e4567ec1824c811a..c98b1cb9a2aca9c1e76893b4c9c851c747c13bcd 100644 +--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaShield.java ++++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaShield.java +@@ -44,7 +44,7 @@ public class CraftMetaShield extends CraftMetaItem implements ShieldMeta, BlockS + } + + CraftMetaShield(DataComponentPatch tag) { +- super(tag); ++ super(tag, null); // Paper + + getOrEmpty(tag, CraftMetaShield.BASE_COLOR).ifPresent((color) -> { + this.banner = CraftMetaShield.getBlockState(DyeColor.getByWoolData((byte) color.getId())); diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java index d6e161374e0235031128a6ee86d1ffa875ea48aa..ab860f1179fa2618c8fbc30ac5f48ff78b8abb60 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java @@ -722,7 +772,7 @@ index d6e161374e0235031128a6ee86d1ffa875ea48aa..ab860f1179fa2618c8fbc30ac5f48ff7 getOrEmpty(tag, CraftMetaSkull.SKULL_PROFILE).ifPresent((resolvableProfile) -> { this.setProfile(resolvableProfile.gameProfile()); diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java -index 2c6ee95edea9dc959d8d31d689dc27fea4080467..e4b8637e6d82e2ce7cfee2130e6422f0ef4e1fbc 100644 +index 6c2c3b514be0dab47f3e44f65bdc6a3574e59b7c..8ddf091b3ff1262b6c97e8fe72e0a80db5e1037d 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java @@ -33,8 +33,8 @@ public class CraftMetaSpawnEgg extends CraftMetaItem implements SpawnEggMeta { diff --git a/patches/server/0967-General-ItemMeta-fixes.patch b/patches/server/0967-General-ItemMeta-fixes.patch index 321e5f3b03..f6e11d8a64 100644 --- a/patches/server/0967-General-ItemMeta-fixes.patch +++ b/patches/server/0967-General-ItemMeta-fixes.patch @@ -12,7 +12,7 @@ public net/minecraft/world/level/block/entity/BlockEntity saveId(Lnet/minecraft/ Co-authored-by: GhastCraftHD <[email protected]> diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index fa4bdf8bdbd6eaeb854e62a2acb45d7998e4aa2b..8309d2f7872ccdbc9d76f0fbf481411f74080148 100644 +index ebe470ca361ec5747a843b60d82f567d41d7c9fa..f9a4bebb321207abb00b1af1c17ebda623cc950e 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java @@ -1275,6 +1275,11 @@ public final class ItemStack implements DataComponentHolder { @@ -28,10 +28,10 @@ index fa4bdf8bdbd6eaeb854e62a2acb45d7998e4aa2b..8309d2f7872ccdbc9d76f0fbf481411f // CraftBukkit end diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java -index 6207c6063cd11ccb1177fe7016c49c02a3416990..cd3b952a228c09077c2e74183a34ddb32811280b 100644 +index f4579be015c213917fc0e3f96218a4e7f4877d73..caba661b16c24320277520bbdb25bcfa83d4b040 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java -@@ -139,6 +139,11 @@ public abstract class BlockEntity { +@@ -152,6 +152,11 @@ public abstract class BlockEntity { CompoundTag nbttagcompound = new CompoundTag(); this.saveAdditional(nbttagcompound, registryLookup); @@ -158,10 +158,10 @@ index 1c17fb294d83d99ae657eff6a8a986bf72c6ec47..b9d6a4a8f78a0e26d888b6bfdff25c3a for (Pattern p : this.patterns) { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java -index d7e5491cc0296563fb9fdf28d64b21a10c08ea4a..224ea52574b80bb087c5c62eaf1d46261c1252af 100644 +index ed6e9d1f2d42392d92f4e3ae6f67c8d4ed700fb5..0ec38517b3456958a19fc3162b5532a4e00550cf 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java -@@ -50,9 +50,24 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta +@@ -51,9 +51,24 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta @ItemMetaKey.Specific(ItemMetaKey.Specific.To.NBT) static final ItemMetaKeyType<CustomData> BLOCK_ENTITY_TAG = new ItemMetaKeyType<>(DataComponents.BLOCK_ENTITY_DATA, "BlockEntityTag"); @@ -181,13 +181,13 @@ index d7e5491cc0296563fb9fdf28d64b21a10c08ea4a..224ea52574b80bb087c5c62eaf1d4626 + this.blockEntityTag = this.blockEntityTag != null ? this.blockEntityTag : CustomData.EMPTY; + } + private Material materialForBlockEntityType() { -+ return (this.material != Material.SHIELD) ? this.material : CraftMetaBlockState.shieldToBannerHack(); ++ return (this.material != Material.SHIELD) ? this.material : CraftMetaBlockState.shieldToBannerHack(this.blockEntityTag.getUnsafe()); + } + // Paper end private CompoundTag internalTag; CraftMetaBlockState(CraftMetaItem meta, Material material) { -@@ -61,41 +76,61 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta +@@ -62,41 +77,61 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta if (!(meta instanceof CraftMetaBlockState) || ((CraftMetaBlockState) meta).material != material) { @@ -262,19 +262,16 @@ index d7e5491cc0296563fb9fdf28d64b21a10c08ea4a..224ea52574b80bb087c5c62eaf1d4626 } } -@@ -108,7 +143,10 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta - } else { +@@ -110,7 +145,7 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta this.material = Material.AIR; } -- this.blockEntityTag = CraftMetaBlockState.getBlockState(this.material, this.internalTag); -+ // Paper start -+ if (this.internalTag != null) { // legacy -+ this.setBlockState(CraftMetaBlockState.getBlockState(this.material, this.internalTag)); -+ } - this.internalTag = null; + if (this.internalTag != null) { +- this.blockEntityTag = CraftMetaBlockState.getBlockState(this.material, this.internalTag); ++ this.setBlockState(CraftMetaBlockState.getBlockState(this.material, this.internalTag)); // Paper + this.internalTag = null; + } } - -@@ -116,13 +154,21 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta +@@ -119,13 +154,21 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta void applyToItem(CraftMetaItem.Applicator tag) { super.applyToItem(tag); @@ -301,7 +298,7 @@ index d7e5491cc0296563fb9fdf28d64b21a10c08ea4a..224ea52574b80bb087c5c62eaf1d4626 } @Override -@@ -131,14 +177,29 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta +@@ -134,14 +177,29 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta if (tag.contains(CraftMetaBlockState.BLOCK_ENTITY_TAG.NBT, CraftMagicNumbers.NBT.TAG_COMPOUND)) { this.internalTag = tag.getCompound(CraftMetaBlockState.BLOCK_ENTITY_TAG.NBT); @@ -333,7 +330,7 @@ index d7e5491cc0296563fb9fdf28d64b21a10c08ea4a..224ea52574b80bb087c5c62eaf1d4626 } @Override -@@ -152,9 +213,10 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta +@@ -155,9 +213,10 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta int applyHash() { final int original; int hash = original = super.applyHash(); @@ -347,7 +344,7 @@ index d7e5491cc0296563fb9fdf28d64b21a10c08ea4a..224ea52574b80bb087c5c62eaf1d4626 return original != hash ? CraftMetaBlockState.class.hashCode() ^ hash : hash; } -@@ -166,45 +228,71 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta +@@ -169,45 +228,71 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta if (meta instanceof CraftMetaBlockState) { CraftMetaBlockState that = (CraftMetaBlockState) meta; @@ -429,9 +426,9 @@ index d7e5491cc0296563fb9fdf28d64b21a10c08ea4a..224ea52574b80bb087c5c62eaf1d4626 } private static CraftBlockEntityState<?> getBlockState(Material material, CompoundTag blockEntityTag) { -@@ -234,7 +322,23 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta +@@ -237,7 +322,23 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta Class<?> blockStateType = CraftBlockStates.getBlockStateType(stateMaterial); - Preconditions.checkArgument(blockStateType == blockState.getClass() && blockState instanceof CraftBlockEntityState, "Invalid blockState for " + this.material); + Preconditions.checkArgument(blockStateType == blockState.getClass() && blockState instanceof CraftBlockEntityState, "Invalid blockState for %s", this.material); - this.blockEntityTag = (CraftBlockEntityState<?>) blockState; + // Paper start - when a new BlockState is set, the components from that block entity @@ -453,7 +450,7 @@ index d7e5491cc0296563fb9fdf28d64b21a10c08ea4a..224ea52574b80bb087c5c62eaf1d4626 + // Paper end } - private static Material shieldToBannerHack() { + private static Material shieldToBannerHack(CompoundTag tag) { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java index 257c835bc280eee9ee73ae75b5249bb568a687d0..70f20de37c1f8d57a8d9fe00dcd864fdd9948ec2 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java @@ -805,7 +802,7 @@ index 9600b23666668d7d581e2920a4e03e59cc2339fb..0eceacbb096481d3bd31f5f99e964c88 } } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index 1903a6948242e2dc40302a0acb9171fc3cc3000e..a9acbb181dd72238b63fb08fda1b3bc0d246e36e 100644 +index f9025eb9d733258a08fd31197920a93e2481f308..4de88523eda52fc20e06aa85c54890f5dd95a912 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java @@ -182,9 +182,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @@ -851,7 +848,7 @@ index 1903a6948242e2dc40302a0acb9171fc3cc3000e..a9acbb181dd72238b63fb08fda1b3bc0 CraftMetaItem.getOrEmpty(tag, CraftMetaItem.NAME).ifPresent((component) -> { this.displayName = component; }); -@@ -791,7 +797,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -798,7 +804,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { Map<?, ?> mods = SerializableMeta.getObject(Map.class, map, key.BUKKIT, true); Multimap<Attribute, AttributeModifier> result = LinkedHashMultimap.create(); if (mods == null) { @@ -860,7 +857,7 @@ index 1903a6948242e2dc40302a0acb9171fc3cc3000e..a9acbb181dd72238b63fb08fda1b3bc0 } for (Object obj : mods.keySet()) { -@@ -894,7 +900,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -901,7 +907,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { itemTag.put(CraftMetaItem.JUKEBOX_PLAYABLE, this.jukebox.getHandle()); } @@ -869,7 +866,7 @@ index 1903a6948242e2dc40302a0acb9171fc3cc3000e..a9acbb181dd72238b63fb08fda1b3bc0 itemTag.put(CraftMetaItem.DAMAGE, this.damage); } -@@ -959,10 +965,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -966,10 +972,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { } void applyModifiers(Multimap<Attribute, AttributeModifier> modifiers, CraftMetaItem.Applicator tag) { @@ -882,7 +879,7 @@ index 1903a6948242e2dc40302a0acb9171fc3cc3000e..a9acbb181dd72238b63fb08fda1b3bc0 return; } -@@ -999,7 +1003,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1006,7 +1010,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @Overridden boolean isEmpty() { @@ -891,7 +888,7 @@ index 1903a6948242e2dc40302a0acb9171fc3cc3000e..a9acbb181dd72238b63fb08fda1b3bc0 } // Paper start -@@ -1095,6 +1099,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1102,6 +1106,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @Override public void lore(final List<? extends net.kyori.adventure.text.Component> lore) { @@ -899,7 +896,7 @@ index 1903a6948242e2dc40302a0acb9171fc3cc3000e..a9acbb181dd72238b63fb08fda1b3bc0 this.lore = lore != null ? io.papermc.paper.adventure.PaperAdventure.asVanilla(lore) : null; } // Paper end -@@ -1153,7 +1158,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1160,7 +1165,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @Override public void removeEnchantments() { if (this.hasEnchants()) { @@ -908,7 +905,7 @@ index 1903a6948242e2dc40302a0acb9171fc3cc3000e..a9acbb181dd72238b63fb08fda1b3bc0 } } -@@ -1219,6 +1224,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1226,6 +1231,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { // Paper end @Override public void setLore(List<String> lore) { @@ -916,7 +913,7 @@ index 1903a6948242e2dc40302a0acb9171fc3cc3000e..a9acbb181dd72238b63fb08fda1b3bc0 if (lore == null || lore.isEmpty()) { this.lore = null; } else { -@@ -1234,6 +1240,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1241,6 +1247,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { // Paper start @Override public void setLoreComponents(List<net.md_5.bungee.api.chat.BaseComponent[]> lore) { @@ -924,7 +921,7 @@ index 1903a6948242e2dc40302a0acb9171fc3cc3000e..a9acbb181dd72238b63fb08fda1b3bc0 if (lore == null) { this.lore = null; } else { -@@ -1375,7 +1382,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1382,7 +1389,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @Override public FoodComponent getFood() { @@ -933,7 +930,7 @@ index 1903a6948242e2dc40302a0acb9171fc3cc3000e..a9acbb181dd72238b63fb08fda1b3bc0 } @Override -@@ -1431,7 +1438,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1438,7 +1445,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @Override public Multimap<Attribute, AttributeModifier> getAttributeModifiers(@Nullable EquipmentSlot slot) { @@ -942,7 +939,7 @@ index 1903a6948242e2dc40302a0acb9171fc3cc3000e..a9acbb181dd72238b63fb08fda1b3bc0 SetMultimap<Attribute, AttributeModifier> result = LinkedHashMultimap.create(); for (Map.Entry<Attribute, AttributeModifier> entry : this.attributeModifiers.entries()) { if (entry.getValue().getSlot() == null || entry.getValue().getSlot() == slot) { -@@ -1444,6 +1451,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1451,6 +1458,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @Override public Collection<AttributeModifier> getAttributeModifiers(@Nonnull Attribute attribute) { Preconditions.checkNotNull(attribute, "Attribute cannot be null"); @@ -950,7 +947,7 @@ index 1903a6948242e2dc40302a0acb9171fc3cc3000e..a9acbb181dd72238b63fb08fda1b3bc0 return this.attributeModifiers.containsKey(attribute) ? ImmutableList.copyOf(this.attributeModifiers.get(attribute)) : null; } -@@ -1451,22 +1459,33 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1458,22 +1466,33 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { public boolean addAttributeModifier(@Nonnull Attribute attribute, @Nonnull AttributeModifier modifier) { Preconditions.checkNotNull(attribute, "Attribute cannot be null"); Preconditions.checkNotNull(modifier, "AttributeModifier cannot be null"); @@ -988,7 +985,7 @@ index 1903a6948242e2dc40302a0acb9171fc3cc3000e..a9acbb181dd72238b63fb08fda1b3bc0 Iterator<Map.Entry<Attribute, AttributeModifier>> iterator = attributeModifiers.entries().iterator(); while (iterator.hasNext()) { -@@ -1476,6 +1495,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1483,6 +1502,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { iterator.remove(); continue; } @@ -996,7 +993,7 @@ index 1903a6948242e2dc40302a0acb9171fc3cc3000e..a9acbb181dd72238b63fb08fda1b3bc0 this.attributeModifiers.put(next.getKey(), next.getValue()); } } -@@ -1483,13 +1503,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1490,13 +1510,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @Override public boolean removeAttributeModifier(@Nonnull Attribute attribute) { Preconditions.checkNotNull(attribute, "Attribute cannot be null"); @@ -1012,7 +1009,7 @@ index 1903a6948242e2dc40302a0acb9171fc3cc3000e..a9acbb181dd72238b63fb08fda1b3bc0 int removed = 0; Iterator<Map.Entry<Attribute, AttributeModifier>> iter = this.attributeModifiers.entries().iterator(); -@@ -1509,7 +1529,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1516,7 +1536,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { public boolean removeAttributeModifier(@Nonnull Attribute attribute, @Nonnull AttributeModifier modifier) { Preconditions.checkNotNull(attribute, "Attribute cannot be null"); Preconditions.checkNotNull(modifier, "AttributeModifier cannot be null"); @@ -1021,7 +1018,7 @@ index 1903a6948242e2dc40302a0acb9171fc3cc3000e..a9acbb181dd72238b63fb08fda1b3bc0 int removed = 0; Iterator<Map.Entry<Attribute, AttributeModifier>> iter = this.attributeModifiers.entries().iterator(); -@@ -1531,7 +1551,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1538,7 +1558,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @Override public String getAsString() { @@ -1030,7 +1027,7 @@ index 1903a6948242e2dc40302a0acb9171fc3cc3000e..a9acbb181dd72238b63fb08fda1b3bc0 this.applyToItem(tag); DataComponentPatch patch = tag.build(); Tag nbt = DataComponentPatch.CODEC.encodeStart(MinecraftServer.getDefaultRegistryAccess().createSerializationContext(NbtOps.INSTANCE), patch).getOrThrow(); -@@ -1540,7 +1560,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1547,7 +1567,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @Override public String getAsComponentString() { @@ -1039,7 +1036,7 @@ index 1903a6948242e2dc40302a0acb9171fc3cc3000e..a9acbb181dd72238b63fb08fda1b3bc0 this.applyToItem(tag); DataComponentPatch patch = tag.build(); -@@ -1580,6 +1600,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1587,6 +1607,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { if (first == null || second == null) { return false; } @@ -1047,7 +1044,7 @@ index 1903a6948242e2dc40302a0acb9171fc3cc3000e..a9acbb181dd72238b63fb08fda1b3bc0 for (Map.Entry<Attribute, AttributeModifier> entry : first.entries()) { if (!second.containsEntry(entry.getKey(), entry.getValue())) { return false; -@@ -1595,19 +1616,33 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1602,19 +1623,33 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @Override public boolean hasDamage() { @@ -1083,7 +1080,7 @@ index 1903a6948242e2dc40302a0acb9171fc3cc3000e..a9acbb181dd72238b63fb08fda1b3bc0 @Override public boolean hasMaxDamage() { return this.maxDamage != null; -@@ -1621,6 +1656,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1628,6 +1663,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @Override public void setMaxDamage(Integer maxDamage) { @@ -1091,7 +1088,7 @@ index 1903a6948242e2dc40302a0acb9171fc3cc3000e..a9acbb181dd72238b63fb08fda1b3bc0 this.maxDamage = maxDamage; } -@@ -1652,7 +1688,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1659,7 +1695,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { && (this.hasCustomModelData() ? that.hasCustomModelData() && this.customModelData.equals(that.customModelData) : !that.hasCustomModelData()) && (this.hasBlockData() ? that.hasBlockData() && this.blockData.equals(that.blockData) : !that.hasBlockData()) && (this.hasRepairCost() ? that.hasRepairCost() && this.repairCost == that.repairCost : !that.hasRepairCost()) @@ -1100,7 +1097,7 @@ index 1903a6948242e2dc40302a0acb9171fc3cc3000e..a9acbb181dd72238b63fb08fda1b3bc0 && (this.unhandledTags.equals(that.unhandledTags)) && (this.removedTags.equals(that.removedTags)) && (Objects.equals(this.customTag, that.customTag)) -@@ -1667,7 +1703,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1674,7 +1710,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { && (this.hasFood() ? that.hasFood() && this.food.equals(that.food) : !that.hasFood()) && (this.hasTool() ? that.hasTool() && this.tool.equals(that.tool) : !that.hasTool()) && (this.hasJukeboxPlayable() ? that.hasJukeboxPlayable() && this.jukebox.equals(that.jukebox) : !that.hasJukeboxPlayable()) @@ -1109,7 +1106,7 @@ index 1903a6948242e2dc40302a0acb9171fc3cc3000e..a9acbb181dd72238b63fb08fda1b3bc0 && (this.hasMaxDamage() ? that.hasMaxDamage() && this.maxDamage.equals(that.maxDamage) : !that.hasMaxDamage()) && (this.canPlaceOnPredicates != null ? that.canPlaceOnPredicates != null && this.canPlaceOnPredicates.equals(that.canPlaceOnPredicates) : that.canPlaceOnPredicates == null) // Paper && (this.canBreakPredicates != null ? that.canBreakPredicates != null && this.canBreakPredicates.equals(that.canBreakPredicates) : that.canBreakPredicates == null) // Paper -@@ -1713,9 +1749,9 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1720,9 +1756,9 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { hash = 61 * hash + (this.hasFood() ? this.food.hashCode() : 0); hash = 61 * hash + (this.hasTool() ? this.tool.hashCode() : 0); hash = 61 * hash + (this.hasJukeboxPlayable() ? this.jukebox.hashCode() : 0); @@ -1122,7 +1119,7 @@ index 1903a6948242e2dc40302a0acb9171fc3cc3000e..a9acbb181dd72238b63fb08fda1b3bc0 hash = 61 * hash + (this.canPlaceOnPredicates != null ? this.canPlaceOnPredicates.hashCode() : 0); // Paper hash = 61 * hash + (this.canBreakPredicates != null ? this.canBreakPredicates.hashCode() : 0); // Paper hash = 61 * hash + this.version; -@@ -1735,7 +1771,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1742,7 +1778,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { if (this.enchantments != null) { clone.enchantments = new EnchantmentMap(this.enchantments); // Paper } @@ -1131,7 +1128,7 @@ index 1903a6948242e2dc40302a0acb9171fc3cc3000e..a9acbb181dd72238b63fb08fda1b3bc0 clone.attributeModifiers = LinkedHashMultimap.create(this.attributeModifiers); } if (this.customTag != null) { -@@ -1863,7 +1899,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1870,7 +1906,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { builder.put(CraftMetaItem.JUKEBOX_PLAYABLE.BUKKIT, this.jukebox); } @@ -1140,7 +1137,7 @@ index 1903a6948242e2dc40302a0acb9171fc3cc3000e..a9acbb181dd72238b63fb08fda1b3bc0 builder.put(CraftMetaItem.DAMAGE.BUKKIT, this.damage); } -@@ -1964,7 +2000,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1971,7 +2007,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { } static void serializeModifiers(Multimap<Attribute, AttributeModifier> modifiers, ImmutableMap.Builder<String, Object> builder, ItemMetaKey key) { @@ -1149,7 +1146,7 @@ index 1903a6948242e2dc40302a0acb9171fc3cc3000e..a9acbb181dd72238b63fb08fda1b3bc0 return; } -@@ -2046,7 +2082,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -2053,7 +2089,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { // Paper start - improve checking handled tags @org.jetbrains.annotations.VisibleForTesting public static final Map<Class<? extends CraftMetaItem>, Set<DataComponentType<?>>> HANDLED_DCTS_PER_TYPE = new HashMap<>(); @@ -1158,7 +1155,7 @@ index 1903a6948242e2dc40302a0acb9171fc3cc3000e..a9acbb181dd72238b63fb08fda1b3bc0 CraftMetaItem.NAME.TYPE, CraftMetaItem.ITEM_NAME.TYPE, CraftMetaItem.LORE.TYPE, -@@ -2114,7 +2150,12 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -2122,7 +2158,12 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { // Paper end - improve checking handled data component types protected static <T> Optional<? extends T> getOrEmpty(DataComponentPatch tag, ItemMetaKeyType<T> type) { @@ -1458,10 +1455,10 @@ index 17705059b81942e4df43a4a5180092e09c985ade..80e6b85a107d5236edba99540cb5074e } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/SerializableMeta.java b/src/main/java/org/bukkit/craftbukkit/inventory/SerializableMeta.java -index b7e93a6ec72ec3e3390fefa52fda0c2cd8e17c0c..758778650bebf7b96eefab42543e812849124b2f 100644 +index e00b757d6059715e8697428008fcb3e6e7abbe2e..dcf02bd0f7f4c67f5ab98003cc932b960704eef1 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/SerializableMeta.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/SerializableMeta.java -@@ -128,4 +128,21 @@ public final class SerializableMeta implements ConfigurationSerializable { +@@ -136,4 +136,21 @@ public final class SerializableMeta implements ConfigurationSerializable { } throw new IllegalArgumentException(field + "(" + object + ") is not a valid " + clazz); } @@ -1484,10 +1481,10 @@ index b7e93a6ec72ec3e3390fefa52fda0c2cd8e17c0c..758778650bebf7b96eefab42543e8128 + // Paper end - General ItemMeta Fixes } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/components/CraftFoodComponent.java b/src/main/java/org/bukkit/craftbukkit/inventory/components/CraftFoodComponent.java -index 63fc9138dc3388ceb9acf672b3f75ba0976e8e54..5986aa3588487c2caef4c895f8883e38a674b61c 100644 +index 92cad73219e11dc5922630769f9dd3a329ea6da1..bde61de7eda72b2e24ddef56ff93a0b46c08670c 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/components/CraftFoodComponent.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/components/CraftFoodComponent.java -@@ -109,6 +109,7 @@ public final class CraftFoodComponent implements FoodComponent { +@@ -114,6 +114,7 @@ public final class CraftFoodComponent implements FoodComponent { @Override public void setEatSeconds(float eatSeconds) { @@ -1495,7 +1492,7 @@ index 63fc9138dc3388ceb9acf672b3f75ba0976e8e54..5986aa3588487c2caef4c895f8883e38 this.handle = new FoodProperties(this.handle.nutrition(), this.handle.saturation(), this.handle.canAlwaysEat(), eatSeconds, this.handle.usingConvertsTo(), this.handle.effects()); } -@@ -119,6 +120,7 @@ public final class CraftFoodComponent implements FoodComponent { +@@ -124,6 +125,7 @@ public final class CraftFoodComponent implements FoodComponent { @Override public void setUsingConvertsTo(ItemStack item) { @@ -1503,7 +1500,7 @@ index 63fc9138dc3388ceb9acf672b3f75ba0976e8e54..5986aa3588487c2caef4c895f8883e38 this.handle = new FoodProperties(this.handle.nutrition(), this.handle.saturation(), this.handle.canAlwaysEat(), this.handle.eatSeconds(), Optional.ofNullable(item).map(CraftItemStack::asNMSCopy), this.handle.effects()); } -@@ -134,6 +136,7 @@ public final class CraftFoodComponent implements FoodComponent { +@@ -139,6 +141,7 @@ public final class CraftFoodComponent implements FoodComponent { @Override public FoodEffect addEffect(PotionEffect effect, float probability) { @@ -1561,7 +1558,7 @@ index 6bed0a5c8d9f1ca72678cdf4699128e441a24541..8e03e14d0e65bfdf2196a08220d1408b assertEquals(itemMeta, new CraftMetaItem(compound.build(), null)); // Paper diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java -index d6018439015583fa0344c7c01b2e60a13de29795..aabe3730fa582f442ee0544dd1a9f3123f719c68 100644 +index b6da1c2902139d4c7b01ac7b3407d4f6ac3990e2..1a582ee78334835df79f93cc9fd3669c347d8b3a 100644 --- a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java +++ b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java @@ -66,7 +66,7 @@ import org.junit.jupiter.api.Test; diff --git a/patches/server/0969-Added-API-to-get-player-ha-proxy-address.patch b/patches/server/0969-Added-API-to-get-player-ha-proxy-address.patch index 305f6bd981..3b19743dfc 100644 --- a/patches/server/0969-Added-API-to-get-player-ha-proxy-address.patch +++ b/patches/server/0969-Added-API-to-get-player-ha-proxy-address.patch @@ -35,7 +35,7 @@ index 96355e1da8feb6687ea0069dda4a82fcd7e25e8a..1f696644b958538e9f5d568a2e4bba69 } else { super.channelRead(ctx, msg); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 94524dee7e3ff78d378bd7812c49d041d07e138d..65a6952d48f40f3fd73d6693b61be9d29741f2f6 100644 +index 29c5855b9d31e803eb856584b92dfd35f6fad39a..12010a078542b7e89f0f4c0e7983eb15e75c4f1f 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -265,7 +265,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0972-Brigadier-based-command-API.patch b/patches/server/0972-Brigadier-based-command-API.patch index ed16e97611..a2baa23254 100644 --- a/patches/server/0972-Brigadier-based-command-API.patch +++ b/patches/server/0972-Brigadier-based-command-API.patch @@ -2220,10 +2220,10 @@ index 7b86e064564d3a285e3971fd08ea6168bac0720e..e8dcbe7c6d6ed20ad19d2ba1893ad16d argumentbuilder.requires((icompletionprovider) -> { return true; diff --git a/src/main/java/net/minecraft/commands/arguments/MessageArgument.java b/src/main/java/net/minecraft/commands/arguments/MessageArgument.java -index 982b2bab27e3d55d0ba07060862c0c3183ad91b0..5fa8a3343ffc11e82c20b78a73205fd8a42d3c5d 100644 +index 1e0eb806b729f8de23e1c3a6e068d63c68dbe2a1..9378f2ccaf274436b285ec7cbf02a4c017db1284 100644 --- a/src/main/java/net/minecraft/commands/arguments/MessageArgument.java +++ b/src/main/java/net/minecraft/commands/arguments/MessageArgument.java -@@ -39,6 +39,11 @@ public class MessageArgument implements SignedArgument<MessageArgument.Message> +@@ -40,6 +40,11 @@ public class MessageArgument implements SignedArgument<MessageArgument.Message> public static void resolveChatMessage(CommandContext<CommandSourceStack> context, String name, Consumer<PlayerChatMessage> callback) throws CommandSyntaxException { MessageArgument.Message message = context.getArgument(name, MessageArgument.Message.class); @@ -2400,7 +2400,7 @@ index 134f31cce8d8eca669948a784e2766216fb91ab5..60c65af218d533d53b765ba2175fed16 // CraftBukkit end diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index b72a71d6a37956b0f4ca74c2ed8eaf044cac4b81..6321ae23f07bc3e07577914e6cf035e0c2cd4992 100644 +index 36997d8d15c23587317b4c115726892980a9086e..43a94a67b337f40522c25cc2252a6a5e1294ca0b 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -272,11 +272,11 @@ public final class CraftServer implements Server { diff --git a/patches/server/0974-Fix-equipment-slot-and-group-API.patch b/patches/server/0974-Fix-equipment-slot-and-group-API.patch index 05b6eafa06..6c9f665d04 100644 --- a/patches/server/0974-Fix-equipment-slot-and-group-API.patch +++ b/patches/server/0974-Fix-equipment-slot-and-group-API.patch @@ -52,10 +52,10 @@ index 9d74577af071954e1e37201a96368c1360076209..eafa54c870c3e2aef30c3f9f96f51660 throw new IllegalArgumentException("Not implemented. This is a bug"); } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index a9acbb181dd72238b63fb08fda1b3bc0d246e36e..d87bfdda1f06a94e97465c105d28989e1d64e1e0 100644 +index 4de88523eda52fc20e06aa85c54890f5dd95a912..a13b56ccdfed5dfc3d0bd559d38dd1ed852a58f7 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -@@ -1441,7 +1441,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1448,7 +1448,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { if (this.attributeModifiers == null) return LinkedHashMultimap.create(); // Paper - don't change the components SetMultimap<Attribute, AttributeModifier> result = LinkedHashMultimap.create(); for (Map.Entry<Attribute, AttributeModifier> entry : this.attributeModifiers.entries()) { @@ -64,7 +64,7 @@ index a9acbb181dd72238b63fb08fda1b3bc0d246e36e..d87bfdda1f06a94e97465c105d28989e result.put(entry.getKey(), entry.getValue()); } } -@@ -1515,9 +1515,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1522,9 +1522,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { while (iter.hasNext()) { Map.Entry<Attribute, AttributeModifier> entry = iter.next(); diff --git a/patches/server/0975-Allow-Bukkit-plugin-to-use-Paper-PluginLoader-API.patch b/patches/server/0975-Allow-Bukkit-plugin-to-use-Paper-PluginLoader-API.patch index 980c3dc8a0..8b39d13b43 100644 --- a/patches/server/0975-Allow-Bukkit-plugin-to-use-Paper-PluginLoader-API.patch +++ b/patches/server/0975-Allow-Bukkit-plugin-to-use-Paper-PluginLoader-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Allow Bukkit plugin to use Paper PluginLoader API diff --git a/src/main/java/io/papermc/paper/plugin/loader/PaperClasspathBuilder.java b/src/main/java/io/papermc/paper/plugin/loader/PaperClasspathBuilder.java -index f9d4b33050a6fe8c2dabe8e5eec075d95dc513e0..dc106685ecb483c33c06e4f83eda27be58251aad 100644 +index f871a329eb52da077f58d0ceaaabd3349f84cad0..21a0a4e29c0eb1b4f7dc89ad3df481ca89dbf1a4 100644 --- a/src/main/java/io/papermc/paper/plugin/loader/PaperClasspathBuilder.java +++ b/src/main/java/io/papermc/paper/plugin/loader/PaperClasspathBuilder.java @@ -41,15 +41,7 @@ public class PaperClasspathBuilder implements PluginClasspathBuilder { @@ -76,7 +76,7 @@ index 75a2b687d58d76b94f8bec111df8613f120ff74b..0fd1040ed376f19c6d5326767baaf304 throw ex; } catch (Throwable ex) { diff --git a/src/main/java/io/papermc/paper/plugin/provider/type/spigot/SpigotPluginProviderFactory.java b/src/main/java/io/papermc/paper/plugin/provider/type/spigot/SpigotPluginProviderFactory.java -index fdb52ad85cfaa1d53aadcad72cec3d3c8c12c058..38075b7348ad7ca3cfece2bfae63e0cce827c694 100644 +index 1bf0fa1530b8e5f94d726d0313b7a00f675b500c..9edf79dffd2836b40d41da4437c18d6145853f89 100644 --- a/src/main/java/io/papermc/paper/plugin/provider/type/spigot/SpigotPluginProviderFactory.java +++ b/src/main/java/io/papermc/paper/plugin/provider/type/spigot/SpigotPluginProviderFactory.java @@ -1,9 +1,18 @@ diff --git a/patches/server/0978-Fix-cancelling-BlockPlaceEvent-calling-onRemove.patch b/patches/server/0978-Fix-cancelling-BlockPlaceEvent-calling-onRemove.patch index 8af7943ca8..38a3279b07 100644 --- a/patches/server/0978-Fix-cancelling-BlockPlaceEvent-calling-onRemove.patch +++ b/patches/server/0978-Fix-cancelling-BlockPlaceEvent-calling-onRemove.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix cancelling BlockPlaceEvent calling onRemove diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index 8309d2f7872ccdbc9d76f0fbf481411f74080148..de32bf4947af8d2ec64e8799580a129b038dd35e 100644 +index f9a4bebb321207abb00b1af1c17ebda623cc950e..bb28e35c0d53fcc0145518123795d54ff59514a8 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java @@ -494,9 +494,11 @@ public final class ItemStack implements DataComponentHolder { @@ -21,7 +21,7 @@ index 8309d2f7872ccdbc9d76f0fbf481411f74080148..de32bf4947af8d2ec64e8799580a129b // Brute force all possible updates diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index c6c9400fa155831ab11d0f059971d0123617e622..e27d3547d1e19c137e05e6b8d075127a8bafb237 100644 +index a2877f3eb206ab9ccb93e3606f1c9b3401def5d6..e5abde76c354c3dd9940dd4e5ae3fe8b6a2b4680 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java @@ -151,6 +151,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @@ -33,7 +33,7 @@ index c6c9400fa155831ab11d0f059971d0123617e622..e27d3547d1e19c137e05e6b8d075127a public Map<BlockPos, BlockEntity> capturedTileEntities = new java.util.LinkedHashMap<>(); // Paper - Retain block place order when capturing blockstates public List<ItemEntity> captureDrops; diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -index 7f8983a2102787b13e5d28d6981055da6acd1012..602ad80c2b93d320bf2a25832d25a58cb8c72e4b 100644 +index 86eb9029969f4de3ada7be9e135e9764172b85f5..21946a93b6a2a3c79d15af1d6e7eabc537ba0125 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java @@ -345,7 +345,7 @@ public class LevelChunk extends ChunkAccess { diff --git a/patches/server/0983-Suspicious-Effect-Entry-API.patch b/patches/server/0983-Suspicious-Effect-Entry-API.patch index bc26031199..74762e1837 100644 --- a/patches/server/0983-Suspicious-Effect-Entry-API.patch +++ b/patches/server/0983-Suspicious-Effect-Entry-API.patch @@ -14,7 +14,7 @@ in which it replaces PotionEffect. Co-authored-by: Yannick Lamprecht <[email protected]> diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java -index 9cc81bcccbf1141f66fedada1359b7c0dfa8e22a..5c5b64bd058684520fa175bfd10622ff57856b7c 100644 +index 5ac263889ff9cc4f4f6365ccb57917a23ad6edc1..246f97884b33ff37d3c4b693818224ba8aa5b93b 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java @@ -37,16 +37,24 @@ public class CraftMushroomCow extends CraftCow implements MushroomCow, io.paperm diff --git a/patches/server/0988-Moonrise-optimisation-patches.patch b/patches/server/0988-Moonrise-optimisation-patches.patch index 8e70453dec..0c7ba1f404 100644 --- a/patches/server/0988-Moonrise-optimisation-patches.patch +++ b/patches/server/0988-Moonrise-optimisation-patches.patch @@ -28981,10 +28981,10 @@ index d775ab8b0d37797f29e650842191d40691fb7afc..a7108b2be0746aa1f0e574d8c6f5ffad public void animateTick(BlockState state, Level world, BlockPos pos, RandomSource random) {} diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java -index fe7dc02ea55c2bcd39d12bfd4d315f0b8c7014c3..ded6d148110fe3fbb6272ce44582a28472dd49a6 100644 +index f2036917c5ba9f536087d7ee559704055469730e..d0109633e8bdf109cfc9178963d7b6cf92f8b189 100644 --- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java +++ b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java -@@ -762,7 +762,7 @@ public abstract class BlockBehaviour implements FeatureElement { +@@ -763,7 +763,7 @@ public abstract class BlockBehaviour implements FeatureElement { boolean test(BlockState state, BlockGetter world, BlockPos pos); } @@ -28993,7 +28993,7 @@ index fe7dc02ea55c2bcd39d12bfd4d315f0b8c7014c3..ded6d148110fe3fbb6272ce44582a284 private final int lightEmission; private final boolean useShapeForLightOcclusion; -@@ -794,6 +794,76 @@ public abstract class BlockBehaviour implements FeatureElement { +@@ -795,6 +795,76 @@ public abstract class BlockBehaviour implements FeatureElement { private FluidState fluidState; private boolean isRandomlyTicking; @@ -29070,7 +29070,7 @@ index fe7dc02ea55c2bcd39d12bfd4d315f0b8c7014c3..ded6d148110fe3fbb6272ce44582a284 protected BlockStateBase(Block block, Reference2ObjectArrayMap<Property<?>, Comparable<?>> propertyMap, MapCodec<BlockState> codec) { super(block, propertyMap, codec); this.fluidState = Fluids.EMPTY.defaultFluidState(); -@@ -858,6 +928,43 @@ public abstract class BlockBehaviour implements FeatureElement { +@@ -859,6 +929,43 @@ public abstract class BlockBehaviour implements FeatureElement { this.shapeExceedsCube = this.cache == null || this.cache.largeCollisionShape; // Paper - moved from actual method to here this.legacySolid = this.calculateSolid(); @@ -29412,7 +29412,7 @@ index 365074be989aa4a178114fd5e9810f1a68640196..4af698930712389881601069a921f054 @Override public BlockEntity getBlockEntity(BlockPos pos) { diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -index 602ad80c2b93d320bf2a25832d25a58cb8c72e4b..3fa7bfa09b9d529b5cb9cad923f21343159cfa35 100644 +index 21946a93b6a2a3c79d15af1d6e7eabc537ba0125..d94e24cfc56c195a47665c212f8fcc901648a4a1 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java @@ -53,7 +53,7 @@ import net.minecraft.world.ticks.LevelChunkTicks; @@ -29509,7 +29509,7 @@ index 602ad80c2b93d320bf2a25832d25a58cb8c72e4b..3fa7bfa09b9d529b5cb9cad923f21343 gameprofilerfiller.popPush("queueCheckLight"); this.level.getChunkSource().getLightEngine().checkBlock(blockposition); gameprofilerfiller.pop(); -@@ -597,11 +644,12 @@ public class LevelChunk extends ChunkAccess { +@@ -602,11 +649,12 @@ public class LevelChunk extends ChunkAccess { // CraftBukkit start public void loadCallback() { @@ -29523,7 +29523,7 @@ index 602ad80c2b93d320bf2a25832d25a58cb8c72e4b..3fa7bfa09b9d529b5cb9cad923f21343 if (server != null) { /* * If it's a new world, the first few chunks are generated inside -@@ -610,6 +658,7 @@ public class LevelChunk extends ChunkAccess { +@@ -615,6 +663,7 @@ public class LevelChunk extends ChunkAccess { */ org.bukkit.Chunk bukkitChunk = new org.bukkit.craftbukkit.CraftChunk(this); server.getPluginManager().callEvent(new org.bukkit.event.world.ChunkLoadEvent(bukkitChunk, this.needsDecoration)); @@ -29531,7 +29531,7 @@ index 602ad80c2b93d320bf2a25832d25a58cb8c72e4b..3fa7bfa09b9d529b5cb9cad923f21343 if (this.needsDecoration) { try (co.aikar.timings.Timing ignored = this.level.timings.chunkLoadPopulate.startTiming()) { // Paper -@@ -638,13 +687,15 @@ public class LevelChunk extends ChunkAccess { +@@ -643,13 +692,15 @@ public class LevelChunk extends ChunkAccess { } public void unloadCallback() { @@ -29549,7 +29549,7 @@ index 602ad80c2b93d320bf2a25832d25a58cb8c72e4b..3fa7bfa09b9d529b5cb9cad923f21343 // Paper start this.loadedTicketLevel = false; // Paper end -@@ -652,8 +703,27 @@ public class LevelChunk extends ChunkAccess { +@@ -657,8 +708,27 @@ public class LevelChunk extends ChunkAccess { @Override public boolean isUnsaved() { @@ -29578,7 +29578,7 @@ index 602ad80c2b93d320bf2a25832d25a58cb8c72e4b..3fa7bfa09b9d529b5cb9cad923f21343 // CraftBukkit end public boolean isEmpty() { -@@ -759,6 +829,7 @@ public class LevelChunk extends ChunkAccess { +@@ -764,6 +834,7 @@ public class LevelChunk extends ChunkAccess { this.pendingBlockEntities.clear(); this.upgradeData.upgrade(this); @@ -32731,7 +32731,7 @@ index 69c7fe5bf5b914276a9f7a0e57ce668e569d91f9..33322b57b4c6922f4daad0f584733f0f @Override diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 6321ae23f07bc3e07577914e6cf035e0c2cd4992..cc1f3c7fec4fa794da0b19f44ced9fd482dfdfc7 100644 +index 43a94a67b337f40522c25cc2252a6a5e1294ca0b..40c6ce263c025d26190f21adceaf899723da5a19 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -1428,7 +1428,7 @@ public final class CraftServer implements Server { diff --git a/patches/server/0989-Rewrite-dataconverter-system.patch b/patches/server/0989-Rewrite-dataconverter-system.patch index 1e689d81de..7ffdcaaed1 100644 --- a/patches/server/0989-Rewrite-dataconverter-system.patch +++ b/patches/server/0989-Rewrite-dataconverter-system.patch @@ -29396,7 +29396,7 @@ index 1d287dd7379e56f7fd4b425880b850cd843f5789..8ab7ca373a885fbe658013c9c6a2e38d return nbttagcompound; }); diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 364202607498b376422d02d91965430e90d21fec..e182de47cc9c12f2d7051edd0ab3d2b4267f54b2 100644 +index 9739f2d97ea64452a92f254cb2d0e1274c691944..9e0d8fc51196ca07677f45e41614262036155e85 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java @@ -505,7 +505,7 @@ public final class CraftMagicNumbers implements UnsafeValues { diff --git a/patches/server/0991-Optimize-isInWorldBounds-and-getBlockState-for-inlin.patch b/patches/server/0991-Optimize-isInWorldBounds-and-getBlockState-for-inlin.patch index ed5debe49c..3046e40be7 100644 --- a/patches/server/0991-Optimize-isInWorldBounds-and-getBlockState-for-inlin.patch +++ b/patches/server/0991-Optimize-isInWorldBounds-and-getBlockState-for-inlin.patch @@ -29,7 +29,7 @@ index 02367ef1371dde94ff6c4cd40bd32e800d6ccaaf..7b0fc7135bc107103dcaed6dc0707b18 this.x = x; this.y = y; diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index a016fb2140d6a43172c3fbc623b23f6d57798d9e..5b893b93a3495b13ae266fb8054d0a454cf02660 100644 +index 347334130e99dbf938d570bd36440a96f92d475a..c69ed3e899fc8d48afeb731bb3b2d97b5969e6e3 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java @@ -824,7 +824,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl diff --git a/patches/server/0993-Strip-raytracing-for-EntityLiving-hasLineOfSight.patch b/patches/server/0993-Strip-raytracing-for-EntityLiving-hasLineOfSight.patch index 23a10511a6..38ce2a6066 100644 --- a/patches/server/0993-Strip-raytracing-for-EntityLiving-hasLineOfSight.patch +++ b/patches/server/0993-Strip-raytracing-for-EntityLiving-hasLineOfSight.patch @@ -62,7 +62,7 @@ index bb8e962e63c7a2d931f9bd7f7c002aa35cfa5fd3..0fa131a6c98adb498fc8d534e0e39647 default BlockHitResult clip(ClipContext raytrace1, BlockPos blockposition) { // Paper start - Add predicate for blocks when raytracing diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 5b893b93a3495b13ae266fb8054d0a454cf02660..77b7c252d27f527d9b51e8419abe7af1d4b51d29 100644 +index c69ed3e899fc8d48afeb731bb3b2d97b5969e6e3..574175449af5b767f28e95ff8708ed37fedf4c7d 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java @@ -816,10 +816,87 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl diff --git a/patches/server/0999-Anti-Xray.patch b/patches/server/0999-Anti-Xray.patch index 87839cda7a..d33e4145bf 100644 --- a/patches/server/0999-Anti-Xray.patch +++ b/patches/server/0999-Anti-Xray.patch @@ -1231,7 +1231,7 @@ index a7fc4b027cee8e1ed2678be7060040494a65682a..75c8125e20b70433fe9d143a3193d821 } diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -index 3fa7bfa09b9d529b5cb9cad923f21343159cfa35..8c865cd4e50ad55679a8bd89835caa40cc101f35 100644 +index d94e24cfc56c195a47665c212f8fcc901648a4a1..b1a6dc25b04ab6a43e8d62378e14d88d1c60bbbe 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java @@ -91,7 +91,7 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p @@ -1574,7 +1574,7 @@ index 33322b57b4c6922f4daad0f584733f0f24083911..45e262308aebafa377a2353661acdd12 private static final byte[] EMPTY_LIGHT = new byte[2048]; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index cc1f3c7fec4fa794da0b19f44ced9fd482dfdfc7..3a91faeb6957e4e783b1de3e1145e7d1d164a857 100644 +index 40c6ce263c025d26190f21adceaf899723da5a19..764198cf9ffd466bb31de126b618d4364ff4eba7 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -2686,7 +2686,7 @@ public final class CraftServer implements Server { diff --git a/patches/server/1006-Optimize-Hoppers.patch b/patches/server/1006-Optimize-Hoppers.patch index dc55a79c71..4b02bfcbbd 100644 --- a/patches/server/1006-Optimize-Hoppers.patch +++ b/patches/server/1006-Optimize-Hoppers.patch @@ -62,7 +62,7 @@ index 4a4ce372dd105d07f58d7d93d856cb3969969806..fb3dcce4e1888f96fdd260740d9d9559 this.profiler.push(() -> { String s = String.valueOf(worldserver); diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index de32bf4947af8d2ec64e8799580a129b038dd35e..0f2b3c5ca88478a541bf9e61ae61cc99a7d08836 100644 +index bb28e35c0d53fcc0145518123795d54ff59514a8..3254124180df02d787202f4b00a4c52d40c6e7cf 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java @@ -809,10 +809,16 @@ public final class ItemStack implements DataComponentHolder { @@ -85,7 +85,7 @@ index de32bf4947af8d2ec64e8799580a129b038dd35e..0f2b3c5ca88478a541bf9e61ae61cc99 itemstack.setPopTime(this.getPopTime()); return itemstack; diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java -index cd3b952a228c09077c2e74183a34ddb32811280b..c0563260277f9f4bd9ff08993b2efb4bca9a0c60 100644 +index caba661b16c24320277520bbdb25bcfa83d4b040..9a5f68ef8609843bd70545294a9a634e7eb8d99f 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java @@ -38,6 +38,7 @@ import co.aikar.timings.MinecraftTimings; // Paper @@ -96,7 +96,7 @@ index cd3b952a228c09077c2e74183a34ddb32811280b..c0563260277f9f4bd9ff08993b2efb4b public Timing tickTimer = MinecraftTimings.getTileEntityTimings(this); // Paper // CraftBukkit start - data containers -@@ -216,6 +217,7 @@ public abstract class BlockEntity { +@@ -229,6 +230,7 @@ public abstract class BlockEntity { public void setChanged() { if (this.level != null) { @@ -105,7 +105,7 @@ index cd3b952a228c09077c2e74183a34ddb32811280b..c0563260277f9f4bd9ff08993b2efb4b } diff --git a/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java -index 0d6132abd49d66fbf84c046e09144cb33651be15..53f9d28bf3c6aafd4fdd6c12e0285500fe7350ce 100644 +index d717d85559d3f9a5f2f90e4d0e4da57161f51220..7397a706ec58fca4f97db6cf722396680bd5bc4e 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java @@ -156,6 +156,43 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen @@ -370,7 +370,7 @@ index 0d6132abd49d66fbf84c046e09144cb33651be15..53f9d28bf3c6aafd4fdd6c12e0285500 private static boolean ejectItems(Level world, BlockPos pos, HopperBlockEntity blockEntity) { Container iinventory = HopperBlockEntity.getAttachedContainer(world, pos, blockEntity); -@@ -209,48 +443,51 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen +@@ -209,52 +443,55 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen if (HopperBlockEntity.isFullContainer(iinventory, enumdirection)) { return false; } else { @@ -400,6 +400,7 @@ index 0d6132abd49d66fbf84c046e09144cb33651be15..53f9d28bf3c6aafd4fdd6c12e0285500 - blockEntity.setCooldown(world.spigotConfig.hopperTransfer); // Delay hopper checks // Spigot - return false; - } +- int origCount = event.getItem().getAmount(); // Spigot - ItemStack itemstack1 = HopperBlockEntity.addItem(blockEntity, iinventory, CraftItemStack.asNMSCopy(event.getItem()), enumdirection); - // CraftBukkit end - @@ -409,7 +410,10 @@ index 0d6132abd49d66fbf84c046e09144cb33651be15..53f9d28bf3c6aafd4fdd6c12e0285500 - } - - itemstack.setCount(j); -- if (j == 1) { +- // Spigot start +- itemstack.shrink(origCount - itemstack1.getCount()); +- if (j <= world.spigotConfig.hopperAmount) { +- // Spigot end - blockEntity.setItem(i, itemstack); - } - } @@ -418,53 +422,57 @@ index 0d6132abd49d66fbf84c046e09144cb33651be15..53f9d28bf3c6aafd4fdd6c12e0285500 - return false; + // Paper start - Perf: Optimize Hoppers + return hopperPush(world, iinventory, enumdirection, blockEntity); -+ //for (int i = 0; i < blockEntity.getContainerSize(); ++i) { -+ // ItemStack itemstack = blockEntity.getItem(i); -+ -+ // if (!itemstack.isEmpty()) { -+ // int j = itemstack.getCount(); -+ // // CraftBukkit start - Call event when pushing items into other inventories -+ // ItemStack original = itemstack.copy(); -+ // CraftItemStack oitemstack = CraftItemStack.asCraftMirror(blockEntity.removeItem(i, world.spigotConfig.hopperAmount)); // Spigot -+ -+ // Inventory destinationInventory; -+ // // Have to special case large chests as they work oddly -+ // if (iinventory instanceof CompoundContainer) { -+ // destinationInventory = new org.bukkit.craftbukkit.inventory.CraftInventoryDoubleChest((CompoundContainer) iinventory); -+ // } else if (iinventory.getOwner() != null) { -+ // destinationInventory = iinventory.getOwner().getInventory(); -+ // } else { -+ // destinationInventory = new CraftInventory(iinventory); -+ // } -+ -+ // InventoryMoveItemEvent event = new InventoryMoveItemEvent(tileentityhopper.getOwner().getInventory(), oitemstack, destinationInventory, true); -+ // world.getCraftServer().getPluginManager().callEvent(event); -+ // if (event.isCancelled()) { -+ // blockEntity.setItem(i, original); -+ // blockEntity.setCooldown(world.spigotConfig.hopperTransfer); // Delay hopper checks // Spigot -+ // return false; -+ // } -+ // ItemStack itemstack1 = HopperBlockEntity.addItem(blockEntity, iinventory, CraftItemStack.asNMSCopy(event.getItem()), enumdirection); -+ // // CraftBukkit end -+ -+ // if (itemstack1.isEmpty()) { -+ // iinventory.setChanged(); -+ // return true; -+ // } -+ -+ // itemstack.setCount(j); -+ // if (j == 1) { -+ // blockEntity.setItem(i, itemstack); -+ // } -+ // } -+ //} ++ // for (int i = 0; i < blockEntity.getContainerSize(); ++i) { ++ // ItemStack itemstack = blockEntity.getItem(i); ++ // ++ // if (!itemstack.isEmpty()) { ++ // int j = itemstack.getCount(); ++ // // CraftBukkit start - Call event when pushing items into other inventories ++ // ItemStack original = itemstack.copy(); ++ // CraftItemStack oitemstack = CraftItemStack.asCraftMirror(blockEntity.removeItem(i, world.spigotConfig.hopperAmount)); // Spigot ++ // ++ // Inventory destinationInventory; ++ // // Have to special case large chests as they work oddly ++ // if (iinventory instanceof CompoundContainer) { ++ // destinationInventory = new org.bukkit.craftbukkit.inventory.CraftInventoryDoubleChest((CompoundContainer) iinventory); ++ // } else if (iinventory.getOwner() != null) { ++ // destinationInventory = iinventory.getOwner().getInventory(); ++ // } else { ++ // destinationInventory = new CraftInventory(iinventory); ++ // } ++ // ++ // InventoryMoveItemEvent event = new InventoryMoveItemEvent(blockEntity.getOwner().getInventory(), oitemstack, destinationInventory, true); ++ // world.getCraftServer().getPluginManager().callEvent(event); ++ // if (event.isCancelled()) { ++ // blockEntity.setItem(i, original); ++ // blockEntity.setCooldown(world.spigotConfig.hopperTransfer); // Delay hopper checks // Spigot ++ // return false; ++ // } ++ // int origCount = event.getItem().getAmount(); // Spigot ++ // ItemStack itemstack1 = HopperBlockEntity.addItem(blockEntity, iinventory, CraftItemStack.asNMSCopy(event.getItem()), enumdirection); ++ // // CraftBukkit end ++ // ++ // if (itemstack1.isEmpty()) { ++ // iinventory.setChanged(); ++ // return true; ++ // } ++ // ++ // itemstack.setCount(j); ++ // // Spigot start ++ // itemstack.shrink(origCount - itemstack1.getCount()); ++ // if (j <= world.spigotConfig.hopperAmount) { ++ // // Spigot end ++ // blockEntity.setItem(i, itemstack); ++ // } ++ // } ++ // } + + // return false; + // Paper end - Perf: Optimize Hoppers } } } -@@ -301,7 +538,6 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen +@@ -305,7 +542,6 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen return false; } } @@ -472,7 +480,7 @@ index 0d6132abd49d66fbf84c046e09144cb33651be15..53f9d28bf3c6aafd4fdd6c12e0285500 return true; } -@@ -312,6 +548,7 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen +@@ -316,6 +552,7 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen if (iinventory != null) { Direction enumdirection = Direction.DOWN; @@ -480,7 +488,7 @@ index 0d6132abd49d66fbf84c046e09144cb33651be15..53f9d28bf3c6aafd4fdd6c12e0285500 int[] aint = HopperBlockEntity.getSlots(iinventory, enumdirection); int i = aint.length; -@@ -347,45 +584,48 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen +@@ -351,49 +588,52 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen ItemStack itemstack = iinventory.getItem(i); if (!itemstack.isEmpty() && HopperBlockEntity.canTakeItemFromContainer(ihopper, iinventory, itemstack, i, enumdirection)) { @@ -511,6 +519,7 @@ index 0d6132abd49d66fbf84c046e09144cb33651be15..53f9d28bf3c6aafd4fdd6c12e0285500 - - return false; - } +- int origCount = event.getItem().getAmount(); // Spigot - ItemStack itemstack1 = HopperBlockEntity.addItem(iinventory, ihopper, CraftItemStack.asNMSCopy(event.getItem()), null); - // CraftBukkit end - @@ -520,55 +529,62 @@ index 0d6132abd49d66fbf84c046e09144cb33651be15..53f9d28bf3c6aafd4fdd6c12e0285500 - } - - itemstack.setCount(j); -- if (j == 1) { +- // Spigot start +- itemstack.shrink(origCount - itemstack1.getCount()); +- if (j <= world.spigotConfig.hopperAmount) { +- // Spigot end - iinventory.setItem(i, itemstack); - } + // Paper start - Perf: Optimize Hoppers + return hopperPull(world, ihopper, iinventory, itemstack, i); -+ // int j = itemstack.getCount(); -+ // // CraftBukkit start - Call event on collection of items from inventories into the hopper -+ // ItemStack original = itemstack.copy(); -+ // CraftItemStack oitemstack = CraftItemStack.asCraftMirror(iinventory.removeItem(i, world.spigotConfig.hopperAmount)); // Spigot -+ -+ // Inventory sourceInventory; -+ // // Have to special case large chests as they work oddly -+ // if (iinventory instanceof CompoundContainer) { -+ // sourceInventory = new org.bukkit.craftbukkit.inventory.CraftInventoryDoubleChest((CompoundContainer) iinventory); -+ // } else if (iinventory.getOwner() != null) { -+ // sourceInventory = iinventory.getOwner().getInventory(); -+ // } else { -+ // sourceInventory = new CraftInventory(iinventory); -+ // } -+ -+ // InventoryMoveItemEvent event = new InventoryMoveItemEvent(sourceInventory, oitemstack, ihopper.getOwner().getInventory(), false); -+ -+ // Bukkit.getServer().getPluginManager().callEvent(event); -+ // if (event.isCancelled()) { -+ // iinventory.setItem(i, original); -+ -+ // if (ihopper instanceof HopperBlockEntity) { -+ // ((HopperBlockEntity) ihopper).setCooldown(world.spigotConfig.hopperTransfer); // Spigot -+ // } -+ -+ // return false; -+ // } -+ // ItemStack itemstack1 = HopperBlockEntity.addItem(iinventory, ihopper, CraftItemStack.asNMSCopy(event.getItem()), null); -+ // // CraftBukkit end -+ -+ // if (itemstack1.isEmpty()) { -+ // iinventory.setChanged(); -+ // return true; -+ // } -+ -+ // itemstack.setCount(j); -+ // if (j == 1) { -+ // iinventory.setItem(i, itemstack); -+ // } ++ // int j = itemstack.getCount(); ++ // // CraftBukkit start - Call event on collection of items from inventories into the hopper ++ // ItemStack original = itemstack.copy(); ++ // CraftItemStack oitemstack = CraftItemStack.asCraftMirror(iinventory.removeItem(i, world.spigotConfig.hopperAmount)); // Spigot ++ // ++ // Inventory sourceInventory; ++ // // Have to special case large chests as they work oddly ++ // if (iinventory instanceof CompoundContainer) { ++ // sourceInventory = new org.bukkit.craftbukkit.inventory.CraftInventoryDoubleChest((CompoundContainer) iinventory); ++ // } else if (iinventory.getOwner() != null) { ++ // sourceInventory = iinventory.getOwner().getInventory(); ++ // } else { ++ // sourceInventory = new CraftInventory(iinventory); ++ // } ++ // ++ // InventoryMoveItemEvent event = new InventoryMoveItemEvent(sourceInventory, oitemstack, ihopper.getOwner().getInventory(), false); ++ // ++ // Bukkit.getServer().getPluginManager().callEvent(event); ++ // if (event.isCancelled()) { ++ // iinventory.setItem(i, original); ++ // ++ // if (ihopper instanceof HopperBlockEntity) { ++ // ((HopperBlockEntity) ihopper).setCooldown(world.spigotConfig.hopperTransfer); // Spigot ++ // } ++ // ++ // return false; ++ // } ++ // int origCount = event.getItem().getAmount(); // Spigot ++ // ItemStack itemstack1 = HopperBlockEntity.addItem(iinventory, ihopper, CraftItemStack.asNMSCopy(event.getItem()), null); ++ // // CraftBukkit end ++ // ++ // if (itemstack1.isEmpty()) { ++ // iinventory.setChanged(); ++ // return true; ++ // } ++ // ++ // itemstack.setCount(j); ++ // // Spigot start ++ // itemstack.shrink(origCount - itemstack1.getCount()); ++ // if (j <= world.spigotConfig.hopperAmount) { ++ // // Spigot end ++ // iinventory.setItem(i, itemstack); ++ // } + // Paper end - Perf: Optimize Hoppers } return false; -@@ -394,12 +634,14 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen +@@ -402,12 +642,14 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen public static boolean addItem(Container inventory, ItemEntity itemEntity) { boolean flag = false; // CraftBukkit start @@ -584,7 +600,7 @@ index 0d6132abd49d66fbf84c046e09144cb33651be15..53f9d28bf3c6aafd4fdd6c12e0285500 ItemStack itemstack = itemEntity.getItem().copy(); ItemStack itemstack1 = HopperBlockEntity.addItem((Container) null, inventory, itemstack, (Direction) null); -@@ -493,7 +735,9 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen +@@ -501,7 +743,9 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen stack = stack.split(to.getMaxStackSize()); } // Spigot end @@ -594,7 +610,7 @@ index 0d6132abd49d66fbf84c046e09144cb33651be15..53f9d28bf3c6aafd4fdd6c12e0285500 stack = leftover; // Paper - Make hoppers respect inventory max stack size flag = true; } else if (HopperBlockEntity.canMergeItems(itemstack1, stack)) { -@@ -573,14 +817,20 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen +@@ -581,14 +825,20 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen @Nullable public static Container getContainerAt(Level world, BlockPos pos) { @@ -617,7 +633,7 @@ index 0d6132abd49d66fbf84c046e09144cb33651be15..53f9d28bf3c6aafd4fdd6c12e0285500 iinventory = HopperBlockEntity.getEntityContainer(world, x, y, z); } -@@ -615,13 +865,13 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen +@@ -623,13 +873,13 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen @Nullable private static Container getEntityContainer(Level world, double x, double y, double z) { diff --git a/patches/server/1013-Fix-entity-type-tags-suggestions-in-selectors.patch b/patches/server/1013-Fix-entity-type-tags-suggestions-in-selectors.patch index a8e41e99e4..2e3d0b9e7c 100644 --- a/patches/server/1013-Fix-entity-type-tags-suggestions-in-selectors.patch +++ b/patches/server/1013-Fix-entity-type-tags-suggestions-in-selectors.patch @@ -60,19 +60,19 @@ index e8dcbe7c6d6ed20ad19d2ba1893ad16d917b9993..3e454515360c22a26c9329e4032d5255 } diff --git a/src/main/java/net/minecraft/commands/arguments/EntityArgument.java b/src/main/java/net/minecraft/commands/arguments/EntityArgument.java -index 2043001c16b3530c2d3f52efda10bcad424881c0..7976885b902a6ce7d80f31e49448c99452eb9765 100644 +index 4edb23c5f08ad742bc63fda9d73d1e234482e982..5e8fac513c3d55c695309f8832835498811766fb 100644 --- a/src/main/java/net/minecraft/commands/arguments/EntityArgument.java +++ b/src/main/java/net/minecraft/commands/arguments/EntityArgument.java -@@ -131,7 +131,7 @@ public class EntityArgument implements ArgumentType<EntitySelector> { +@@ -139,7 +139,7 @@ public class EntityArgument implements ArgumentType<EntitySelector> { final boolean permission = object instanceof CommandSourceStack stack ? stack.bypassSelectorPermissions || stack.hasPermission(2, "minecraft.command.selector") - : icompletionprovider.hasPermission(2); + : EntitySelectorParser.allowSelectors(icompletionprovider); - EntitySelectorParser argumentparserselector = new EntitySelectorParser(stringreader, permission); + EntitySelectorParser argumentparserselector = new EntitySelectorParser(stringreader, permission, true); // Paper - tell clients to ask server for suggestions for EntityArguments // Paper end - Fix EntityArgument suggestion permissions try { -@@ -141,7 +141,19 @@ public class EntityArgument implements ArgumentType<EntitySelector> { +@@ -149,7 +149,19 @@ public class EntityArgument implements ArgumentType<EntitySelector> { } return argumentparserselector.fillSuggestions(suggestionsbuilder, (suggestionsbuilder1) -> { @@ -94,19 +94,15 @@ index 2043001c16b3530c2d3f52efda10bcad424881c0..7976885b902a6ce7d80f31e49448c994 SharedSuggestionProvider.suggest((Iterable) iterable, suggestionsbuilder1); diff --git a/src/main/java/net/minecraft/commands/arguments/selector/EntitySelectorParser.java b/src/main/java/net/minecraft/commands/arguments/selector/EntitySelectorParser.java -index 6b6756625f3fb1f36f940c6e31e97b84f32a9990..32b39803380456f40bafdb790eaa27efab5f06a6 100644 +index 6d19085f5da8a65296b4dd32372885fff29e2de7..230da77d50e27b86beab4f8a0979c917501851e6 100644 --- a/src/main/java/net/minecraft/commands/arguments/selector/EntitySelectorParser.java +++ b/src/main/java/net/minecraft/commands/arguments/selector/EntitySelectorParser.java -@@ -115,12 +115,19 @@ public class EntitySelectorParser { +@@ -116,8 +116,15 @@ public class EntitySelectorParser { private boolean hasScores; private boolean hasAdvancements; private boolean usesSelectors; + public boolean parsingEntityArgumentSuggestions; // Paper - tell clients to ask server for suggestions for EntityArguments - public EntitySelectorParser(StringReader reader) { - this(reader, true); - } - public EntitySelectorParser(StringReader reader, boolean atAllowed) { + // Paper start - tell clients to ask server for suggestions for EntityArguments + this(reader, atAllowed, false); diff --git a/patches/server/1021-Registry-Modification-API.patch b/patches/server/1021-Registry-Modification-API.patch index 8c55ac4526..d17e5191bb 100644 --- a/patches/server/1021-Registry-Modification-API.patch +++ b/patches/server/1021-Registry-Modification-API.patch @@ -9,7 +9,7 @@ public net.minecraft.resources.RegistryOps lookupProvider public net.minecraft.resources.RegistryOps$HolderLookupAdapter diff --git a/src/main/java/io/papermc/paper/registry/PaperRegistries.java b/src/main/java/io/papermc/paper/registry/PaperRegistries.java -index ead718efde812846fefec3e86d896fef7deb3d97..722e3786f5b36f9b9ccff4028a58c3893c7960d6 100644 +index 183a649cadcf96f2ecca18fef9b93f0176febeab..22715ff8b21d76004e8995758fb4aa05b2ec3486 100644 --- a/src/main/java/io/papermc/paper/registry/PaperRegistries.java +++ b/src/main/java/io/papermc/paper/registry/PaperRegistries.java @@ -2,6 +2,7 @@ package io.papermc.paper.registry; @@ -20,7 +20,7 @@ index ead718efde812846fefec3e86d896fef7deb3d97..722e3786f5b36f9b9ccff4028a58c389 import java.util.Collections; import java.util.IdentityHashMap; import java.util.List; -@@ -54,6 +55,7 @@ import org.checkerframework.framework.qual.DefaultQualifier; +@@ -56,6 +57,7 @@ import org.checkerframework.framework.qual.DefaultQualifier; import static io.papermc.paper.registry.entry.RegistryEntry.apiOnly; import static io.papermc.paper.registry.entry.RegistryEntry.entry; @@ -28,7 +28,7 @@ index ead718efde812846fefec3e86d896fef7deb3d97..722e3786f5b36f9b9ccff4028a58c389 @DefaultQualifier(NonNull.class) public final class PaperRegistries { -@@ -136,6 +138,15 @@ public final class PaperRegistries { +@@ -139,6 +141,15 @@ public final class PaperRegistries { return ResourceKey.create((ResourceKey<? extends Registry<M>>) PaperRegistries.registryToNms(typedKey.registryKey()), PaperAdventure.asVanilla(typedKey.key())); } @@ -1311,10 +1311,10 @@ index 397bdacab9517354875ebc0bc68d35059b3c318b..908431652a0fea79b5a0cee1efd0c7a7 return writableRegistry; }, diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java b/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java -index fc9aec589414bf8d3f672183928235b5b51d1a02..0f3c46b8bb93fc42160300c9988d04bed68f493b 100644 +index c2824cc07b761958a0df4b110bdfc53bd853b9e7..cacbb35d365c66881f2a42d099bb88c494b584ee 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java -@@ -163,11 +163,11 @@ public class CraftRegistry<B extends Keyed, M> implements Registry<B> { +@@ -165,11 +165,11 @@ public class CraftRegistry<B extends Keyed, M> implements Registry<B> { private final Map<NamespacedKey, B> cache = new HashMap<>(); private final Map<B, NamespacedKey> byValue = new java.util.IdentityHashMap<>(); // Paper - improve Registry private final net.minecraft.core.Registry<M> minecraftRegistry; @@ -1328,7 +1328,7 @@ index fc9aec589414bf8d3f672183928235b5b51d1a02..0f3c46b8bb93fc42160300c9988d04be this.bukkitClass = bukkitClass; this.minecraftRegistry = minecraftRegistry; this.minecraftToBukkit = minecraftToBukkit; -@@ -240,4 +240,17 @@ public class CraftRegistry<B extends Keyed, M> implements Registry<B> { +@@ -242,4 +242,17 @@ public class CraftRegistry<B extends Keyed, M> implements Registry<B> { return this.byValue.get(value); } // Paper end - improve Registry @@ -1347,7 +1347,7 @@ index fc9aec589414bf8d3f672183928235b5b51d1a02..0f3c46b8bb93fc42160300c9988d04be + // Paper end - RegistrySet API } diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index e182de47cc9c12f2d7051edd0ab3d2b4267f54b2..02be833b259873c27bd629bb3148f2286f418bc3 100644 +index 9e0d8fc51196ca07677f45e41614262036155e85..82ebfd09e9baca0a31ee41c0e5228bce3c54e74f 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java @@ -668,6 +668,21 @@ public final class CraftMagicNumbers implements UnsafeValues { diff --git a/patches/server/1022-Add-registry-entry-and-builders.patch b/patches/server/1022-Add-registry-entry-and-builders.patch index cbb53a94e4..2a64231d8e 100644 --- a/patches/server/1022-Add-registry-entry-and-builders.patch +++ b/patches/server/1022-Add-registry-entry-and-builders.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add registry entry and builders diff --git a/src/main/java/io/papermc/paper/registry/PaperRegistries.java b/src/main/java/io/papermc/paper/registry/PaperRegistries.java -index 722e3786f5b36f9b9ccff4028a58c3893c7960d6..745536f79b376c385247682042ae455d4a0f4ee5 100644 +index 22715ff8b21d76004e8995758fb4aa05b2ec3486..a853abaa9a714d97cf689d490b22f2a3cd5e8df2 100644 --- a/src/main/java/io/papermc/paper/registry/PaperRegistries.java +++ b/src/main/java/io/papermc/paper/registry/PaperRegistries.java @@ -1,6 +1,8 @@ @@ -17,7 +17,7 @@ index 722e3786f5b36f9b9ccff4028a58c3893c7960d6..745536f79b376c385247682042ae455d import io.papermc.paper.registry.entry.RegistryEntry; import io.papermc.paper.registry.tag.TagKey; import java.util.Collections; -@@ -66,7 +68,7 @@ public final class PaperRegistries { +@@ -68,7 +70,7 @@ public final class PaperRegistries { static { REGISTRY_ENTRIES = List.of( // built-ins @@ -26,7 +26,7 @@ index 722e3786f5b36f9b9ccff4028a58c3893c7960d6..745536f79b376c385247682042ae455d entry(Registries.INSTRUMENT, RegistryKey.INSTRUMENT, MusicInstrument.class, CraftMusicInstrument::new), entry(Registries.MOB_EFFECT, RegistryKey.MOB_EFFECT, PotionEffectType.class, CraftPotionEffectType::new), entry(Registries.STRUCTURE_TYPE, RegistryKey.STRUCTURE_TYPE, StructureType.class, CraftStructureType::new), -@@ -84,7 +86,7 @@ public final class PaperRegistries { +@@ -87,7 +89,7 @@ public final class PaperRegistries { entry(Registries.TRIM_PATTERN, RegistryKey.TRIM_PATTERN, TrimPattern.class, CraftTrimPattern::new).delayed(), entry(Registries.DAMAGE_TYPE, RegistryKey.DAMAGE_TYPE, DamageType.class, CraftDamageType::new).delayed(), entry(Registries.WOLF_VARIANT, RegistryKey.WOLF_VARIANT, Wolf.Variant.class, CraftWolf.CraftVariant::new).delayed(), diff --git a/patches/server/1023-Improved-Watchdog-Support.patch b/patches/server/1023-Improved-Watchdog-Support.patch index be44d14993..3c17cbaba2 100644 --- a/patches/server/1023-Improved-Watchdog-Support.patch +++ b/patches/server/1023-Improved-Watchdog-Support.patch @@ -341,10 +341,10 @@ index 5c4eaa6bcf20b0fcec14bd5ef76ea6f29a8613a2..e2a0487089eb5a7bdc1433e4c75f69d8 final String msg = String.format("Entity threw exception at %s:%s,%s,%s", entity.level().getWorld().getName(), entity.getX(), entity.getY(), entity.getZ()); MinecraftServer.LOGGER.error(msg, throwable); diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -index 8c865cd4e50ad55679a8bd89835caa40cc101f35..5453b7051337908ac1c8201827c1b5eec9e1608b 100644 +index b1a6dc25b04ab6a43e8d62378e14d88d1c60bbbe..7c11853c5090fbc4fa5b3e73a69acf166158fdec 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -@@ -1039,6 +1039,7 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p +@@ -1044,6 +1044,7 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p gameprofilerfiller.pop(); } catch (Throwable throwable) { diff --git a/patches/server/1024-Proxy-ItemStack-to-CraftItemStack.patch b/patches/server/1024-Proxy-ItemStack-to-CraftItemStack.patch index 6ce5ce92ca..9b59d6416c 100644 --- a/patches/server/1024-Proxy-ItemStack-to-CraftItemStack.patch +++ b/patches/server/1024-Proxy-ItemStack-to-CraftItemStack.patch @@ -205,7 +205,7 @@ index 9c004e7cb46841d874ab997bf2e3b63ae763aec7..d7c8f26b21276d9ff1d5c7c9738cc112 + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 02be833b259873c27bd629bb3148f2286f418bc3..41c34ffdf9d95a04ed55a1e09ebc78e8cf946777 100644 +index 82ebfd09e9baca0a31ee41c0e5228bce3c54e74f..28dbe30a98a6730839949bc9a6a90b78619ff84d 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java @@ -683,6 +683,13 @@ public final class CraftMagicNumbers implements UnsafeValues { diff --git a/patches/server/1036-Correctly-call-PlayerItemBreakEvent.patch b/patches/server/1036-Correctly-call-PlayerItemBreakEvent.patch index 6637cd6cd0..5dd198b395 100644 --- a/patches/server/1036-Correctly-call-PlayerItemBreakEvent.patch +++ b/patches/server/1036-Correctly-call-PlayerItemBreakEvent.patch @@ -17,7 +17,7 @@ stack to not disrupt potential new vanilla changes that might depend on this behaviour. diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index 0f2b3c5ca88478a541bf9e61ae61cc99a7d08836..2c312c0b741fb96a008881e9e01fa660a1fb63ab 100644 +index 3254124180df02d787202f4b00a4c52d40c6e7cf..d1340691d508c21c15237ec4a4626e9219d7c4f7 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java @@ -731,8 +731,10 @@ public final class ItemStack implements DataComponentHolder { diff --git a/patches/server/1042-Bundle-spark.patch b/patches/server/1040-Bundle-spark.patch index 5f68e17337..3b630ef1b3 100644 --- a/patches/server/1042-Bundle-spark.patch +++ b/patches/server/1040-Bundle-spark.patch @@ -333,7 +333,7 @@ index d43b98bdfcb00603737a309c0fb7793d42289b8c..dd56c8e041116ef3602a9f89c998c820 com.destroystokyo.paper.VersionHistoryManager.INSTANCE.getClass(); // Paper - load version history now diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 3a91faeb6957e4e783b1de3e1145e7d1d164a857..c8b82bc41f2042bb4b067f06265a3a22e51f7629 100644 +index 764198cf9ffd466bb31de126b618d4364ff4eba7..f6de1c6e8fd9086b7bd725f75ee2606583591d6a 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -309,6 +309,7 @@ public final class CraftServer implements Server { diff --git a/patches/server/1040-Move-CraftComplexRecipe-to-extend-CraftingRecipe.patch b/patches/server/1040-Move-CraftComplexRecipe-to-extend-CraftingRecipe.patch deleted file mode 100644 index 3e85c7f987..0000000000 --- a/patches/server/1040-Move-CraftComplexRecipe-to-extend-CraftingRecipe.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Bjarne Koll <[email protected]> -Date: Fri, 19 Jul 2024 17:27:38 +0200 -Subject: [PATCH] Move CraftComplexRecipe to extend CraftingRecipe - -A craft complex recipe wraps a CustomRecipe, which itself is a -CraftingRecipe. -As such, this complex recipe should also be a crafting recipe. - -diff --git a/src/main/java/net/minecraft/world/item/crafting/CustomRecipe.java b/src/main/java/net/minecraft/world/item/crafting/CustomRecipe.java -index b57a2ba09f160409b5df9a2ae7ec159af3e4bf93..69a7e500c725e9da950df30f2cc4ff5f72e527d0 100644 ---- a/src/main/java/net/minecraft/world/item/crafting/CustomRecipe.java -+++ b/src/main/java/net/minecraft/world/item/crafting/CustomRecipe.java -@@ -34,7 +34,12 @@ public abstract class CustomRecipe implements CraftingRecipe { - // CraftBukkit start - @Override - public Recipe toBukkitRecipe(NamespacedKey id) { -- return new org.bukkit.craftbukkit.inventory.CraftComplexRecipe(id, this); -+ // Paper - make CraftComplexRecipe extend CraftingRecipe - start -+ final org.bukkit.craftbukkit.inventory.CraftComplexRecipe recipe = new org.bukkit.craftbukkit.inventory.CraftComplexRecipe(id, this); -+ recipe.setGroup(this.getGroup()); -+ recipe.setCategory(org.bukkit.craftbukkit.inventory.CraftRecipe.getCategory(this.category())); -+ return recipe; -+ // Paper - make CraftComplexRecipe extend CraftingRecipe - end - } - // CraftBukkit end - } -diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftComplexRecipe.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftComplexRecipe.java -index dcaeaa3367351eb54e2cf8e62be19ecc125a4bb4..05f42ec6177218960b22dc2c224f63cbf37d696f 100644 ---- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftComplexRecipe.java -+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftComplexRecipe.java -@@ -9,12 +9,17 @@ import org.bukkit.craftbukkit.util.CraftNamespacedKey; - import org.bukkit.inventory.ComplexRecipe; - import org.bukkit.inventory.ItemStack; - --public class CraftComplexRecipe implements CraftRecipe, ComplexRecipe { -+public class CraftComplexRecipe extends org.bukkit.inventory.CraftingRecipe implements CraftRecipe, ComplexRecipe { // Paper - make CraftComplexRecipe extend CraftingRecipe - - private final NamespacedKey key; - private final CustomRecipe recipe; - - public CraftComplexRecipe(NamespacedKey key, CustomRecipe recipe) { -+ // Paper - make CraftComplexRecipe extend CraftingRecipe - start -+ super(); -+ super.key = key; -+ super.output = ItemStack.empty(); -+ // Paper - make CraftComplexRecipe extend CraftingRecipe - end - this.key = key; - this.recipe = recipe; - } diff --git a/patches/server/1041-Add-CrafterCraftEvent.patch b/patches/server/1041-Add-CrafterCraftEvent.patch deleted file mode 100644 index 28eb5f5746..0000000000 --- a/patches/server/1041-Add-CrafterCraftEvent.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: ploppyperson <[email protected]> -Date: Thu, 18 Jul 2024 16:38:48 +0200 -Subject: [PATCH] Add CrafterCraftEvent - -While not a one-to-one copy from the proposed commit upstream, -the patch calls the preemtively pulled CrafterCraftEvent. - -See: https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/pull-requests/1450/overview - -diff --git a/src/main/java/net/minecraft/world/level/block/CrafterBlock.java b/src/main/java/net/minecraft/world/level/block/CrafterBlock.java -index 6c24b25a7c8ce6e34aceb5702f1a0a6732ebca44..391a6af36d4c27a04000b31583297a25b89125d3 100644 ---- a/src/main/java/net/minecraft/world/level/block/CrafterBlock.java -+++ b/src/main/java/net/minecraft/world/level/block/CrafterBlock.java -@@ -163,6 +163,16 @@ public class CrafterBlock extends BaseEntityBlock { - } else { - RecipeHolder<CraftingRecipe> recipeHolder = optional.get(); - ItemStack itemStack = recipeHolder.value().assemble(var11, world.registryAccess()); -+ // Paper start - call CrafterCraftEvent -+ final org.bukkit.event.block.CrafterCraftEvent event = new org.bukkit.event.block.CrafterCraftEvent( -+ org.bukkit.craftbukkit.block.CraftBlock.at(world, pos), -+ (org.bukkit.inventory.CraftingRecipe) recipeHolder.toBukkitRecipe(), -+ org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(itemStack) -+ ); -+ if (!event.callEvent()) return; -+ -+ itemStack = org.bukkit.craftbukkit.inventory.CraftItemStack.unwrap(event.getResult()); -+ // Paper end - call CrafterCraftEvent - if (itemStack.isEmpty()) { - world.levelEvent(1050, pos, 0); - } else { diff --git a/patches/server/1043-Add-plugin-info-at-startup.patch b/patches/server/1041-Add-plugin-info-at-startup.patch index 051309bbed..051309bbed 100644 --- a/patches/server/1043-Add-plugin-info-at-startup.patch +++ b/patches/server/1041-Add-plugin-info-at-startup.patch diff --git a/patches/server/1044-Make-interaction-leniency-distance-configurable.patch b/patches/server/1042-Make-interaction-leniency-distance-configurable.patch index 341e13affd..341e13affd 100644 --- a/patches/server/1044-Make-interaction-leniency-distance-configurable.patch +++ b/patches/server/1042-Make-interaction-leniency-distance-configurable.patch diff --git a/patches/server/1045-Fix-PickupStatus-getting-reset.patch b/patches/server/1043-Fix-PickupStatus-getting-reset.patch index 795972058b..795972058b 100644 --- a/patches/server/1045-Fix-PickupStatus-getting-reset.patch +++ b/patches/server/1043-Fix-PickupStatus-getting-reset.patch diff --git a/patches/server/1046-Check-for-block-type-in-SculkSensorBlock-canActivate.patch b/patches/server/1044-Check-for-block-type-in-SculkSensorBlock-canActivate.patch index f060e79368..c56c52b165 100644 --- a/patches/server/1046-Check-for-block-type-in-SculkSensorBlock-canActivate.patch +++ b/patches/server/1044-Check-for-block-type-in-SculkSensorBlock-canActivate.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Check for block type in SculkSensorBlock#canActivate diff --git a/src/main/java/net/minecraft/world/level/block/SculkSensorBlock.java b/src/main/java/net/minecraft/world/level/block/SculkSensorBlock.java -index 9e928302817ee8e1cc8c7f3f1b351a0d5f3a7c2c..1db261f63aaf083b4d38f519f77abecbd942e999 100644 +index b45bc43b5a59a95c50bd756a981368c7fdadbd41..8d57c68d2f20f7c0d5c1be5d5b12e6926aad8c58 100644 --- a/src/main/java/net/minecraft/world/level/block/SculkSensorBlock.java +++ b/src/main/java/net/minecraft/world/level/block/SculkSensorBlock.java @@ -218,7 +218,7 @@ public class SculkSensorBlock extends BaseEntityBlock implements SimpleWaterlogg diff --git a/patches/unapplied/server/1027-Optimise-collision-checking-in-player-move-packet-ha.patch b/patches/unapplied-old/server/1027-Optimise-collision-checking-in-player-move-packet-ha.patch index 1e3006e3e6..1e3006e3e6 100644 --- a/patches/unapplied/server/1027-Optimise-collision-checking-in-player-move-packet-ha.patch +++ b/patches/unapplied-old/server/1027-Optimise-collision-checking-in-player-move-packet-ha.patch diff --git a/patches/unapplied/server/1036-Optimise-nearby-player-retrieval.patch b/patches/unapplied-old/server/1036-Optimise-nearby-player-retrieval.patch index eae5d781cc..eae5d781cc 100644 --- a/patches/unapplied/server/1036-Optimise-nearby-player-retrieval.patch +++ b/patches/unapplied-old/server/1036-Optimise-nearby-player-retrieval.patch diff --git a/work/BuildData b/work/BuildData -Subproject ae1e7b1e31cd3a3892bb05a6ccdcecc48c73c45 +Subproject 533b02cd6ba8dbf8c8607250b02bf2d8c36421e diff --git a/work/Bukkit b/work/Bukkit -Subproject 3a3bea52057e094e4060239ad8a5ce16cf4c8dc +Subproject facd52d216243e2b7f90a9f4d5cc54a8f4bbcbf diff --git a/work/CraftBukkit b/work/CraftBukkit -Subproject 403accd56333f091f4ef8b5f870591785e26cdf +Subproject b95736b13f776ba47322313f482c0520630c353 diff --git a/work/Spigot b/work/Spigot -Subproject 5bbef5ad33ea0f6a5f743ce123b385d3d22ff3f +Subproject 5a6439b9eca2e28522873a0488e142cfc089c0f |