diff options
author | Jake Potrebic <[email protected]> | 2023-04-07 11:39:13 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2023-04-07 19:39:13 +0100 |
commit | 29b17a892d11697dce9ee35d8eab593bb4748fb1 (patch) | |
tree | fbed59c55b02349ce6d6f89a1f9116997263196c | |
parent | ad6c14c62ea4756c6a5a7f9752131a3b90a5cd96 (diff) | |
download | Paper-29b17a892d11697dce9ee35d8eab593bb4748fb1.tar.gz Paper-29b17a892d11697dce9ee35d8eab593bb4748fb1.zip |
Updated Upstream (Bukkit/CraftBukkit/Spigot) (#9088)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing
Bukkit Changes:
5efeb7bd Also update compiler version
c13b867a Update some Maven plugin versions
deb28d9f PR-837: Add more bell API
e938d62a PR-819: Allow Player#sendBlockDamage() to specify a source entity
0e75532c PR-818: Add more Guardian API, particularly for its laser
a10155aa PR-839: Add BlockData#rotate and BlockData#mirror
77e690b4 PR-836: Add missing API for explosive minecarts
60722059 PR-832: Allow getting chunks without generating them and optimize chunk data request for ungenerated chunks
0a2c4b4b PR-834: Add Player#sendHurtAnimation()
CraftBukkit Changes:
be8682aa8 Also update compiler version
08e305f5b Update some Maven plugin versions
187bdd463 PR-1160: Add more bell API
2f8e5bc7c PR-1145: Allow Player#sendBlockDamage() to specify a source entity
bcbb61b36 PR-1144: Add more Guardian API, particularly for its laser
722ddff6d PR-1162: Add BlockData#rotate and BlockData#mirror
80998277c PR-1159: Add missing API for explosive minecarts
1fddefce1 PR-1155: Allow getting chunks without generating them and optimize chunk data request for ungenerated chunks
20e8a486f PR-1157: Add Player#sendHurtAnimation()
Spigot Changes:
b31949f2 Rebuild patches
274 files changed, 554 insertions, 768 deletions
diff --git a/patches/api/0001-Convert-project-to-Gradle.patch b/patches/api/0001-Convert-project-to-Gradle.patch index 3f9488e671..a21ac3b541 100644 --- a/patches/api/0001-Convert-project-to-Gradle.patch +++ b/patches/api/0001-Convert-project-to-Gradle.patch @@ -27,7 +27,7 @@ index 11038da2e071699d6561a331565db0c8d7850d0e..317acfec5894101294a55abff6181943 +/.factorypath diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 -index 0000000000000000000000000000000000000000..17e8858e01d80c422947f507e9d77b7532788752 +index 0000000000000000000000000000000000000000..363001c4a677e27ed98cb16c9789b47783fae725 --- /dev/null +++ b/build.gradle.kts @@ -0,0 +1,82 @@ @@ -96,7 +96,7 @@ index 0000000000000000000000000000000000000000..17e8858e01d80c422947f507e9d77b75 + options.use() + options.isDocFilesSubDirs = true + options.links( -+ "https://guava.dev/releases/31.0.1-jre/api/docs/", ++ "https://guava.dev/releases/31.1-jre/api/docs/", + "https://javadoc.io/doc/org.yaml/snakeyaml/1.33/", + "https://javadoc.io/doc/org.jetbrains/annotations-java5/23.0.0/", + "https://javadoc.io/doc/net.md-5/bungeecord-chat/1.16-R0.4/", @@ -115,10 +115,10 @@ index 0000000000000000000000000000000000000000..17e8858e01d80c422947f507e9d77b75 +} diff --git a/pom.xml b/pom.xml deleted file mode 100644 -index 829ebece9d376cbade1422c58759540054fbedbe..0000000000000000000000000000000000000000 +index 95228f3264ca4857fa69b51ca9235a21761b7649..0000000000000000000000000000000000000000 --- a/pom.xml +++ /dev/null -@@ -1,261 +0,0 @@ +@@ -1,263 +0,0 @@ - -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> @@ -251,23 +251,25 @@ index 829ebece9d376cbade1422c58759540054fbedbe..00000000000000000000000000000000 - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> -- <version>3.10.1</version> +- <version>3.11.0</version> - <configuration> - <!-- we use the Eclipse compiler as it doesn't need a JDK --> - <compilerId>eclipse</compilerId> +- <!-- default changed with version 3.11.0 --> +- <showWarnings>false</showWarnings> - </configuration> - <dependencies> - <dependency> - <groupId>org.codehaus.plexus</groupId> - <artifactId>plexus-compiler-eclipse</artifactId> -- <version>2.12.0</version> +- <version>2.13.0</version> - </dependency> - </dependencies> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-jar-plugin</artifactId> -- <version>3.2.2</version> +- <version>3.3.0</version> - <configuration> - <archive> - <manifest> @@ -309,11 +311,11 @@ index 829ebece9d376cbade1422c58759540054fbedbe..00000000000000000000000000000000 - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-javadoc-plugin</artifactId> -- <version>3.4.0</version> +- <version>3.5.0</version> - <configuration> - <links> -- <link>https://guava.dev/releases/31.0.1-jre/api/docs/</link> -- <link>https://javadoc.io/doc/org.yaml/snakeyaml/1.30/</link> +- <link>https://guava.dev/releases/31.1-jre/api/docs/</link> +- <link>https://javadoc.io/doc/org.yaml/snakeyaml/1.33/</link> - <link>https://javadoc.io/doc/org.jetbrains/annotations-java5/23.0.0/</link> - <link>https://javadoc.io/doc/net.md-5/bungeecord-chat/1.16-R0.4/</link> - </links> @@ -333,7 +335,7 @@ index 829ebece9d376cbade1422c58759540054fbedbe..00000000000000000000000000000000 - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-checkstyle-plugin</artifactId> -- <version>3.1.2</version> +- <version>3.2.1</version> - <executions> - <execution> - <phase>process-classes</phase> @@ -358,7 +360,7 @@ index 829ebece9d376cbade1422c58759540054fbedbe..00000000000000000000000000000000 - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>animal-sniffer-maven-plugin</artifactId> -- <version>1.21</version> +- <version>1.23</version> - <executions> - <execution> - <phase>process-classes</phase> diff --git a/patches/api/0002-Build-system-changes.patch b/patches/api/0002-Build-system-changes.patch index 9c0f602ede..e4eb007c8b 100644 --- a/patches/api/0002-Build-system-changes.patch +++ b/patches/api/0002-Build-system-changes.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Build system changes diff --git a/build.gradle.kts b/build.gradle.kts -index 17e8858e01d80c422947f507e9d77b7532788752..82444d3b95881702910369ec5694dd9f327ad81a 100644 +index 363001c4a677e27ed98cb16c9789b47783fae725..140e5edaf2db8fe00c8ecb32a7be42f89da6c1a7 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -15,15 +15,27 @@ dependencies { @@ -39,7 +39,7 @@ index 17e8858e01d80c422947f507e9d77b7532788752..82444d3b95881702910369ec5694dd9f testImplementation("org.hamcrest:hamcrest-library:1.3") @@ -65,7 +77,7 @@ tasks.withType<Javadoc> { options.links( - "https://guava.dev/releases/31.0.1-jre/api/docs/", + "https://guava.dev/releases/31.1-jre/api/docs/", "https://javadoc.io/doc/org.yaml/snakeyaml/1.33/", - "https://javadoc.io/doc/org.jetbrains/annotations-java5/23.0.0/", + "https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/", // Paper - we don't want Java 5 annotations diff --git a/patches/api/0005-Adventure.patch b/patches/api/0005-Adventure.patch index fba55537c5..4dc21384ed 100644 --- a/patches/api/0005-Adventure.patch +++ b/patches/api/0005-Adventure.patch @@ -7,7 +7,7 @@ Co-authored-by: zml <[email protected]> Co-authored-by: Jake Potrebic <[email protected]> diff --git a/build.gradle.kts b/build.gradle.kts -index 464a209dbf52ebdfa287a553778a37c382a5405c..b7aa72ae9a8b1f39e7bb355d4c6b3bf4bfaa030b 100644 +index 05ac285c0bafa853f820d75c43858836b9bac0c4..81b9ca9c7b93e5eaf4118d69208feeab1bbfdce2 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -8,11 +8,24 @@ java { @@ -51,7 +51,7 @@ index 464a209dbf52ebdfa287a553778a37c382a5405c..b7aa72ae9a8b1f39e7bb355d4c6b3bf4 compileOnly("org.apache.maven:maven-resolver-provider:3.8.5") @@ -80,9 +100,24 @@ tasks.withType<Javadoc> { - "https://guava.dev/releases/31.0.1-jre/api/docs/", + "https://guava.dev/releases/31.1-jre/api/docs/", "https://javadoc.io/doc/org.yaml/snakeyaml/1.33/", "https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/", // Paper - we don't want Java 5 annotations - "https://javadoc.io/doc/net.md-5/bungeecord-chat/1.16-R0.4/", @@ -1457,7 +1457,7 @@ index efb97712cc9dc7c1e12a59f5b94e4f2ad7c6b7d8..3024468af4c073324e536c1cb26beffb return warning == null || warning.value(); } diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index 98b9818fa10be7a36e862b3afafc9ed2d0a64209..ed57cd69d88504b78782271c9a3d423a29471674 100644 +index 72851fa36a985b780d5ad24497aec1ce226830ae..2e26ed8492669de22cf9b652edc1e83d8eaa6e2a 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java @@ -43,7 +43,7 @@ import org.jetbrains.annotations.Nullable; @@ -1469,7 +1469,7 @@ index 98b9818fa10be7a36e862b3afafc9ed2d0a64209..ed57cd69d88504b78782271c9a3d423a /** * Gets the {@link Block} at the given coordinates -@@ -638,6 +638,14 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient +@@ -649,6 +649,14 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient @NotNull public List<Player> getPlayers(); @@ -1995,7 +1995,7 @@ index 281518d6e1f67722134e22d89b71106aae0c4397..d5be25c62b2eb90f8e171646b460fef0 + // Paper end } diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index c60e1fc1cad1b9889a508602df84840723b7b966..fbf56bcc4540f7f1a8ced7cc2cd96e291c1ac273 100644 +index f2aeb6dba58ae2e0936ae2fad1cfd8d6198befe7..1fa1ad73ba424c8ae7a0646bc076e13a3a7f3e6f 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java @@ -39,7 +39,28 @@ import org.jetbrains.annotations.Nullable; @@ -2173,7 +2173,7 @@ index c60e1fc1cad1b9889a508602df84840723b7b966..fbf56bcc4540f7f1a8ced7cc2cd96e29 /** * Says a message (or runs a command). * -@@ -573,6 +659,90 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -606,6 +692,90 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM */ public void sendEquipmentChange(@NotNull LivingEntity entity, @NotNull Map<EquipmentSlot, ItemStack> items); @@ -2264,7 +2264,7 @@ index c60e1fc1cad1b9889a508602df84840723b7b966..fbf56bcc4540f7f1a8ced7cc2cd96e29 /** * Send a sign change. This fakes a sign change packet for a user at * a certain location. This will not actually change the world in any way. -@@ -587,7 +757,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -620,7 +790,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * @param lines the new text on the sign or null to clear it * @throws IllegalArgumentException if location is null * @throws IllegalArgumentException if lines is non-null and has a length less than 4 @@ -2274,7 +2274,7 @@ index c60e1fc1cad1b9889a508602df84840723b7b966..fbf56bcc4540f7f1a8ced7cc2cd96e29 public void sendSignChange(@NotNull Location loc, @Nullable String[] lines) throws IllegalArgumentException; /** -@@ -606,7 +778,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -639,7 +811,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * @throws IllegalArgumentException if location is null * @throws IllegalArgumentException if dyeColor is null * @throws IllegalArgumentException if lines is non-null and has a length less than 4 @@ -2284,7 +2284,7 @@ index c60e1fc1cad1b9889a508602df84840723b7b966..fbf56bcc4540f7f1a8ced7cc2cd96e29 public void sendSignChange(@NotNull Location loc, @Nullable String[] lines, @NotNull DyeColor dyeColor) throws IllegalArgumentException; /** -@@ -626,7 +800,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -659,7 +833,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * @throws IllegalArgumentException if location is null * @throws IllegalArgumentException if dyeColor is null * @throws IllegalArgumentException if lines is non-null and has a length less than 4 @@ -2294,7 +2294,7 @@ index c60e1fc1cad1b9889a508602df84840723b7b966..fbf56bcc4540f7f1a8ced7cc2cd96e29 public void sendSignChange(@NotNull Location loc, @Nullable String[] lines, @NotNull DyeColor dyeColor, boolean hasGlowingText) throws IllegalArgumentException; /** -@@ -1089,6 +1265,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1132,6 +1308,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * pack correctly. * </ul> * @@ -2302,7 +2302,7 @@ index c60e1fc1cad1b9889a508602df84840723b7b966..fbf56bcc4540f7f1a8ced7cc2cd96e29 * @param url The URL from which the client will download the resource * pack. The string must contain only US-ASCII characters and should * be encoded as per RFC 1738. -@@ -1145,8 +1322,10 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1188,8 +1365,10 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * @throws IllegalArgumentException Thrown if the hash is not 20 bytes * long. */ @@ -2313,7 +2313,7 @@ index c60e1fc1cad1b9889a508602df84840723b7b966..fbf56bcc4540f7f1a8ced7cc2cd96e29 /** * Request that the player's client download and switch resource packs. * <p> -@@ -1182,6 +1361,54 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1225,6 +1404,54 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * @param hash The sha1 hash sum of the resource pack file which is used * to apply a cached version of the pack directly without downloading * if it is available. Hast to be 20 bytes long! @@ -2368,7 +2368,7 @@ index c60e1fc1cad1b9889a508602df84840723b7b966..fbf56bcc4540f7f1a8ced7cc2cd96e29 * @param force If true, the client will be disconnected from the server * when it declines to use the resource pack. * @throws IllegalArgumentException Thrown if the URL is null. -@@ -1236,8 +1463,57 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1279,8 +1506,57 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * @throws IllegalArgumentException Thrown if the hash is not 20 bytes * long. */ @@ -2426,7 +2426,7 @@ index c60e1fc1cad1b9889a508602df84840723b7b966..fbf56bcc4540f7f1a8ced7cc2cd96e29 /** * Gets the Scoreboard displayed to this player * -@@ -1353,7 +1629,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1396,7 +1672,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * * @param title Title text * @param subtitle Subtitle text @@ -2435,7 +2435,7 @@ index c60e1fc1cad1b9889a508602df84840723b7b966..fbf56bcc4540f7f1a8ced7cc2cd96e29 */ @Deprecated public void sendTitle(@Nullable String title, @Nullable String subtitle); -@@ -1372,7 +1648,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1415,7 +1691,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * @param fadeIn time in ticks for titles to fade in. Defaults to 10. * @param stay time in ticks for titles to stay. Defaults to 70. * @param fadeOut time in ticks for titles to fade out. Defaults to 20. @@ -2445,7 +2445,7 @@ index c60e1fc1cad1b9889a508602df84840723b7b966..fbf56bcc4540f7f1a8ced7cc2cd96e29 public void sendTitle(@Nullable String title, @Nullable String subtitle, int fadeIn, int stay, int fadeOut); /** -@@ -1599,6 +1877,14 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1642,6 +1920,14 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM */ public int getClientViewDistance(); @@ -2460,7 +2460,7 @@ index c60e1fc1cad1b9889a508602df84840723b7b966..fbf56bcc4540f7f1a8ced7cc2cd96e29 /** * Gets the player's estimated ping in milliseconds. * -@@ -1624,8 +1910,10 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1667,8 +1953,10 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * they wish. * * @return the player's locale @@ -2471,7 +2471,7 @@ index c60e1fc1cad1b9889a508602df84840723b7b966..fbf56bcc4540f7f1a8ced7cc2cd96e29 public String getLocale(); /** -@@ -1667,6 +1955,14 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1710,6 +1998,14 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM */ public boolean isAllowingServerListings(); @@ -2486,7 +2486,7 @@ index c60e1fc1cad1b9889a508602df84840723b7b966..fbf56bcc4540f7f1a8ced7cc2cd96e29 // Spigot start public class Spigot extends Entity.Spigot { -@@ -1721,11 +2017,13 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1764,11 +2060,13 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM throw new UnsupportedOperationException("Not supported yet."); } @@ -2500,7 +2500,7 @@ index c60e1fc1cad1b9889a508602df84840723b7b966..fbf56bcc4540f7f1a8ced7cc2cd96e29 @Override public void sendMessage(@NotNull net.md_5.bungee.api.chat.BaseComponent... components) { throw new UnsupportedOperationException("Not supported yet."); -@@ -1736,7 +2034,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1779,7 +2077,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * * @param position the screen position * @param component the components to send @@ -2510,7 +2510,7 @@ index c60e1fc1cad1b9889a508602df84840723b7b966..fbf56bcc4540f7f1a8ced7cc2cd96e29 public void sendMessage(@NotNull net.md_5.bungee.api.ChatMessageType position, @NotNull net.md_5.bungee.api.chat.BaseComponent component) { throw new UnsupportedOperationException("Not supported yet."); } -@@ -1746,7 +2046,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1789,7 +2089,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * * @param position the screen position * @param components the components to send @@ -2520,7 +2520,7 @@ index c60e1fc1cad1b9889a508602df84840723b7b966..fbf56bcc4540f7f1a8ced7cc2cd96e29 public void sendMessage(@NotNull net.md_5.bungee.api.ChatMessageType position, @NotNull net.md_5.bungee.api.chat.BaseComponent... components) { throw new UnsupportedOperationException("Not supported yet."); } -@@ -1757,7 +2059,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1800,7 +2102,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * @param position the screen position * @param sender the sender of the message * @param component the components to send @@ -2530,7 +2530,7 @@ index c60e1fc1cad1b9889a508602df84840723b7b966..fbf56bcc4540f7f1a8ced7cc2cd96e29 public void sendMessage(@NotNull net.md_5.bungee.api.ChatMessageType position, @Nullable java.util.UUID sender, @NotNull net.md_5.bungee.api.chat.BaseComponent component) { throw new UnsupportedOperationException("Not supported yet."); } -@@ -1768,7 +2072,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1811,7 +2115,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * @param position the screen position * @param sender the sender of the message * @param components the components to send diff --git a/patches/api/0010-Timings-v2.patch b/patches/api/0010-Timings-v2.patch index 2b9f5e8bf8..4920f2d9f7 100644 --- a/patches/api/0010-Timings-v2.patch +++ b/patches/api/0010-Timings-v2.patch @@ -3455,10 +3455,10 @@ index 516d7fc7812aac343782861d0d567f54aa578c2a..00000000000000000000000000000000 - // Spigot end -} diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index fbf56bcc4540f7f1a8ced7cc2cd96e291c1ac273..8602b96bfc860ff1fea4c1c7a3655ce3a9516cf4 100644 +index 1fa1ad73ba424c8ae7a0646bc076e13a3a7f3e6f..96ad56d682d0872f057b52ec87a620408845a473 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -2077,7 +2077,14 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -2120,7 +2120,14 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @Deprecated // Paper public void sendMessage(@NotNull net.md_5.bungee.api.ChatMessageType position, @Nullable java.util.UUID sender, @NotNull net.md_5.bungee.api.chat.BaseComponent... components) { throw new UnsupportedOperationException("Not supported yet."); diff --git a/patches/api/0012-Player-affects-spawning-API.patch b/patches/api/0012-Player-affects-spawning-API.patch index 5410c2f5e6..d28fe5c96d 100644 --- a/patches/api/0012-Player-affects-spawning-API.patch +++ b/patches/api/0012-Player-affects-spawning-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Player affects spawning API diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index 8d8a540c844e5365eed75a87db197a8fd4249bcd..4ddea8d71723db4326459c96324a817c70492261 100644 +index 96ad56d682d0872f057b52ec87a620408845a473..acac8f4e4656e4485213936092fd6982a5c2e9e0 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -1916,6 +1916,22 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1959,6 +1959,22 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @Deprecated // Paper public String getLocale(); diff --git a/patches/api/0017-Add-view-distance-API.patch b/patches/api/0017-Add-view-distance-API.patch index 334a8d41ba..402ed777c9 100644 --- a/patches/api/0017-Add-view-distance-API.patch +++ b/patches/api/0017-Add-view-distance-API.patch @@ -8,10 +8,10 @@ Add per player no-tick, tick, and send view distances. Also add send/no-tick view distance to World. diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index ed57cd69d88504b78782271c9a3d423a29471674..8a6a548314eef8d486be908e38e3a4562f26bdb4 100644 +index 2e26ed8492669de22cf9b652edc1e83d8eaa6e2a..1675aceb9f4ce21782ef85fab988173642498c6b 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java -@@ -2698,6 +2698,62 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient +@@ -2709,6 +2709,62 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient int getSimulationDistance(); // Spigot end @@ -75,10 +75,10 @@ index ed57cd69d88504b78782271c9a3d423a29471674..8a6a548314eef8d486be908e38e3a456 public class Spigot { diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index 4ddea8d71723db4326459c96324a817c70492261..a8310063973bb18502d561903b78149a6fda4939 100644 +index acac8f4e4656e4485213936092fd6982a5c2e9e0..41b44ca3ccea7885e24d134b3748eb93fa95664b 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -1930,6 +1930,78 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1973,6 +1973,78 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * @param affects Whether the player can affect mob spawning */ public void setAffectsSpawning(boolean affects); diff --git a/patches/api/0021-Graduate-bungeecord-chat-API-from-spigot-subclasses.patch b/patches/api/0021-Graduate-bungeecord-chat-API-from-spigot-subclasses.patch index 82a4b09bfa..26b0e5a5b9 100644 --- a/patches/api/0021-Graduate-bungeecord-chat-API-from-spigot-subclasses.patch +++ b/patches/api/0021-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 1035ce181415a19f8d6460f70d3d900e3f7017d3..316146305465b68b703e898206745de94ad5350f 100644 +index 07f092fa9edf11515b8c79ac8dca4f83905e9ff5..f05ff4bd1b41a957bb2f33ab5a88b4aeac9cebc4 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java @@ -379,6 +379,30 @@ public final class Bukkit { @@ -41,7 +41,7 @@ index 1035ce181415a19f8d6460f70d3d900e3f7017d3..316146305465b68b703e898206745de9 * 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 6a7b91af3e738613cf79c13e2844efe9a2efd254..bef555b3de44fed312b45a5d5cd811b18fda88c8 100644 +index 866559ab7cd3f351266fb41dce26a210a7702ff8..74e5f26c32e6e0c84c604b9704bfe672ee1915ef 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java @@ -312,6 +312,30 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi @@ -76,10 +76,10 @@ index 6a7b91af3e738613cf79c13e2844efe9a2efd254..bef555b3de44fed312b45a5d5cd811b1 * 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/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index a8310063973bb18502d561903b78149a6fda4939..a2c813d6d94ae2a87278d92445635ae8dd3ab00a 100644 +index 41b44ca3ccea7885e24d134b3748eb93fa95664b..963c7a56538ecf4a3505339728c45c6382b94d22 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -813,6 +813,42 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -846,6 +846,42 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM */ public void sendMap(@NotNull MapView map); @@ -120,5 +120,5 @@ index a8310063973bb18502d561903b78149a6fda4939..a2c813d6d94ae2a87278d92445635ae8 + // Paper end + /** - * Add custom chat completion suggestions shown to the player while typing a - * message. + * Send a hurt animation. This fakes incoming damage towards the player from + * the given yaw relative to the player's direction. diff --git a/patches/api/0025-Player-Tab-List-and-Title-APIs.patch b/patches/api/0025-Player-Tab-List-and-Title-APIs.patch index ffe43fb423..955a043d6e 100644 --- a/patches/api/0025-Player-Tab-List-and-Title-APIs.patch +++ b/patches/api/0025-Player-Tab-List-and-Title-APIs.patch @@ -432,10 +432,10 @@ index 0000000000000000000000000000000000000000..9e90c3df567a65b48a0b9341f784eb90 + } +} diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index a2c813d6d94ae2a87278d92445635ae8dd3ab00a..3e2b8c1ae51404352adccc9ad108982173306ee9 100644 +index 963c7a56538ecf4a3505339728c45c6382b94d22..f6f635ef60d56da619f9fbe3b568f9378fff4a01 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -847,6 +847,131 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -880,6 +880,131 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM public default void sendMessage(net.md_5.bungee.api.ChatMessageType position, net.md_5.bungee.api.chat.BaseComponent... components) { spigot().sendMessage(position, components); } diff --git a/patches/api/0027-Complete-resource-pack-API.patch b/patches/api/0027-Complete-resource-pack-API.patch index f51362288c..4219ab15b2 100644 --- a/patches/api/0027-Complete-resource-pack-API.patch +++ b/patches/api/0027-Complete-resource-pack-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Complete resource pack API diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index 3e2b8c1ae51404352adccc9ad108982173306ee9..cdc67b2c6770119ada67033b388befa607bd46db 100644 +index f6f635ef60d56da619f9fbe3b568f9378fff4a01..a22001436e7f5f1b80a900b667a536db15ac6305 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -1394,7 +1394,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1437,7 +1437,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * @throws IllegalArgumentException Thrown if the URL is null. * @throws IllegalArgumentException Thrown if the URL is too long. The * length restriction is an implementation specific arbitrary value. @@ -18,7 +18,7 @@ index 3e2b8c1ae51404352adccc9ad108982173306ee9..cdc67b2c6770119ada67033b388befa6 public void setResourcePack(@NotNull String url); /** -@@ -2210,6 +2212,124 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -2253,6 +2255,124 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM default net.kyori.adventure.text.event.HoverEvent<net.kyori.adventure.text.event.HoverEvent.ShowEntity> asHoverEvent(final @NotNull java.util.function.UnaryOperator<net.kyori.adventure.text.event.HoverEvent.ShowEntity> op) { return net.kyori.adventure.text.event.HoverEvent.showEntity(op.apply(net.kyori.adventure.text.event.HoverEvent.ShowEntity.of(this.getType().getKey(), this.getUniqueId(), this.displayName()))); } diff --git a/patches/api/0046-Add-String-based-Action-Bar-API.patch b/patches/api/0046-Add-String-based-Action-Bar-API.patch index 5d8a11a0ab..8ed51fb713 100644 --- a/patches/api/0046-Add-String-based-Action-Bar-API.patch +++ b/patches/api/0046-Add-String-based-Action-Bar-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add String based Action Bar API diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index cdc67b2c6770119ada67033b388befa607bd46db..0fdaf416960ace84fbe9b9c461641efbb8b631a4 100644 +index a22001436e7f5f1b80a900b667a536db15ac6305..492a00552c7de43141d18e4b1a3da0915bac6a89 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -814,6 +814,39 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -847,6 +847,39 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM public void sendMap(@NotNull MapView map); // Paper start @@ -48,7 +48,7 @@ index cdc67b2c6770119ada67033b388befa607bd46db..0fdaf416960ace84fbe9b9c461641efb /** * Sends the component to the player * -@@ -841,9 +874,11 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -874,9 +907,11 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM /** * Sends an array of components as a single message to the specified screen position of this player * diff --git a/patches/api/0055-Fix-upstream-javadocs.patch b/patches/api/0055-Fix-upstream-javadocs.patch index 209817247a..82a193d725 100644 --- a/patches/api/0055-Fix-upstream-javadocs.patch +++ b/patches/api/0055-Fix-upstream-javadocs.patch @@ -170,10 +170,10 @@ index 7d06f2a8f17cf42eeb05567e3f5c0c16074af9bc..9b5dcd897df91e6ba3c71c216e7a180b * @return an array containing all previous players */ diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index 749d3de7dad480965be536938733d72bdfc2995b..d6b9d7c790399ea5dface159dd41c46920f71dda 100644 +index 6f31709d3a8b2c6818c9c4c90c10230d53087995..d5a4b3fe7a791eed28508882e42e6490b4f96067 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java -@@ -1258,11 +1258,8 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient +@@ -1252,11 +1252,8 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient /** * Spawn a {@link FallingBlock} entity at the given {@link Location} of @@ -186,7 +186,7 @@ index 749d3de7dad480965be536938733d72bdfc2995b..d6b9d7c790399ea5dface159dd41c469 * * @param location The {@link Location} to spawn the FallingBlock * @param data The block data -@@ -2612,7 +2609,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient +@@ -2623,7 +2620,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient /** * Find the closest nearby structure of a given {@link StructureType}. * Finding unexplored structures can, and will, block if the world is @@ -195,7 +195,7 @@ index 749d3de7dad480965be536938733d72bdfc2995b..d6b9d7c790399ea5dface159dd41c469 * temporarily freezing while locating an unexplored structure. * <p> * The {@code radius} is not a rigid square radius. Each structure may alter -@@ -2646,7 +2643,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient +@@ -2657,7 +2654,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient /** * Find the closest nearby structure of a given {@link StructureType}. * Finding unexplored structures can, and will, block if the world is @@ -204,7 +204,7 @@ index 749d3de7dad480965be536938733d72bdfc2995b..d6b9d7c790399ea5dface159dd41c469 * temporarily freezing while locating an unexplored structure. * <p> * The {@code radius} is not a rigid square radius. Each structure may alter -@@ -2679,7 +2676,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient +@@ -2690,7 +2687,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient /** * Find the closest nearby structure of a given {@link Structure}. Finding * unexplored structures can, and will, block if the world is looking in @@ -244,10 +244,10 @@ index f9bd74f9ce6bd6650726e5a993f9b6e292cdc74d..f4c37ce1fe7aac3dde8485ee51fc8888 +// Paper end +} diff --git a/src/main/java/org/bukkit/block/data/BlockData.java b/src/main/java/org/bukkit/block/data/BlockData.java -index 12a7ca1808cb80daceb7695a2f0e8f97e0e21a49..0d5ef61e100d972a5cf308b23d5e8f2fdbad5718 100644 +index 96dbcc34c87dc3713ece696e8bf65d264faf0236..dd4f394860ef8cabbd4174fe3088eec97aec73a5 100644 --- a/src/main/java/org/bukkit/block/data/BlockData.java +++ b/src/main/java/org/bukkit/block/data/BlockData.java -@@ -211,7 +211,7 @@ public interface BlockData extends Cloneable { +@@ -213,7 +213,7 @@ public interface BlockData extends Cloneable { * {@link Material#REDSTONE_WIRE} -> {@link Material#REDSTONE} * {@link Material#CARROTS} -> {@link Material#CARROT} * </pre> @@ -414,7 +414,7 @@ index ae9eaaa8e38e1d9dfc459926c7fc51ddb89de84a..b2ec535bb1b0ce0c114ddd7638b90218 @Override public int getConversionTime(); diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index 0833c4dbc31d90ae0e7f37fe86359b9d46bb8d41..5d8cd14e4511daedaf46b926e2c3a470bf5c480a 100644 +index 492a00552c7de43141d18e4b1a3da0915bac6a89..a54ae581e45d35535881c0f20b25c8011a7745c2 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java @@ -310,15 +310,15 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -446,7 +446,7 @@ index 0833c4dbc31d90ae0e7f37fe86359b9d46bb8d41..5d8cd14e4511daedaf46b926e2c3a470 * @param loc the location to play the effect at * @param effect the {@link Effect} * @param data a data bit needed for some effects -@@ -831,7 +831,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -864,7 +864,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * * Use supplied alternative character to the section symbol to represent legacy color codes. * @@ -455,7 +455,7 @@ index 0833c4dbc31d90ae0e7f37fe86359b9d46bb8d41..5d8cd14e4511daedaf46b926e2c3a470 * @param message The message to send * @deprecated use {@link #sendActionBar(net.kyori.adventure.text.Component)} */ -@@ -1264,7 +1264,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1307,7 +1307,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM /** * Allows this player to see a player that was previously hidden. If @@ -464,7 +464,7 @@ index 0833c4dbc31d90ae0e7f37fe86359b9d46bb8d41..5d8cd14e4511daedaf46b926e2c3a470 * remain hidden until the other plugin calls this method too. * * @param plugin Plugin that wants to show the player -@@ -1293,7 +1293,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1336,7 +1336,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM /** * Allows this player to see an entity that was previously hidden. If diff --git a/patches/api/0080-Ability-to-apply-mending-to-XP-API.patch b/patches/api/0080-Ability-to-apply-mending-to-XP-API.patch index 76d3f0d052..d1369bc81e 100644 --- a/patches/api/0080-Ability-to-apply-mending-to-XP-API.patch +++ b/patches/api/0080-Ability-to-apply-mending-to-XP-API.patch @@ -10,10 +10,10 @@ of giving the player experience points. Both an API To standalone mend, and apply mending logic to .giveExp has been added. diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index dbe15267053cfd6bdac093f798dda1cb5aff02c4..95130fde38e7fcec4139fac97df25d82e0a79587 100644 +index b55df11a0beb8e3b0e6255a7c0f1f73486cf83d7..43d7947e470096980b3384c42f1b1933f224ecfa 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -1128,12 +1128,33 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1171,12 +1171,33 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM */ public void resetPlayerWeather(); diff --git a/patches/api/0091-Player.setPlayerProfile-API.patch b/patches/api/0091-Player.setPlayerProfile-API.patch index afd996878e..57883869df 100644 --- a/patches/api/0091-Player.setPlayerProfile-API.patch +++ b/patches/api/0091-Player.setPlayerProfile-API.patch @@ -93,10 +93,10 @@ index d769ad908c3454fa9088a42f32250bbdf8f9fa7e..2eaf31f1053787b39184dfa8ac6df87d /** diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index cadea6a5b8cb04da6de2b8bb70c098dc14157ff4..c1030fb291f8e218a1bfd744850d0c1e4925bc0a 100644 +index 43d7947e470096980b3384c42f1b1933f224ecfa..de29e26fe8981e09534ebcedc683625d881b7e54 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -2386,6 +2386,20 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -2429,6 +2429,20 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * was {@link org.bukkit.event.player.PlayerResourcePackStatusEvent.Status#SUCCESSFULLY_LOADED} */ boolean hasResourcePack(); diff --git a/patches/api/0094-Add-openSign-method-to-HumanEntity.patch b/patches/api/0094-Add-openSign-method-to-HumanEntity.patch index 35ce07a5af..cb3f505eb1 100644 --- a/patches/api/0094-Add-openSign-method-to-HumanEntity.patch +++ b/patches/api/0094-Add-openSign-method-to-HumanEntity.patch @@ -24,10 +24,10 @@ index abdca9fe5acc90f167219eb769ece66c35682bb1..9715a9d36187e2eecfeab1a05087d27c /** * Make the entity drop the item in their hand. diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index 95163d95b80f245712839af4c03e0df721809117..3a9dd66d8f30c04342180097d8de44933304b88c 100644 +index de29e26fe8981e09534ebcedc683625d881b7e54..ac8551641309413aa2c871e94cbcb8438c0e9206 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -2241,7 +2241,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -2284,7 +2284,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM /** * Open a Sign for editing by the Player. * diff --git a/patches/api/0095-Add-Ban-Methods-to-Player-Objects.patch b/patches/api/0095-Add-Ban-Methods-to-Player-Objects.patch index a01095dce3..cccc0a41c8 100644 --- a/patches/api/0095-Add-Ban-Methods-to-Player-Objects.patch +++ b/patches/api/0095-Add-Ban-Methods-to-Player-Objects.patch @@ -74,10 +74,10 @@ index 3ba8ff1a41ac9fd96fd4dec5cbe0f714fef93022..b39ed4eb2e7d9e40805e201d77973877 /** * Checks if this player is whitelisted or not diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index 3a9dd66d8f30c04342180097d8de44933304b88c..c43cf2bdf24de153d16017e50d9b5723218e3d44 100644 +index ac8551641309413aa2c871e94cbcb8438c0e9206..2b0565eb6ff222bd51ad8d98622ac7d9e5314aac 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -814,6 +814,162 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -847,6 +847,162 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM public void sendMap(@NotNull MapView map); // Paper start diff --git a/patches/api/0098-Additional-world.getNearbyEntities-API-s.patch b/patches/api/0098-Additional-world.getNearbyEntities-API-s.patch index 1d62b79f35..eebbb3244b 100644 --- a/patches/api/0098-Additional-world.getNearbyEntities-API-s.patch +++ b/patches/api/0098-Additional-world.getNearbyEntities-API-s.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Additional world.getNearbyEntities API's Provides more methods to get nearby entities, and filter by types and predicates diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index 749d3de7dad480965be536938733d72bdfc2995b..dad7de7246741d6f3f2a444cf0b88f396302a8af 100644 +index d5a4b3fe7a791eed28508882e42e6490b4f96067..02ed403b0fcb1a45d931fa694362d4a7714d1248 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java @@ -1,6 +1,9 @@ @@ -19,7 +19,7 @@ index 749d3de7dad480965be536938733d72bdfc2995b..dad7de7246741d6f3f2a444cf0b88f39 import java.util.Collection; import java.util.HashMap; import java.util.List; -@@ -657,6 +660,256 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient +@@ -668,6 +671,256 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient @NotNull public Collection<Entity> getEntitiesByClasses(@NotNull Class<?>... classes); diff --git a/patches/api/0100-Expand-World.spawnParticle-API-and-add-Builder.patch b/patches/api/0100-Expand-World.spawnParticle-API-and-add-Builder.patch index 64a2802459..33d2882568 100644 --- a/patches/api/0100-Expand-World.spawnParticle-API-and-add-Builder.patch +++ b/patches/api/0100-Expand-World.spawnParticle-API-and-add-Builder.patch @@ -522,10 +522,10 @@ index 0ca7955003eea0556a04a54056152ec27d93a9ee..93244e6d940891f1297d4a26a80ba155 * Options which can be applied to redstone dust particles - a particle * color and size. diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index 9ad652054b32c650769d6c6934ceefd8fc1f38ab..089f06c97082e7828946c3cb1951b2f625c6fc2f 100644 +index 02ed403b0fcb1a45d931fa694362d4a7714d1248..16204198a72ea24a291b0438dba36b4bd797df42 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java -@@ -2809,7 +2809,57 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient +@@ -2820,7 +2820,57 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient * @param data the data to use for the particle or null, * the type of this depends on {@link Particle#getDataType()} */ diff --git a/patches/api/0114-Expand-Explosions-API.patch b/patches/api/0114-Expand-Explosions-API.patch index f578a00aa5..784827ad5a 100644 --- a/patches/api/0114-Expand-Explosions-API.patch +++ b/patches/api/0114-Expand-Explosions-API.patch @@ -106,10 +106,10 @@ index 6693e3d8dc2519facb12db981a6b6325faa095bf..5a6b33c6d9a68affdbd02c13fdb0854e * Returns a list of entities within a bounding box centered around a Location. * diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index ae102dddda30ff0e15f70bdb17385c8d9d4b9a08..adf743334f4e69ebca8045df70800f67bcd7d98f 100644 +index 16204198a72ea24a291b0438dba36b4bd797df42..9b9158266ab9701c462bed18a4dbc3be17b6efad 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java -@@ -1424,6 +1424,88 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient +@@ -1435,6 +1435,88 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient */ public boolean createExplosion(@NotNull Location loc, float power, boolean setFire); diff --git a/patches/api/0118-Add-World.getEntity-UUID-API.patch b/patches/api/0118-Add-World.getEntity-UUID-API.patch index 759dc7c245..35a05407fd 100644 --- a/patches/api/0118-Add-World.getEntity-UUID-API.patch +++ b/patches/api/0118-Add-World.getEntity-UUID-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add World.getEntity(UUID) API diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index adf743334f4e69ebca8045df70800f67bcd7d98f..e0caac06b7f5459faefbbd5a6a3486dbb6bfa9ba 100644 +index 9b9158266ab9701c462bed18a4dbc3be17b6efad..29683e2ad918d8e9779578421abf7ef183bd45c0 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java -@@ -944,6 +944,17 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient +@@ -955,6 +955,17 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient @NotNull public Collection<Entity> getNearbyEntities(@NotNull Location location, double x, double y, double z); diff --git a/patches/api/0132-Provide-Chunk-Coordinates-as-a-Long-API.patch b/patches/api/0132-Provide-Chunk-Coordinates-as-a-Long-API.patch index 286027b8ed..a458c4c14c 100644 --- a/patches/api/0132-Provide-Chunk-Coordinates-as-a-Long-API.patch +++ b/patches/api/0132-Provide-Chunk-Coordinates-as-a-Long-API.patch @@ -7,10 +7,10 @@ Allows you to easily access the chunks X/z as a long, and a method to look up by the long key too. diff --git a/src/main/java/org/bukkit/Chunk.java b/src/main/java/org/bukkit/Chunk.java -index a33379e6df0577ea149be473a647258a3bda99f1..fa14c276309fc113d5fda38dfdda1d6ee25b8787 100644 +index 94db3cfa41ff80a53fcf456a394536a6a93c0c02..dc1a328e2202b755266b2564656f5bb60dd260cd 100644 --- a/src/main/java/org/bukkit/Chunk.java +++ b/src/main/java/org/bukkit/Chunk.java -@@ -29,6 +29,32 @@ public interface Chunk extends PersistentDataHolder { +@@ -33,6 +33,32 @@ public interface Chunk extends PersistentDataHolder { */ int getZ(); @@ -44,10 +44,10 @@ index a33379e6df0577ea149be473a647258a3bda99f1..fa14c276309fc113d5fda38dfdda1d6e * Gets the world containing this chunk * diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index e0caac06b7f5459faefbbd5a6a3486dbb6bfa9ba..7d6c923ea603a3193865e6a34b41617ac7016d19 100644 +index 29683e2ad918d8e9779578421abf7ef183bd45c0..4b27d1b3086cd1504759b3b06bde665ea6d3a0ec 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java -@@ -212,6 +212,22 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient +@@ -223,6 +223,22 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient @NotNull public Chunk getChunkAt(@NotNull Block block); diff --git a/patches/api/0133-Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch b/patches/api/0133-Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch index 615d6cb623..b0bfc7075c 100644 --- a/patches/api/0133-Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch +++ b/patches/api/0133-Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Ability to get Tile Entities from a chunk without snapshots diff --git a/src/main/java/org/bukkit/Chunk.java b/src/main/java/org/bukkit/Chunk.java -index fa14c276309fc113d5fda38dfdda1d6ee25b8787..eccc357cabd8317afc5666c3347936d50eb34015 100644 +index dc1a328e2202b755266b2564656f5bb60dd260cd..2f6142b6bfaa3b523478eccd6ad13ce922e81da9 100644 --- a/src/main/java/org/bukkit/Chunk.java +++ b/src/main/java/org/bukkit/Chunk.java -@@ -118,7 +118,30 @@ public interface Chunk extends PersistentDataHolder { +@@ -122,7 +122,30 @@ public interface Chunk extends PersistentDataHolder { * @return The tile entities. */ @NotNull @@ -39,4 +39,4 @@ index fa14c276309fc113d5fda38dfdda1d6ee25b8787..eccc357cabd8317afc5666c3347936d5 + // Paper end /** - * Checks if the chunk is loaded. + * Checks if the chunk is fully generated. diff --git a/patches/api/0140-isChunkGenerated-API.patch b/patches/api/0140-isChunkGenerated-API.patch index 510a040e7e..35161b9d4f 100644 --- a/patches/api/0140-isChunkGenerated-API.patch +++ b/patches/api/0140-isChunkGenerated-API.patch @@ -34,10 +34,10 @@ index 16a604b6315daff228c827fe02b1234cca3e884d..20978b269a7757a561d6b872cc77898b /** * Sets the position of this Location and returns itself diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index 00651d5486f1de886df7a4a01aaf272ceb0fa82a..8075ff77eddb971a0a73dad3c9b809131b5db343 100644 +index 0209dc06a6ddb7d30560efe5ba483238de33fd9c..fbfe1e0923eddefbb378c3e150f0bb08802fa812 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java -@@ -260,6 +260,17 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient +@@ -271,6 +271,17 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient public default Chunk getChunkAt(long chunkKey) { return getChunkAt((int) chunkKey, (int) (chunkKey >> 32)); } diff --git a/patches/api/0142-Async-Chunks-API.patch b/patches/api/0142-Async-Chunks-API.patch index ba50b22478..c18753b9c4 100644 --- a/patches/api/0142-Async-Chunks-API.patch +++ b/patches/api/0142-Async-Chunks-API.patch @@ -8,10 +8,10 @@ Adds API's to load or generate chunks asynchronously. Also adds utility methods to Entity to teleport asynchronously. diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index 8075ff77eddb971a0a73dad3c9b809131b5db343..12c1731cd3e7138b30a509bf1c6de937b70cf27d 100644 +index fbfe1e0923eddefbb378c3e150f0bb08802fa812..4031b2c3b7d6870f649e76f47a72e31a0f300c00 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java -@@ -969,6 +969,482 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient +@@ -980,6 +980,482 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient } return nearby; } @@ -495,7 +495,7 @@ index 8075ff77eddb971a0a73dad3c9b809131b5db343..12c1731cd3e7138b30a509bf1c6de937 /** diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java -index 13e0316b2446c1d10b2ff3582b948265de21bfef..6fb14175962ec9730e4b70330481ec21d2c87da5 100644 +index 17fd1322fcd76ac899f3db1d7fdd7fbdabe2209e..cd489dddec0b1ab50947a523c467ce3825961549 100644 --- a/src/main/java/org/bukkit/entity/Entity.java +++ b/src/main/java/org/bukkit/entity/Entity.java @@ -164,6 +164,33 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent diff --git a/patches/api/0144-Expose-attack-cooldown-methods-for-Player.patch b/patches/api/0144-Expose-attack-cooldown-methods-for-Player.patch index 9194ef5da8..0f070b2fe4 100644 --- a/patches/api/0144-Expose-attack-cooldown-methods-for-Player.patch +++ b/patches/api/0144-Expose-attack-cooldown-methods-for-Player.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Expose attack cooldown methods for Player diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index c43cf2bdf24de153d16017e50d9b5723218e3d44..2904aa66e83d8cde9954c13d89f8337bbfc75137 100644 +index 2b0565eb6ff222bd51ad8d98622ac7d9e5314aac..fe0cfc15c6b8525ebf1419b23aaecb47313cb796 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -2556,6 +2556,26 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -2599,6 +2599,26 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * @param profile The new profile to use */ void setPlayerProfile(@NotNull com.destroystokyo.paper.profile.PlayerProfile profile); diff --git a/patches/api/0156-Add-sun-related-API.patch b/patches/api/0156-Add-sun-related-API.patch index 0efa61418f..1870ff232d 100644 --- a/patches/api/0156-Add-sun-related-API.patch +++ b/patches/api/0156-Add-sun-related-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add sun related API diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index 12c1731cd3e7138b30a509bf1c6de937b70cf27d..0ece998826c8e5d5a02a4a348172274b82bb2086 100644 +index 4031b2c3b7d6870f649e76f47a72e31a0f300c00..e91f6e4a9246a30ba7c0274ccbfc2fdf5a384c7a 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java -@@ -1796,6 +1796,16 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient +@@ -1807,6 +1807,16 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient */ public void setFullTime(long time); diff --git a/patches/api/0172-Fix-Spigot-annotation-mistakes.patch b/patches/api/0172-Fix-Spigot-annotation-mistakes.patch index ff605ade07..61017e80fd 100644 --- a/patches/api/0172-Fix-Spigot-annotation-mistakes.patch +++ b/patches/api/0172-Fix-Spigot-annotation-mistakes.patch @@ -243,10 +243,10 @@ index e455eb21abf121dc6ff10ff8a13dd06f67096a8f..bbc01e7c192ae6689c301670047ff114 return origin; } diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index 915c7fb937432f9cb33021d482eaae52b4807c67..cea7a1bd51418863b831334739310bc80a30d7e8 100644 +index e91f6e4a9246a30ba7c0274ccbfc2fdf5a384c7a..e863d8affe3fdc95c4100eb08ecf6d02b24a9e0f 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java -@@ -430,9 +430,8 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient +@@ -441,9 +441,8 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient * @param z Z-coordinate of the chunk * @return Whether the chunk was actually refreshed * @@ -257,7 +257,7 @@ index 915c7fb937432f9cb33021d482eaae52b4807c67..cea7a1bd51418863b831334739310bc8 public boolean refreshChunk(int x, int z); /** -@@ -2145,8 +2144,10 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient +@@ -2153,8 +2152,10 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient * @return The spawned {@link FallingBlock} instance * @throws IllegalArgumentException if {@link Location} or {@link * MaterialData} are null or {@link Material} of the {@link MaterialData} is not a block @@ -371,10 +371,10 @@ index 95c79c5fa0c4e30201f887da6467ce5f81c8a255..7f9c4d4b430a3f0276461346ff2621ba /** diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index 83c431dbaeceb5a28d0aaf3b8e5eae7462aeef40..dea53d5efe073fb3c516af9af6c650301b3239bd 100644 +index fe0cfc15c6b8525ebf1419b23aaecb47313cb796..dcb2a41cb29efe3630a071cb77f088b2f99e5ca0 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -1463,9 +1463,8 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1506,9 +1506,8 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * * @param plugin Plugin that wants to hide the entity * @param entity Entity to hide @@ -385,7 +385,7 @@ index 83c431dbaeceb5a28d0aaf3b8e5eae7462aeef40..dea53d5efe073fb3c516af9af6c65030 public void hideEntity(@NotNull Plugin plugin, @NotNull Entity entity); /** -@@ -1475,9 +1474,8 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1518,9 +1517,8 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * * @param plugin Plugin that wants to show the entity * @param entity Entity to show @@ -396,7 +396,7 @@ index 83c431dbaeceb5a28d0aaf3b8e5eae7462aeef40..dea53d5efe073fb3c516af9af6c65030 public void showEntity(@NotNull Plugin plugin, @NotNull Entity entity); /** -@@ -1486,9 +1484,8 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1529,9 +1527,8 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * @param entity Entity to check * @return True if the provided entity is not being hidden from this * player diff --git a/patches/api/0189-Add-Player-Client-Options-API.patch b/patches/api/0189-Add-Player-Client-Options-API.patch index ceefedd88c..90649d923a 100644 --- a/patches/api/0189-Add-Player-Client-Options-API.patch +++ b/patches/api/0189-Add-Player-Client-Options-API.patch @@ -229,10 +229,10 @@ index 0000000000000000000000000000000000000000..cf67dc7d465223710adbf2b798109f52 + } +} diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index 65ce6e016bcbb43711d6a1ae077330eafb8037e0..4ceabd992c26b0e2c9df9d0e10495322b3a92585 100644 +index dcb2a41cb29efe3630a071cb77f088b2f99e5ca0..b42cdfd64b22b6d66f6030fb6b59c4c781a56a43 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -2573,6 +2573,12 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -2616,6 +2616,12 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * Reset the cooldown counter to 0, effectively starting the cooldown period. */ void resetCooldown(); diff --git a/patches/api/0206-Brand-support.patch b/patches/api/0206-Brand-support.patch index a16a34be3c..37639b73b7 100644 --- a/patches/api/0206-Brand-support.patch +++ b/patches/api/0206-Brand-support.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Brand support diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index 4ceabd992c26b0e2c9df9d0e10495322b3a92585..40191fb054e90724e5f28b4078d41073c7bc5dc5 100644 +index b42cdfd64b22b6d66f6030fb6b59c4c781a56a43..b7afdf6c202b7d20b718bb5ef40b0d569c7c2a78 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -2705,6 +2705,16 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -2748,6 +2748,16 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM // Paper end } diff --git a/patches/api/0208-Add-BellRingEvent.patch b/patches/api/0208-Add-BellRingEvent.patch index 7862ad8c88..33c564bdae 100644 --- a/patches/api/0208-Add-BellRingEvent.patch +++ b/patches/api/0208-Add-BellRingEvent.patch @@ -8,62 +8,27 @@ village bell. Passes along the bell block and the player who rang it. diff --git a/src/main/java/io/papermc/paper/event/block/BellRingEvent.java b/src/main/java/io/papermc/paper/event/block/BellRingEvent.java new file mode 100644 -index 0000000000000000000000000000000000000000..881e545df51409e6101b4bb49f699655a744f13f +index 0000000000000000000000000000000000000000..548aeeab7d45173f36616a4a2f215f5838696089 --- /dev/null +++ b/src/main/java/io/papermc/paper/event/block/BellRingEvent.java -@@ -0,0 +1,55 @@ +@@ -0,0 +1,20 @@ +package io.papermc.paper.event.block; + +import org.bukkit.block.Block; ++import org.bukkit.block.BlockFace; +import org.bukkit.entity.Entity; +import org.bukkit.event.Cancellable; -+import org.bukkit.event.HandlerList; -+import org.bukkit.event.block.BlockEvent; -+import org.bukkit.potion.PotionEffect; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +/** + * Called when a bell is rung. ++ * @deprecated use {@link org.bukkit.event.block.BellRingEvent} + */ -+public class BellRingEvent extends BlockEvent implements Cancellable { -+ private static final HandlerList handlers = new HandlerList(); -+ private boolean cancelled; -+ private final Entity entity; ++@Deprecated ++public class BellRingEvent extends org.bukkit.event.block.BellRingEvent implements Cancellable { + -+ public BellRingEvent(@NotNull Block block, @Nullable Entity entity) { -+ super(block); -+ this.entity = entity; -+ } -+ -+ @Override -+ public boolean isCancelled() { -+ return cancelled; -+ } -+ -+ @Override -+ public void setCancelled(boolean cancelled) { -+ this.cancelled = cancelled; -+ } -+ -+ /** -+ * Gets the entity that rang the bell. -+ * -+ * @return the ringer or null if none -+ */ -+ @Nullable -+ public Entity getEntity() { -+ return entity; -+ } -+ -+ @NotNull -+ @Override -+ public HandlerList getHandlers() { -+ return handlers; -+ } -+ -+ @NotNull -+ public static HandlerList getHandlerList() { -+ return handlers; ++ public BellRingEvent(@NotNull Block block, @NotNull BlockFace direction, @Nullable Entity entity) { ++ super(block, direction, entity); + } +} diff --git a/patches/api/0218-Player-elytra-boost-API.patch b/patches/api/0218-Player-elytra-boost-API.patch index 7b84cee0e7..f9e803da15 100644 --- a/patches/api/0218-Player-elytra-boost-API.patch +++ b/patches/api/0218-Player-elytra-boost-API.patch @@ -8,7 +8,7 @@ diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/buk index edd90e8311c47e9bbd6e962395503c445455bc23..2a3eed2795d26dc104a143ede85428f15a7f839d 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -2579,6 +2579,19 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -2622,6 +2622,19 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM */ @NotNull <T> T getClientOption(@NotNull com.destroystokyo.paper.ClientOption<T> option); diff --git a/patches/api/0245-Add-sendOpLevel-API.patch b/patches/api/0245-Add-sendOpLevel-API.patch index 9449042cfd..8e3caf479f 100644 --- a/patches/api/0245-Add-sendOpLevel-API.patch +++ b/patches/api/0245-Add-sendOpLevel-API.patch @@ -8,7 +8,7 @@ diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/buk index 2a3eed2795d26dc104a143ede85428f15a7f839d..77fb32968d9d32096d93a760a8b08ded310d31b5 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -2592,6 +2592,17 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -2635,6 +2635,17 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM */ @Nullable Firework boostElytra(@NotNull ItemStack firework); diff --git a/patches/api/0273-More-World-API.patch b/patches/api/0273-More-World-API.patch index 8cdf7647b1..c8db8093cc 100644 --- a/patches/api/0273-More-World-API.patch +++ b/patches/api/0273-More-World-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] More World API diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index cebf905e78ea5fcc5f8208c62cf06a3fc52d169e..04c9329bb0309a1d3b0a1bbc755af7190a6ad0d4 100644 +index eb07c907e7dd62498cde6edc28a0a350578842c1..879b2c1a4019b24625e97715fc2f3c2137981424 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java -@@ -3731,6 +3731,114 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient +@@ -3742,6 +3742,114 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient @Nullable StructureSearchResult locateNearestStructure(@NotNull Location origin, @NotNull Structure structure, int radius, boolean findUnexplored); diff --git a/patches/api/0296-Add-BellRevealRaiderEvent.patch b/patches/api/0296-Add-BellRevealRaiderEvent.patch index 8b0ee3e5b4..b3b35c594f 100644 --- a/patches/api/0296-Add-BellRevealRaiderEvent.patch +++ b/patches/api/0296-Add-BellRevealRaiderEvent.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add BellRevealRaiderEvent diff --git a/src/main/java/io/papermc/paper/event/block/BellRevealRaiderEvent.java b/src/main/java/io/papermc/paper/event/block/BellRevealRaiderEvent.java new file mode 100644 -index 0000000000000000000000000000000000000000..03dae5be7dba8ab550d03f365c05af4ba73e4224 +index 0000000000000000000000000000000000000000..ac14cb18fe29391899f6adeb00beacb755a556c7 --- /dev/null +++ b/src/main/java/io/papermc/paper/event/block/BellRevealRaiderEvent.java -@@ -0,0 +1,58 @@ +@@ -0,0 +1,60 @@ +package io.papermc.paper.event.block; + +import org.bukkit.block.Block; @@ -22,7 +22,9 @@ index 0000000000000000000000000000000000000000..03dae5be7dba8ab550d03f365c05af4b + +/** + * Called when a {@link org.bukkit.entity.Raider} is revealed by a bell. ++ * @deprecated use {@link org.bukkit.event.block.BellResonateEvent} + */ ++@Deprecated +public class BellRevealRaiderEvent extends BlockEvent implements Cancellable { + private static final HandlerList handlers = new HandlerList(); + diff --git a/patches/api/0301-Missing-Entity-Behavior-API.patch b/patches/api/0301-Missing-Entity-Behavior-API.patch index a6b5eb90d3..9d575bf700 100644 --- a/patches/api/0301-Missing-Entity-Behavior-API.patch +++ b/patches/api/0301-Missing-Entity-Behavior-API.patch @@ -1176,55 +1176,6 @@ index 7cc1d9a966454af70b7c25735fe474fe3eb97eb4..ad2eaee347cd2864aef30d2af48c1be6 + void setConversionTime(int time, boolean broadcastEntityEvent); + // Paper stop - missing entity behaviour api - converting without entity event } -diff --git a/src/main/java/org/bukkit/entity/minecart/ExplosiveMinecart.java b/src/main/java/org/bukkit/entity/minecart/ExplosiveMinecart.java -index a4411daca0d8a770b0d15e08847b82df8a3ec27f..35b51136f5258abfae3395aeae4b3000e897c735 100644 ---- a/src/main/java/org/bukkit/entity/minecart/ExplosiveMinecart.java -+++ b/src/main/java/org/bukkit/entity/minecart/ExplosiveMinecart.java -@@ -6,4 +6,44 @@ import org.bukkit.entity.Minecart; - * Represents a Minecart with TNT inside it that can explode when triggered. - */ - public interface ExplosiveMinecart extends Minecart { -+ // Paper start - Entity API -+ /** -+ * Set the number of ticks until the Minecart explodes after being primed. -+ * -+ * @param fuseTicks fuse ticks or -1 if the fuse isn't primed -+ */ -+ void setFuseTicks(int fuseTicks); -+ -+ /** -+ * Retrieve the number of ticks until the explosive Minecart explodes. -+ * -+ * @return number of ticks or -1 if the fuse isn't primed -+ */ -+ int getFuseTicks(); -+ -+ /** -+ * Checks whether this explosive Minecart is ignited (its fuse is primed). -+ * -+ * @return whether the Minecart is ignited -+ */ -+ boolean isIgnited(); -+ -+ /** -+ * Ignites this explosive Minecart, beginning its fuse. -+ */ -+ void ignite(); -+ -+ /** -+ * Immediately explodes the Minecart. -+ * Power will depend on the Minecart's horizontal speed. -+ */ -+ void explode(); -+ -+ /** -+ * Immediately explodes the Minecart with the specified power. -+ * -+ * @param power explosion power -+ */ -+ void explode(double power); -+ // Paper end - Entity API - } diff --git a/src/main/java/org/bukkit/entity/minecart/HopperMinecart.java b/src/main/java/org/bukkit/entity/minecart/HopperMinecart.java index db69687a7ad4b18d17ab1677cae5d8dd4dcd3678..304b05aeaea5febf493fc40d433a23acb384b4f0 100644 --- a/src/main/java/org/bukkit/entity/minecart/HopperMinecart.java diff --git a/patches/api/0317-Add-methods-to-find-targets-for-lightning-strikes.patch b/patches/api/0317-Add-methods-to-find-targets-for-lightning-strikes.patch index b2594d5902..dbbe085c01 100644 --- a/patches/api/0317-Add-methods-to-find-targets-for-lightning-strikes.patch +++ b/patches/api/0317-Add-methods-to-find-targets-for-lightning-strikes.patch @@ -8,7 +8,7 @@ diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/Worl index 04c9329bb0309a1d3b0a1bbc755af7190a6ad0d4..792817079f03d082141660ab2a51c9bf56144f60 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java -@@ -749,6 +749,37 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient +@@ -760,6 +760,37 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient @NotNull public LightningStrike strikeLightningEffect(@NotNull Location loc); diff --git a/patches/api/0329-Add-player-health-update-API.patch b/patches/api/0329-Add-player-health-update-API.patch index c81c3a463d..c3678e3534 100644 --- a/patches/api/0329-Add-player-health-update-API.patch +++ b/patches/api/0329-Add-player-health-update-API.patch @@ -8,7 +8,7 @@ diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/buk index 11c5cfa3e35395c2967dc1e0864e0b953fda30c6..1be287747e9aad2abf3ec5cf8e9655c252bb681d 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -1980,6 +1980,31 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -2023,6 +2023,31 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM */ public double getHealthScale(); diff --git a/patches/api/0344-Multi-Block-Change-API.patch b/patches/api/0344-Multi-Block-Change-API.patch index 5436a8526d..d9a19fd8d1 100644 --- a/patches/api/0344-Multi-Block-Change-API.patch +++ b/patches/api/0344-Multi-Block-Change-API.patch @@ -17,22 +17,22 @@ index 1be287747e9aad2abf3ec5cf8e9655c252bb681d..4532e4955d5c42fe27dc9a3702d83f82 + * Send multiple block changes. This fakes a multi block change packet for each + * chunk section that a block change occurs. This will not actually change the world in any way. + * -+ * @param blockChanges A map of the locations you want to change to their new block data ++ * @param blockChanges A map of the positions you want to change to their new block data + */ -+ public default void sendMultiBlockChange(@NotNull java.util.Map<Location, BlockData> blockChanges) { -+ sendMultiBlockChange(blockChanges, false); ++ default void sendMultiBlockChange(@NotNull Map<? extends io.papermc.paper.math.Position, BlockData> blockChanges) { ++ this.sendMultiBlockChange(blockChanges, false); + } + + /** + * Send multiple block changes. This fakes a multi block change packet for each + * chunk section that a block change occurs. This will not actually change the world in any way. + * -+ * @param blockChanges A map of the locations you want to change to their new block data ++ * @param blockChanges A map of the positions you want to change to their new block data + * @param suppressLightUpdates Whether to suppress light updates or not + */ -+ public void sendMultiBlockChange(@NotNull java.util.Map<Location, BlockData> blockChanges, boolean suppressLightUpdates); ++ void sendMultiBlockChange(@NotNull Map<? extends io.papermc.paper.math.Position, BlockData> blockChanges, boolean suppressLightUpdates); + // Paper end + /** - * Send an equipment change for the target entity. This will not - * actually change the entity's equipment in any way. + * Send block damage. This fakes block break progress at a certain location + * sourced by the provided entity. This will not actually change the block's diff --git a/patches/api/0350-Implement-regenerateChunk.patch b/patches/api/0350-Implement-regenerateChunk.patch index fec8e98fd9..f2d5bc08fb 100644 --- a/patches/api/0350-Implement-regenerateChunk.patch +++ b/patches/api/0350-Implement-regenerateChunk.patch @@ -8,7 +8,7 @@ diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/Worl index 792817079f03d082141660ab2a51c9bf56144f60..6716a1185e733f3ddf56b295f3153938f57d4229 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java -@@ -498,8 +498,8 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient +@@ -509,8 +509,8 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient * @return Whether the chunk was actually regenerated * * @deprecated regenerating a single chunk is not likely to produce the same diff --git a/patches/api/0372-More-Teleport-API.patch b/patches/api/0372-More-Teleport-API.patch index 83c5752055..6478c08a8a 100644 --- a/patches/api/0372-More-Teleport-API.patch +++ b/patches/api/0372-More-Teleport-API.patch @@ -168,7 +168,7 @@ diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/buk index 4532e4955d5c42fe27dc9a3702d83f825c6074cc..53c2ed8d5b2ddd787ee5b3d9035278dca6727a7a 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -2793,6 +2793,49 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -2836,6 +2836,49 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM String getClientBrandName(); // Paper end diff --git a/patches/api/0374-Custom-Chat-Completion-Suggestions-API.patch b/patches/api/0374-Custom-Chat-Completion-Suggestions-API.patch index 7f667db718..b6d3f04965 100644 --- a/patches/api/0374-Custom-Chat-Completion-Suggestions-API.patch +++ b/patches/api/0374-Custom-Chat-Completion-Suggestions-API.patch @@ -8,7 +8,7 @@ diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/buk index 53c2ed8d5b2ddd787ee5b3d9035278dca6727a7a..a92a36629c926e1fdf9b3e5d18d77a4b24b80010 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -2657,6 +2657,25 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -2700,6 +2700,25 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * @throws IllegalArgumentException If the level is negative or greater than {@code 4} (i.e. not within {@code [0, 4]}). */ void sendOpLevel(byte level); diff --git a/patches/api/0376-Block-Ticking-API.patch b/patches/api/0376-Block-Ticking-API.patch index 8c0df71065..2c34dc2453 100644 --- a/patches/api/0376-Block-Ticking-API.patch +++ b/patches/api/0376-Block-Ticking-API.patch @@ -34,10 +34,10 @@ diff --git a/src/main/java/org/bukkit/block/data/BlockData.java b/src/main/java/ index 0d5ef61e100d972a5cf308b23d5e8f2fdbad5718..e65b7d1cf7b0655a3f31949f94f2f4a12e662c94 100644 --- a/src/main/java/org/bukkit/block/data/BlockData.java +++ b/src/main/java/org/bukkit/block/data/BlockData.java -@@ -215,4 +215,14 @@ public interface BlockData extends Cloneable { +@@ -235,4 +235,14 @@ public interface BlockData extends Cloneable { + * @param mirror the mirror */ - @NotNull - Material getPlacementMaterial(); + void mirror(@NotNull Mirror mirror); + + // Paper start - Tick API + /** diff --git a/patches/api/0378-Add-custom-destroyerIdentity-to-sendBlockDamage.patch b/patches/api/0378-Add-custom-destroyerIdentity-to-sendBlockDamage.patch deleted file mode 100644 index 3c12709b33..0000000000 --- a/patches/api/0378-Add-custom-destroyerIdentity-to-sendBlockDamage.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: TheFruxz <[email protected]> -Date: Sat, 2 Apr 2022 13:03:39 +0200 -Subject: [PATCH] Add custom destroyerIdentity to sendBlockDamage - - -diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index a92a36629c926e1fdf9b3e5d18d77a4b24b80010..08f6ee441a20217afd3863b3b39638b2f83aa994 100644 ---- a/src/main/java/org/bukkit/entity/Player.java -+++ b/src/main/java/org/bukkit/entity/Player.java -@@ -638,7 +638,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM - /** - * Send block damage. This fakes block break progress for a user at a - * certain location. This will not actually change the block's break -- * progress in any way. -+ * progress in any way. The destroying entity will be this player. - * - * @param loc the location of the damaged block - * @param progress the progress from 0.0 - 1.0 where 0 is no damage and -@@ -647,6 +647,18 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM - public void sendBlockDamage(@NotNull Location loc, float progress); - - // Paper start -+ -+ /** -+ * Send block damage. This fakes block break progress for a user at a certain location. -+ * This will not actually change the block's break progress in any way. -+ * The destroying entity is defined via the destroyerIdentity parameter. -+ * -+ * @param loc the location of the damaged block -+ * @param progress the progress from 0.0 - 1.0 where 0 is no damage and 1.0 is the most damaged -+ * @param destroyerIdentity the entity id of the destroyer -+ */ -+ public void sendBlockDamage(@NotNull Location loc, float progress, int destroyerIdentity); -+ - /** - * Send multiple block changes. This fakes a multi block change packet for each - * chunk section that a block change occurs. This will not actually change the world in any way. diff --git a/patches/api/0379-Also-load-resources-from-LibraryLoader.patch b/patches/api/0378-Also-load-resources-from-LibraryLoader.patch index 6e88f5bd00..6e88f5bd00 100644 --- a/patches/api/0379-Also-load-resources-from-LibraryLoader.patch +++ b/patches/api/0378-Also-load-resources-from-LibraryLoader.patch diff --git a/patches/api/0380-Added-byte-array-serialization-deserialization-for-P.patch b/patches/api/0379-Added-byte-array-serialization-deserialization-for-P.patch index 161c82afe3..161c82afe3 100644 --- a/patches/api/0380-Added-byte-array-serialization-deserialization-for-P.patch +++ b/patches/api/0379-Added-byte-array-serialization-deserialization-for-P.patch diff --git a/patches/api/0381-Add-a-consumer-parameter-to-ProjectileSource-launchP.patch b/patches/api/0380-Add-a-consumer-parameter-to-ProjectileSource-launchP.patch index bec7a5d015..bec7a5d015 100644 --- a/patches/api/0381-Add-a-consumer-parameter-to-ProjectileSource-launchP.patch +++ b/patches/api/0380-Add-a-consumer-parameter-to-ProjectileSource-launchP.patch diff --git a/patches/api/0382-Expose-codepoint-limit-in-YamlConfigOptions-and-incr.patch b/patches/api/0381-Expose-codepoint-limit-in-YamlConfigOptions-and-incr.patch index 52d54bf98e..52d54bf98e 100644 --- a/patches/api/0382-Expose-codepoint-limit-in-YamlConfigOptions-and-incr.patch +++ b/patches/api/0381-Expose-codepoint-limit-in-YamlConfigOptions-and-incr.patch diff --git a/patches/api/0383-Add-getDrops-to-BlockState.patch b/patches/api/0382-Add-getDrops-to-BlockState.patch index 48f3a99f04..48f3a99f04 100644 --- a/patches/api/0383-Add-getDrops-to-BlockState.patch +++ b/patches/api/0382-Add-getDrops-to-BlockState.patch diff --git a/patches/api/0384-Add-PlayerInventorySlotChangeEvent.patch b/patches/api/0383-Add-PlayerInventorySlotChangeEvent.patch index f094f9dbc9..f094f9dbc9 100644 --- a/patches/api/0384-Add-PlayerInventorySlotChangeEvent.patch +++ b/patches/api/0383-Add-PlayerInventorySlotChangeEvent.patch diff --git a/patches/api/0385-Elder-Guardian-appearance-API.patch b/patches/api/0384-Elder-Guardian-appearance-API.patch index 35954e7a43..7f0c7c031c 100644 --- a/patches/api/0385-Elder-Guardian-appearance-API.patch +++ b/patches/api/0384-Elder-Guardian-appearance-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Elder Guardian appearance API diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index 08f6ee441a20217afd3863b3b39638b2f83aa994..de0d25b489ca4b35728c2def5c1734a3b0135e6c 100644 +index 3f47c8e1ca6da80b84f666a9516e79ec47cdc331..63c4c2d96a3c508a92a6404911de47b2cc83dc45 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -2867,6 +2867,24 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -2898,6 +2898,24 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM void lookAt(@NotNull org.bukkit.entity.Entity entity, @NotNull io.papermc.paper.entity.LookAnchor playerAnchor, @NotNull io.papermc.paper.entity.LookAnchor entityAnchor); // Paper end - Teleport API diff --git a/patches/api/0386-Allow-changing-bed-s-occupied-property.patch b/patches/api/0385-Allow-changing-bed-s-occupied-property.patch index 8dfafd6d33..8dfafd6d33 100644 --- a/patches/api/0386-Allow-changing-bed-s-occupied-property.patch +++ b/patches/api/0385-Allow-changing-bed-s-occupied-property.patch diff --git a/patches/api/0387-Add-EquipmentSlot-convenience-methods.patch b/patches/api/0386-Add-EquipmentSlot-convenience-methods.patch index 0ef6b4c9b0..0ef6b4c9b0 100644 --- a/patches/api/0387-Add-EquipmentSlot-convenience-methods.patch +++ b/patches/api/0386-Add-EquipmentSlot-convenience-methods.patch diff --git a/patches/api/0388-Add-LivingEntity-swingHand-EquipmentSlot-convenience.patch b/patches/api/0387-Add-LivingEntity-swingHand-EquipmentSlot-convenience.patch index 1a53a5fcc5..1a53a5fcc5 100644 --- a/patches/api/0388-Add-LivingEntity-swingHand-EquipmentSlot-convenience.patch +++ b/patches/api/0387-Add-LivingEntity-swingHand-EquipmentSlot-convenience.patch diff --git a/patches/api/0389-Add-entity-knockback-API.patch b/patches/api/0388-Add-entity-knockback-API.patch index f53aa9c293..f53aa9c293 100644 --- a/patches/api/0389-Add-entity-knockback-API.patch +++ b/patches/api/0388-Add-entity-knockback-API.patch diff --git a/patches/api/0390-Added-EntityToggleSitEvent.patch b/patches/api/0389-Added-EntityToggleSitEvent.patch index af2476123b..af2476123b 100644 --- a/patches/api/0390-Added-EntityToggleSitEvent.patch +++ b/patches/api/0389-Added-EntityToggleSitEvent.patch diff --git a/patches/api/0391-Add-Moving-Piston-API.patch b/patches/api/0390-Add-Moving-Piston-API.patch index 8f889f1e3d..8f889f1e3d 100644 --- a/patches/api/0391-Add-Moving-Piston-API.patch +++ b/patches/api/0390-Add-Moving-Piston-API.patch diff --git a/patches/api/0392-Add-PrePlayerAttackEntityEvent.patch b/patches/api/0391-Add-PrePlayerAttackEntityEvent.patch index 507b313e56..507b313e56 100644 --- a/patches/api/0392-Add-PrePlayerAttackEntityEvent.patch +++ b/patches/api/0391-Add-PrePlayerAttackEntityEvent.patch diff --git a/patches/api/0393-Add-Player-Warden-Warning-API.patch b/patches/api/0392-Add-Player-Warden-Warning-API.patch index 7483522235..b8295a0179 100644 --- a/patches/api/0393-Add-Player-Warden-Warning-API.patch +++ b/patches/api/0392-Add-Player-Warden-Warning-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add Player Warden Warning API diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index de0d25b489ca4b35728c2def5c1734a3b0135e6c..62122a36ad4c5d9967d9f927306cbaec18f340ed 100644 +index 63c4c2d96a3c508a92a6404911de47b2cc83dc45..9e2116c121704602c2702414db39b5d1bd559c3d 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -2883,6 +2883,59 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -2914,6 +2914,59 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * @param silent whether sound should be silenced */ void showElderGuardian(boolean silent); diff --git a/patches/api/0394-More-vanilla-friendly-methods-to-update-trades.patch b/patches/api/0393-More-vanilla-friendly-methods-to-update-trades.patch index f13fdb5601..f13fdb5601 100644 --- a/patches/api/0394-More-vanilla-friendly-methods-to-update-trades.patch +++ b/patches/api/0393-More-vanilla-friendly-methods-to-update-trades.patch diff --git a/patches/api/0395-Add-paper-dumplisteners-command.patch b/patches/api/0394-Add-paper-dumplisteners-command.patch index 1cb3b7ce26..1cb3b7ce26 100644 --- a/patches/api/0395-Add-paper-dumplisteners-command.patch +++ b/patches/api/0394-Add-paper-dumplisteners-command.patch diff --git a/patches/api/0396-ItemStack-damage-API.patch b/patches/api/0395-ItemStack-damage-API.patch index 12c1e68439..12c1e68439 100644 --- a/patches/api/0396-ItemStack-damage-API.patch +++ b/patches/api/0395-ItemStack-damage-API.patch diff --git a/patches/api/0397-Add-Tick-TemporalUnit.patch b/patches/api/0396-Add-Tick-TemporalUnit.patch index 96c1dddab8..96c1dddab8 100644 --- a/patches/api/0397-Add-Tick-TemporalUnit.patch +++ b/patches/api/0396-Add-Tick-TemporalUnit.patch diff --git a/patches/api/0398-Friction-API.patch b/patches/api/0397-Friction-API.patch index f4d3031506..f4d3031506 100644 --- a/patches/api/0398-Friction-API.patch +++ b/patches/api/0397-Friction-API.patch diff --git a/patches/api/0399-Player-Entity-Tracking-Events.patch b/patches/api/0398-Player-Entity-Tracking-Events.patch index a824ae278f..a824ae278f 100644 --- a/patches/api/0399-Player-Entity-Tracking-Events.patch +++ b/patches/api/0398-Player-Entity-Tracking-Events.patch diff --git a/patches/api/0400-Add-missing-Fluid-type.patch b/patches/api/0399-Add-missing-Fluid-type.patch index c260bf8497..c260bf8497 100644 --- a/patches/api/0400-Add-missing-Fluid-type.patch +++ b/patches/api/0399-Add-missing-Fluid-type.patch diff --git a/patches/api/0401-Mark-experimental-api-as-such.patch b/patches/api/0400-Mark-experimental-api-as-such.patch index 990d5b1570..990d5b1570 100644 --- a/patches/api/0401-Mark-experimental-api-as-such.patch +++ b/patches/api/0400-Mark-experimental-api-as-such.patch diff --git a/patches/api/0402-fix-Instruments.patch b/patches/api/0401-fix-Instruments.patch index fd18358b87..a1843d1f0a 100644 --- a/patches/api/0402-fix-Instruments.patch +++ b/patches/api/0401-fix-Instruments.patch @@ -105,7 +105,7 @@ index de976be7132d05506fde7a839cac3954b0dd8da4..c449b4a03e43752b98e008b69d2a956c public static Instrument getByType(final byte type) { return BY_DATA.get(type); diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index 62122a36ad4c5d9967d9f927306cbaec18f340ed..ac0312ccdfeb1222c18c398dd42a77b4727a80ea 100644 +index 9e2116c121704602c2702414db39b5d1bd559c3d..c90cd70bc2bffdd92590f2907bb7aae70cbb7955 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java @@ -390,9 +390,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM diff --git a/patches/api/0403-Add-BlockLockCheckEvent.patch b/patches/api/0402-Add-BlockLockCheckEvent.patch index 55a23307b1..55a23307b1 100644 --- a/patches/api/0403-Add-BlockLockCheckEvent.patch +++ b/patches/api/0402-Add-BlockLockCheckEvent.patch diff --git a/patches/api/0404-Add-Sneaking-API-for-Entities.patch b/patches/api/0403-Add-Sneaking-API-for-Entities.patch index 1ce4eb525c..ee7963748c 100644 --- a/patches/api/0404-Add-Sneaking-API-for-Entities.patch +++ b/patches/api/0403-Add-Sneaking-API-for-Entities.patch @@ -35,7 +35,7 @@ index e0e4300d24f6b53f35c450bbae18511a6ce0b05e..8c58018b155c52a7b2a139f784abceb6 * Get the category of spawn to which this entity belongs. * diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index ac0312ccdfeb1222c18c398dd42a77b4727a80ea..c19e72ec5fcba00948ad039bec7068c4545cc51d 100644 +index c90cd70bc2bffdd92590f2907bb7aae70cbb7955..70bf345cdc03849146efccf7d52269cc349e56d0 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java @@ -293,6 +293,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM diff --git a/patches/api/0405-Improve-PortalEvents.patch b/patches/api/0404-Improve-PortalEvents.patch index f7f53b19fc..f7f53b19fc 100644 --- a/patches/api/0405-Improve-PortalEvents.patch +++ b/patches/api/0404-Improve-PortalEvents.patch diff --git a/patches/api/0406-Add-exploded-block-state-to-BlockExplodeEvent.patch b/patches/api/0405-Add-exploded-block-state-to-BlockExplodeEvent.patch index bdc2de6d23..bdc2de6d23 100644 --- a/patches/api/0406-Add-exploded-block-state-to-BlockExplodeEvent.patch +++ b/patches/api/0405-Add-exploded-block-state-to-BlockExplodeEvent.patch diff --git a/patches/api/0407-Flying-Fall-Damage-API.patch b/patches/api/0406-Flying-Fall-Damage-API.patch index 578428ede5..fa43646ae9 100644 --- a/patches/api/0407-Flying-Fall-Damage-API.patch +++ b/patches/api/0406-Flying-Fall-Damage-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Flying Fall Damage API diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index c19e72ec5fcba00948ad039bec7068c4545cc51d..0a75196050beff92948290b3e8d4b7d230c5700b 100644 +index 70bf345cdc03849146efccf7d52269cc349e56d0..35f36e9ffa4ca2a8ce51ca905c575884dbb955a3 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -1454,6 +1454,23 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1485,6 +1485,23 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM */ public void setAllowFlight(boolean flight); diff --git a/patches/api/0408-Expose-pre-collision-moving-velocity-to-VehicleBlock.patch b/patches/api/0407-Expose-pre-collision-moving-velocity-to-VehicleBlock.patch index 25fa280b26..25fa280b26 100644 --- a/patches/api/0408-Expose-pre-collision-moving-velocity-to-VehicleBlock.patch +++ b/patches/api/0407-Expose-pre-collision-moving-velocity-to-VehicleBlock.patch diff --git a/patches/api/0409-Replace-ItemFlag.HIDE_POTION_EFFECTS.patch b/patches/api/0408-Replace-ItemFlag.HIDE_POTION_EFFECTS.patch index 0372472444..0372472444 100644 --- a/patches/api/0409-Replace-ItemFlag.HIDE_POTION_EFFECTS.patch +++ b/patches/api/0408-Replace-ItemFlag.HIDE_POTION_EFFECTS.patch diff --git a/patches/api/0410-Win-Screen-API.patch b/patches/api/0409-Win-Screen-API.patch index 38941768a9..6a42e4ef9a 100644 --- a/patches/api/0410-Win-Screen-API.patch +++ b/patches/api/0409-Win-Screen-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Win Screen API diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index 0a75196050beff92948290b3e8d4b7d230c5700b..8fe11fce80c3b29164b79ece8dc9ed8da6fc1790 100644 +index 35f36e9ffa4ca2a8ce51ca905c575884dbb955a3..b3c488b2c632386f3f3e7b16ee0549350fffa681 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -854,6 +854,47 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -875,6 +875,47 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM */ public void sendMap(@NotNull MapView map); diff --git a/patches/api/0411-Add-Entity-Body-Yaw-API.patch b/patches/api/0410-Add-Entity-Body-Yaw-API.patch index 1d6aba7a15..1d6aba7a15 100644 --- a/patches/api/0411-Add-Entity-Body-Yaw-API.patch +++ b/patches/api/0410-Add-Entity-Body-Yaw-API.patch diff --git a/patches/api/0412-Fix-HandlerList-for-InventoryBlockStartEvent-subclas.patch b/patches/api/0411-Fix-HandlerList-for-InventoryBlockStartEvent-subclas.patch index 98799cd97d..98799cd97d 100644 --- a/patches/api/0412-Fix-HandlerList-for-InventoryBlockStartEvent-subclas.patch +++ b/patches/api/0411-Fix-HandlerList-for-InventoryBlockStartEvent-subclas.patch diff --git a/patches/api/0413-Add-EntityFertilizeEggEvent.patch b/patches/api/0412-Add-EntityFertilizeEggEvent.patch index f9604adba0..f9604adba0 100644 --- a/patches/api/0413-Add-EntityFertilizeEggEvent.patch +++ b/patches/api/0412-Add-EntityFertilizeEggEvent.patch diff --git a/patches/api/0414-Add-CompostItemEvent-and-EntityCompostItemEvent.patch b/patches/api/0413-Add-CompostItemEvent-and-EntityCompostItemEvent.patch index f720032bf2..f720032bf2 100644 --- a/patches/api/0414-Add-CompostItemEvent-and-EntityCompostItemEvent.patch +++ b/patches/api/0413-Add-CompostItemEvent-and-EntityCompostItemEvent.patch diff --git a/patches/api/0415-Add-Shearable-API.patch b/patches/api/0414-Add-Shearable-API.patch index 96049cfd38..96049cfd38 100644 --- a/patches/api/0415-Add-Shearable-API.patch +++ b/patches/api/0414-Add-Shearable-API.patch diff --git a/patches/api/0416-Fix-SpawnEggMeta-get-setSpawnedType.patch b/patches/api/0415-Fix-SpawnEggMeta-get-setSpawnedType.patch index 4014e17083..4014e17083 100644 --- a/patches/api/0416-Fix-SpawnEggMeta-get-setSpawnedType.patch +++ b/patches/api/0415-Fix-SpawnEggMeta-get-setSpawnedType.patch diff --git a/patches/server/0001-Setup-Gradle-project.patch b/patches/server/0001-Setup-Gradle-project.patch index fb2a4f4ef6..329ccf4e30 100644 --- a/patches/server/0001-Setup-Gradle-project.patch +++ b/patches/server/0001-Setup-Gradle-project.patch @@ -171,10 +171,10 @@ index 0000000000000000000000000000000000000000..e090175d2fbe8eba664500feafc29c05 +} diff --git a/pom.xml b/pom.xml deleted file mode 100644 -index 9c1719f6931450637a93f64fd2b43b2cd00929a0..0000000000000000000000000000000000000000 +index 67ae7c25ee4e007e1fdfb3ac37687e1bd8ab58ca..0000000000000000000000000000000000000000 --- a/pom.xml +++ /dev/null -@@ -1,585 +0,0 @@ +@@ -1,587 +0,0 @@ -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> @@ -505,7 +505,7 @@ index 9c1719f6931450637a93f64fd2b43b2cd00929a0..00000000000000000000000000000000 - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-jar-plugin</artifactId> -- <version>3.2.2</version> +- <version>3.3.0</version> - <configuration> - <archive> - <manifest> @@ -623,7 +623,7 @@ index 9c1719f6931450637a93f64fd2b43b2cd00929a0..00000000000000000000000000000000 - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-assembly-plugin</artifactId> -- <version>3.3.0</version> +- <version>3.5.0</version> - <executions> - <execution> - <phase>package</phase> @@ -650,23 +650,25 @@ index 9c1719f6931450637a93f64fd2b43b2cd00929a0..00000000000000000000000000000000 - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> -- <version>3.10.1</version> +- <version>3.11.0</version> - <configuration> - <!-- we use the Eclipse compiler as it doesn't need a JDK --> - <compilerId>eclipse</compilerId> +- <!-- default changed with version 3.11.0 --> +- <showWarnings>false</showWarnings> - </configuration> - <dependencies> - <dependency> - <groupId>org.codehaus.plexus</groupId> - <artifactId>plexus-compiler-eclipse</artifactId> -- <version>2.12.0</version> +- <version>2.13.0</version> - </dependency> - </dependencies> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> -- <version>2.12.4</version> +- <version>3.0.0</version> - <configuration> - <workingDirectory>${basedir}/target/test-server</workingDirectory> - <excludes> @@ -695,7 +697,7 @@ index 9c1719f6931450637a93f64fd2b43b2cd00929a0..00000000000000000000000000000000 - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-checkstyle-plugin</artifactId> -- <version>3.1.2</version> +- <version>3.2.1</version> - <executions> - <execution> - <phase>test-compile</phase> diff --git a/patches/server/0009-MC-Utils.patch b/patches/server/0009-MC-Utils.patch index 257ff1be9e..32d5078e79 100644 --- a/patches/server/0009-MC-Utils.patch +++ b/patches/server/0009-MC-Utils.patch @@ -7059,7 +7059,7 @@ index db6a64ae4437b76c39e7ddb02adbea27c95fde78..3fdbb777d4722596cc4df79b2d4d7b9c this.levelHeightAccessor = heightLimitView; this.sections = new LevelChunkSection[heightLimitView.getSectionsCount()]; 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 802a927de07b5ebcdd41bf3dc75c53eca582f1df..0307083079c0a257ecb82b8cb4fb8f91af3816bc 100644 +index 876d52861880d405bfc718a38113cd2bdfb1d447..bedafac1c29f4b2a820822b01814b871f88528d4 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java @@ -25,6 +25,7 @@ import net.minecraft.nbt.CompoundTag; @@ -7070,8 +7070,8 @@ index 802a927de07b5ebcdd41bf3dc75c53eca582f1df..0307083079c0a257ecb82b8cb4fb8f91 import net.minecraft.server.level.ServerLevel; import net.minecraft.util.profiling.ProfilerFiller; import net.minecraft.world.entity.Entity; -@@ -124,6 +125,109 @@ public class LevelChunk extends ChunkAccess { - +@@ -117,6 +118,109 @@ public class LevelChunk extends ChunkAccess { + public boolean needsDecoration; // CraftBukkit end + // Paper start @@ -7180,7 +7180,7 @@ index 802a927de07b5ebcdd41bf3dc75c53eca582f1df..0307083079c0a257ecb82b8cb4fb8f91 public LevelChunk(ServerLevel world, ProtoChunk protoChunk, @Nullable LevelChunk.PostLoadProcessor entityLoader) { this(world, protoChunk.getPos(), protoChunk.getUpgradeData(), protoChunk.unpackBlockTicks(), protoChunk.unpackFluidTicks(), protoChunk.getInhabitedTime(), protoChunk.getSections(), entityLoader, protoChunk.getBlendingData()); Iterator iterator = protoChunk.getBlockEntities().values().iterator(); -@@ -233,6 +337,18 @@ public class LevelChunk extends ChunkAccess { +@@ -226,6 +330,18 @@ public class LevelChunk extends ChunkAccess { } } @@ -7199,7 +7199,7 @@ index 802a927de07b5ebcdd41bf3dc75c53eca582f1df..0307083079c0a257ecb82b8cb4fb8f91 @Override public FluidState getFluidState(BlockPos pos) { return this.getFluidState(pos.getX(), pos.getY(), pos.getZ()); -@@ -354,6 +470,7 @@ public class LevelChunk extends ChunkAccess { +@@ -347,6 +463,7 @@ public class LevelChunk extends ChunkAccess { return this.getBlockEntity(pos, LevelChunk.EntityCreationType.CHECK); } @@ -7207,7 +7207,7 @@ index 802a927de07b5ebcdd41bf3dc75c53eca582f1df..0307083079c0a257ecb82b8cb4fb8f91 @Nullable public BlockEntity getBlockEntity(BlockPos pos, LevelChunk.EntityCreationType creationType) { // CraftBukkit start -@@ -535,7 +652,25 @@ public class LevelChunk extends ChunkAccess { +@@ -528,7 +645,25 @@ public class LevelChunk extends ChunkAccess { // CraftBukkit start public void loadCallback() { @@ -7233,7 +7233,7 @@ index 802a927de07b5ebcdd41bf3dc75c53eca582f1df..0307083079c0a257ecb82b8cb4fb8f91 if (server != null) { /* * If it's a new world, the first few chunks are generated inside -@@ -574,6 +709,22 @@ public class LevelChunk extends ChunkAccess { +@@ -569,6 +704,22 @@ 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(); @@ -7303,21 +7303,21 @@ index f66369ddaeab5c5ac643c0979dac3ed21337ff71..038abf2ac104ceecaab11b10d466ea69 return false; } else { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index b685b6064a32884e5617f2debb7ea10159d9ce0d..3b9e42adb657d0feb99de4b55dc0c628e9cd5afd 100644 +index 5e36e5af2f6e5a705f36105d4ffed8d142886f6f..9a033c136062c43e6db8107fdff059a6807aed02 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -233,8 +233,8 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -245,8 +245,8 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public Chunk[] getLoadedChunks() { - Long2ObjectLinkedOpenHashMap<ChunkHolder> chunks = this.world.getChunkSource().chunkMap.visibleChunkMap; -- return chunks.values().stream().map(ChunkHolder::getFullChunkNow).filter(Objects::nonNull).map(net.minecraft.world.level.chunk.LevelChunk::getBukkitChunk).toArray(Chunk[]::new); +- return chunks.values().stream().map(ChunkHolder::getFullChunkNow).filter(Objects::nonNull).map(CraftChunk::new).toArray(Chunk[]::new); + List<ChunkHolder> chunks = io.papermc.paper.chunk.system.ChunkSystem.getVisibleChunkHolders(this.world); // Paper -+ return chunks.stream().map(ChunkHolder::getFullChunkNow).filter(Objects::nonNull).map(net.minecraft.world.level.chunk.LevelChunk::getBukkitChunk).toArray(Chunk[]::new); ++ return chunks.stream().map(ChunkHolder::getFullChunkNow).filter(Objects::nonNull).map(CraftChunk::new).toArray(Chunk[]::new); } @Override -@@ -309,7 +309,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -321,7 +321,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public boolean refreshChunk(int x, int z) { @@ -7326,7 +7326,7 @@ index b685b6064a32884e5617f2debb7ea10159d9ce0d..3b9e42adb657d0feb99de4b55dc0c628 if (playerChunk == null) return false; playerChunk.getTickingChunkFuture().thenAccept(either -> { -@@ -1959,4 +1959,32 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1970,4 +1970,32 @@ public class CraftWorld extends CraftRegionAccessor implements World { return this.spigot; } // Spigot end @@ -7335,7 +7335,7 @@ index b685b6064a32884e5617f2debb7ea10159d9ce0d..3b9e42adb657d0feb99de4b55dc0c628 + if (Bukkit.isPrimaryThread()) { + net.minecraft.world.level.chunk.LevelChunk immediate = this.world.getChunkSource().getChunkAtIfLoadedImmediately(x, z); + if (immediate != null) { -+ return java.util.concurrent.CompletableFuture.completedFuture(immediate.getBukkitChunk()); ++ return java.util.concurrent.CompletableFuture.completedFuture(new CraftChunk(immediate)); + } + } + @@ -7351,7 +7351,7 @@ index b685b6064a32884e5617f2debb7ea10159d9ce0d..3b9e42adb657d0feb99de4b55dc0c628 + io.papermc.paper.chunk.system.ChunkSystem.scheduleChunkLoad(this.getHandle(), x, z, gen, ChunkStatus.FULL, true, priority, (c) -> { + net.minecraft.server.MinecraftServer.getServer().scheduleOnMain(() -> { + net.minecraft.world.level.chunk.LevelChunk chunk = (net.minecraft.world.level.chunk.LevelChunk)c; -+ ret.complete(chunk == null ? null : chunk.getBukkitChunk()); ++ ret.complete(chunk == null ? null : new CraftChunk(chunk)); + }); + }); + diff --git a/patches/server/0010-Adventure.patch b/patches/server/0010-Adventure.patch index 76b4d4bc4f..8b38a714d2 100644 --- a/patches/server/0010-Adventure.patch +++ b/patches/server/0010-Adventure.patch @@ -2958,10 +2958,10 @@ index 059ba63319f6ca04750a7d6b095e6179cae68b4f..cb2dc6db887856c5f60d127f5999a078 + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 3b9e42adb657d0feb99de4b55dc0c628e9cd5afd..253f965e52cd488af88d55cdd09f1bad0ddbeb56 100644 +index 9a033c136062c43e6db8107fdff059a6807aed02..4186943ba9e94758d579477e8fadaf8e05ef93f3 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -149,6 +149,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -150,6 +150,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { private final BlockMetadataStore blockMetadata = new BlockMetadataStore(this); private final Object2IntOpenHashMap<SpawnCategory> spawnCategoryLimit = new Object2IntOpenHashMap<>(); private final CraftPersistentDataContainer persistentDataContainer = new CraftPersistentDataContainer(CraftWorld.DATA_TYPE_REGISTRY); @@ -2969,7 +2969,7 @@ index 3b9e42adb657d0feb99de4b55dc0c628e9cd5afd..253f965e52cd488af88d55cdd09f1bad private static final Random rand = new Random(); -@@ -1986,5 +1987,18 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1997,5 +1998,18 @@ public class CraftWorld extends CraftRegionAccessor implements World { return ret; } @@ -3471,10 +3471,10 @@ index 446fdca49a5a6999626a7ee3a1d5c168b15a09dd..f9863e138994f6c7a7975a852f106faa public boolean isOp() { return true; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 4a82ab70a1fd8027af67e7eb5b507c7c2236819a..d7767d86d14df2529f1c17f4e3e0d0b670c41abf 100644 +index f8e659dcf69705ab54bc3f47e2ca95d0419c65e4..ba2853ae514e31bf46a72e2f845c8edf206a4d55 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -278,14 +278,39 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -279,14 +279,39 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @Override public String getDisplayName() { @@ -3514,7 +3514,7 @@ index 4a82ab70a1fd8027af67e7eb5b507c7c2236819a..d7767d86d14df2529f1c17f4e3e0d0b6 @Override public String getPlayerListName() { return this.getHandle().listName == null ? getName() : CraftChatMessage.fromComponent(this.getHandle().listName); -@@ -304,42 +329,42 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -305,42 +330,42 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } } @@ -3566,7 +3566,7 @@ index 4a82ab70a1fd8027af67e7eb5b507c7c2236819a..d7767d86d14df2529f1c17f4e3e0d0b6 this.getHandle().connection.send(packet); } -@@ -371,6 +396,23 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -372,6 +397,23 @@ public class CraftPlayer extends CraftHumanEntity implements Player { this.getHandle().connection.disconnect(message == null ? "" : message); } @@ -3590,7 +3590,7 @@ index 4a82ab70a1fd8027af67e7eb5b507c7c2236819a..d7767d86d14df2529f1c17f4e3e0d0b6 @Override public void setCompassTarget(Location loc) { if (this.getHandle().connection == null) return; -@@ -684,6 +726,35 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -700,6 +742,35 @@ public class CraftPlayer extends CraftHumanEntity implements Player { this.getHandle().connection.send(packet); } @@ -3626,7 +3626,7 @@ index 4a82ab70a1fd8027af67e7eb5b507c7c2236819a..d7767d86d14df2529f1c17f4e3e0d0b6 @Override public void sendSignChange(Location loc, String[] lines) { this.sendSignChange(loc, lines, DyeColor.BLACK); -@@ -711,14 +782,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -727,14 +798,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } Component[] components = CraftSign.sanitizeLines(lines); @@ -3644,7 +3644,7 @@ index 4a82ab70a1fd8027af67e7eb5b507c7c2236819a..d7767d86d14df2529f1c17f4e3e0d0b6 } @Override -@@ -1586,7 +1658,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1616,7 +1688,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @Override public void setResourcePack(String url) { @@ -3653,7 +3653,7 @@ index 4a82ab70a1fd8027af67e7eb5b507c7c2236819a..d7767d86d14df2529f1c17f4e3e0d0b6 } @Override -@@ -1601,7 +1673,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1631,7 +1703,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @Override public void setResourcePack(String url, byte[] hash, boolean force) { @@ -3662,7 +3662,7 @@ index 4a82ab70a1fd8027af67e7eb5b507c7c2236819a..d7767d86d14df2529f1c17f4e3e0d0b6 } @Override -@@ -1617,6 +1689,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1647,6 +1719,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } } @@ -3684,7 +3684,7 @@ index 4a82ab70a1fd8027af67e7eb5b507c7c2236819a..d7767d86d14df2529f1c17f4e3e0d0b6 public void addChannel(String channel) { Preconditions.checkState(this.channels.size() < 128, "Cannot register channel '%s'. Too many channels registered!", channel); channel = StandardMessenger.validateAndCorrectChannel(channel); -@@ -2021,6 +2108,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2051,6 +2138,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player { return (this.getHandle().clientViewDistance == null) ? Bukkit.getViewDistance() : this.getHandle().clientViewDistance; } @@ -3697,7 +3697,7 @@ index 4a82ab70a1fd8027af67e7eb5b507c7c2236819a..d7767d86d14df2529f1c17f4e3e0d0b6 @Override public int getPing() { return this.getHandle().latency; -@@ -2066,6 +2159,254 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2096,6 +2189,254 @@ public class CraftPlayer extends CraftHumanEntity implements Player { return this.getHandle().allowsListing(); } @@ -3975,10 +3975,10 @@ index b7f54a7d90a2a34e641f152eb8f5c3c62033e511..2d04443a9efd6e4b5eb1e360a727d849 @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 5e02ea662a1307b2718811bab98ed0d6d17edd87..54a9a630ca1aa3cabc9aa29ba7d9e516c0f88a00 100644 +index c1a3f7b281ecc1551dd51faac046e02064a72afe..9bf4b8865237fd2555ed0e4b2e619afd7dc6845e 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -820,9 +820,9 @@ public class CraftEventFactory { +@@ -836,9 +836,9 @@ public class CraftEventFactory { return event; } @@ -3990,7 +3990,7 @@ index 5e02ea662a1307b2718811bab98ed0d6d17edd87..54a9a630ca1aa3cabc9aa29ba7d9e516 event.setKeepInventory(keepInventory); event.setKeepLevel(victim.keepLevel); // SPIGOT-2222: pre-set keepLevel org.bukkit.World world = entity.getWorld(); -@@ -847,7 +847,7 @@ public class CraftEventFactory { +@@ -863,7 +863,7 @@ public class CraftEventFactory { * Server methods */ public static ServerListPingEvent callServerListPingEvent(Server craftServer, InetAddress address, String motd, int numPlayers, int maxPlayers) { diff --git a/patches/server/0014-Timings-v2.patch b/patches/server/0014-Timings-v2.patch index 70c7d239fe..5a6ee38fe9 100644 --- a/patches/server/0014-Timings-v2.patch +++ b/patches/server/0014-Timings-v2.patch @@ -1586,21 +1586,21 @@ index c02fa35cefc9194d1838abbe4f2dc2b226a41e41..b300d12e9e00519028b53aca9c3fb01f 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 0307083079c0a257ecb82b8cb4fb8f91af3816bc..8e11ca5e8cc43a27482a1794d843359d7428bdde 100644 +index bedafac1c29f4b2a820822b01814b871f88528d4..13202fc9f73f3485328b923de8c1e6080f08e773 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -@@ -680,6 +680,7 @@ public class LevelChunk extends ChunkAccess { - server.getPluginManager().callEvent(new org.bukkit.event.world.ChunkLoadEvent(this.bukkitChunk, this.needsDecoration)); +@@ -674,6 +674,7 @@ public class LevelChunk extends ChunkAccess { + server.getPluginManager().callEvent(new org.bukkit.event.world.ChunkLoadEvent(bukkitChunk, this.needsDecoration)); if (this.needsDecoration) { + try (co.aikar.timings.Timing ignored = this.level.timings.chunkLoadPopulate.startTiming()) { // Paper this.needsDecoration = false; java.util.Random random = new java.util.Random(); random.setSeed(this.level.getSeed()); -@@ -699,6 +700,7 @@ public class LevelChunk extends ChunkAccess { +@@ -693,6 +694,7 @@ public class LevelChunk extends ChunkAccess { } } - server.getPluginManager().callEvent(new org.bukkit.event.world.ChunkPopulateEvent(this.bukkitChunk)); + server.getPluginManager().callEvent(new org.bukkit.event.world.ChunkPopulateEvent(bukkitChunk)); + } // Paper } } @@ -1846,10 +1846,10 @@ index b0ffa23faf62629043dfd613315eaf9c5fcc2cfe..00000000000000000000000000000000 - } -} diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index d7767d86d14df2529f1c17f4e3e0d0b670c41abf..a983573269d5e575c845df3a566d147668ccd86b 100644 +index ba2853ae514e31bf46a72e2f845c8edf206a4d55..67cfa69c73c04931a190918c17a1cd5f9cb006c6 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -2492,6 +2492,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2522,6 +2522,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player { CraftPlayer.this.getHandle().connection.send(new net.minecraft.network.protocol.game.ClientboundSystemChatPacket(components, position == net.md_5.bungee.api.ChatMessageType.ACTION_BAR)); } diff --git a/patches/server/0016-Starlight.patch b/patches/server/0016-Starlight.patch index da5f1b8108..6a81c4dc2a 100644 --- a/patches/server/0016-Starlight.patch +++ b/patches/server/0016-Starlight.patch @@ -5023,7 +5023,7 @@ index 80b98e6667f1a0c21d019c58a8a0d4cc5b0f48e1..8033c8741a0f73919a357893652592b3 super(wrapped.getPos(), UpgradeData.EMPTY, wrapped.levelHeightAccessor, wrapped.getLevel().registryAccess().registryOrThrow(Registries.BIOME), wrapped.getBlendingData()); this.wrapped = wrapped; 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 8e11ca5e8cc43a27482a1794d843359d7428bdde..2753e2a1991ec39f03c2a81f3262f94f0e3fe9a7 100644 +index 13202fc9f73f3485328b923de8c1e6080f08e773..975973e858ceb8340d2fdad54f636627d16612fd 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java @@ -93,6 +93,10 @@ public class LevelChunk extends ChunkAccess { @@ -5037,7 +5037,7 @@ index 8e11ca5e8cc43a27482a1794d843359d7428bdde..2753e2a1991ec39f03c2a81f3262f94f this.tickersInLevel = Maps.newHashMap(); this.clientLightReady = false; this.level = (ServerLevel) world; // CraftBukkit - type -@@ -230,6 +234,12 @@ public class LevelChunk extends ChunkAccess { +@@ -223,6 +227,12 @@ public class LevelChunk extends ChunkAccess { public LevelChunk(ServerLevel world, ProtoChunk protoChunk, @Nullable LevelChunk.PostLoadProcessor entityLoader) { this(world, protoChunk.getPos(), protoChunk.getUpgradeData(), protoChunk.unpackBlockTicks(), protoChunk.unpackFluidTicks(), protoChunk.getInhabitedTime(), protoChunk.getSections(), entityLoader, protoChunk.getBlendingData()); diff --git a/patches/server/0018-Rewrite-chunk-system.patch b/patches/server/0018-Rewrite-chunk-system.patch index c8672d65fc..b750d4d0d2 100644 --- a/patches/server/0018-Rewrite-chunk-system.patch +++ b/patches/server/0018-Rewrite-chunk-system.patch @@ -16695,10 +16695,10 @@ index e2278ed457a7342d0d1b1a5fc1b5bdef6358816b..71df7c590e31932f2b8fc26a2afaaa54 public int getIndex() { 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 2753e2a1991ec39f03c2a81f3262f94f0e3fe9a7..b696638d63998c6dde6df700fd5c9244ffedb505 100644 +index 975973e858ceb8340d2fdad54f636627d16612fd..a17ea775afb51dd31871a66a1b6f9f623dd7751a 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -@@ -183,6 +183,43 @@ public class LevelChunk extends ChunkAccess { +@@ -176,6 +176,43 @@ public class LevelChunk extends ChunkAccess { protected void onNeighbourChange(final long bitsetBefore, final long bitsetAfter) { @@ -16742,7 +16742,7 @@ index 2753e2a1991ec39f03c2a81f3262f94f0e3fe9a7..b696638d63998c6dde6df700fd5c9244 } public final boolean isAnyNeighborsLoaded() { -@@ -660,9 +697,26 @@ public class LevelChunk extends ChunkAccess { +@@ -653,9 +690,26 @@ public class LevelChunk extends ChunkAccess { } @@ -16772,7 +16772,7 @@ index 2753e2a1991ec39f03c2a81f3262f94f0e3fe9a7..b696638d63998c6dde6df700fd5c9244 int chunkX = this.chunkPos.x; int chunkZ = this.chunkPos.z; ServerChunkCache chunkProvider = this.level.getChunkSource(); -@@ -677,10 +731,56 @@ public class LevelChunk extends ChunkAccess { +@@ -670,10 +724,56 @@ public class LevelChunk extends ChunkAccess { } } this.setNeighbourLoaded(0, 0, this); @@ -16831,27 +16831,28 @@ index 2753e2a1991ec39f03c2a81f3262f94f0e3fe9a7..b696638d63998c6dde6df700fd5c9244 if (server != null) { /* * If it's a new world, the first few chunks are generated inside -@@ -688,6 +788,7 @@ public class LevelChunk extends ChunkAccess { - * no way of creating a CraftWorld/CraftServer at that point. +@@ -682,6 +782,7 @@ public class LevelChunk extends ChunkAccess { */ - server.getPluginManager().callEvent(new org.bukkit.event.world.ChunkLoadEvent(this.bukkitChunk, this.needsDecoration)); + org.bukkit.Chunk bukkitChunk = new org.bukkit.craftbukkit.CraftChunk(this); + server.getPluginManager().callEvent(new org.bukkit.event.world.ChunkLoadEvent(bukkitChunk, this.needsDecoration)); + this.chunkHolder.getEntityChunk().callEntitiesLoadEvent(); // Paper - rewrite chunk system if (this.needsDecoration) { try (co.aikar.timings.Timing ignored = this.level.timings.chunkLoadPopulate.startTiming()) { // Paper -@@ -716,8 +817,10 @@ public class LevelChunk extends ChunkAccess { +@@ -710,9 +811,11 @@ public class LevelChunk extends ChunkAccess { } public void unloadCallback() { + if (!this.loadedTicketLevel) { LOGGER.error("Double calling chunk unload!", new Throwable()); } // Paper org.bukkit.Server server = this.level.getCraftServer(); -- org.bukkit.event.world.ChunkUnloadEvent unloadEvent = new org.bukkit.event.world.ChunkUnloadEvent(this.bukkitChunk, this.isUnsaved()); + this.chunkHolder.getEntityChunk().callEntitiesUnloadEvent(); // Paper - rewrite chunk system -+ org.bukkit.event.world.ChunkUnloadEvent unloadEvent = new org.bukkit.event.world.ChunkUnloadEvent(this.bukkitChunk, true); // Paper - rewrite chunk system - force save to true so that mustNotSave is correctly set below + org.bukkit.Chunk bukkitChunk = new org.bukkit.craftbukkit.CraftChunk(this); +- org.bukkit.event.world.ChunkUnloadEvent unloadEvent = new org.bukkit.event.world.ChunkUnloadEvent(bukkitChunk, this.isUnsaved()); ++ org.bukkit.event.world.ChunkUnloadEvent unloadEvent = new org.bukkit.event.world.ChunkUnloadEvent(bukkitChunk, true); // Paper - rewrite chunk system - force save to true so that mustNotSave is correctly set below server.getPluginManager().callEvent(unloadEvent); // note: saving can be prevented, but not forced if no saving is actually required this.mustNotSave = !unloadEvent.isSaveChunk(); -@@ -739,9 +842,26 @@ public class LevelChunk extends ChunkAccess { +@@ -734,9 +837,26 @@ public class LevelChunk extends ChunkAccess { // Paper end } @@ -16879,7 +16880,7 @@ index 2753e2a1991ec39f03c2a81f3262f94f0e3fe9a7..b696638d63998c6dde6df700fd5c9244 } // CraftBukkit end -@@ -816,7 +936,10 @@ public class LevelChunk extends ChunkAccess { +@@ -811,7 +931,10 @@ public class LevelChunk extends ChunkAccess { }); } @@ -16890,7 +16891,7 @@ index 2753e2a1991ec39f03c2a81f3262f94f0e3fe9a7..b696638d63998c6dde6df700fd5c9244 ChunkPos chunkcoordintpair = this.getPos(); for (int i = 0; i < this.postProcessing.length; ++i) { -@@ -854,6 +977,11 @@ public class LevelChunk extends ChunkAccess { +@@ -849,6 +972,11 @@ public class LevelChunk extends ChunkAccess { this.pendingBlockEntities.clear(); this.upgradeData.upgrade(this); @@ -16902,7 +16903,7 @@ index 2753e2a1991ec39f03c2a81f3262f94f0e3fe9a7..b696638d63998c6dde6df700fd5c9244 } @Nullable -@@ -903,7 +1031,7 @@ public class LevelChunk extends ChunkAccess { +@@ -898,7 +1026,7 @@ public class LevelChunk extends ChunkAccess { } public ChunkHolder.FullChunkStatus getFullStatus() { @@ -17780,10 +17781,10 @@ index 9f6c2e5b5d9e8d714a47c770e255d06c0ef7c190..ac807277a6b26d140ea9873d17c7aa4f for(SavedTick<T> savedTick : this.pendingTicks) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java -index 738d3ce38a42ff8cd53eec042ef8bc74f2b8d059..a895c81ea6af0822c8371ae93cfe4b72d419439d 100644 +index 1a4963804182e4ba1cae5d6eee2ac50f8fa0052a..1889e53161a2b17b32e838b5bc1cbda820b28619 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java -@@ -120,7 +120,7 @@ public class CraftChunk implements Chunk { +@@ -103,7 +103,7 @@ public class CraftChunk implements Chunk { @Override public boolean isEntitiesLoaded() { @@ -17792,7 +17793,7 @@ index 738d3ce38a42ff8cd53eec042ef8bc74f2b8d059..a895c81ea6af0822c8371ae93cfe4b72 } @Override -@@ -129,51 +129,7 @@ public class CraftChunk implements Chunk { +@@ -112,51 +112,7 @@ public class CraftChunk implements Chunk { this.getWorld().getChunkAt(x, z); // Transient load for this tick } @@ -17846,7 +17847,7 @@ index 738d3ce38a42ff8cd53eec042ef8bc74f2b8d059..a895c81ea6af0822c8371ae93cfe4b72 @Override diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 36c1fd2987843d74b6f8f5711e77d67565f25c5b..cfae708f784546be04e4cedbc707c7b35aa40a46 100644 +index 394d8631cb0a143cc7b5d71c919a8298652d5678..cd667805a4ace3edc88a8ff11369fd169e5614e3 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -1124,7 +1124,7 @@ public final class CraftServer implements Server { @@ -17877,10 +17878,10 @@ index 36c1fd2987843d74b6f8f5711e77d67565f25c5b..cfae708f784546be04e4cedbc707c7b3 // Paper start diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 253f965e52cd488af88d55cdd09f1bad0ddbeb56..30137f60a3796cf845e8fd7bd3c291be979b8b0c 100644 +index 4186943ba9e94758d579477e8fadaf8e05ef93f3..1684b3ee1b51597e799486bbe129b344a9fe3098 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -313,10 +313,14 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -325,10 +325,14 @@ public class CraftWorld extends CraftRegionAccessor implements World { ChunkHolder playerChunk = this.world.getChunkSource().chunkMap.getVisibleChunkIfPresent(ChunkPos.asLong(x, z)); if (playerChunk == null) return false; @@ -17898,7 +17899,7 @@ index 253f965e52cd488af88d55cdd09f1bad0ddbeb56..30137f60a3796cf845e8fd7bd3c291be ClientboundLevelChunkWithLightPacket refreshPacket = new ClientboundLevelChunkWithLightPacket(chunk, this.world.getLightEngine(), null, null, true); for (ServerPlayer player : playersInRange) { -@@ -324,8 +328,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -336,8 +340,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { player.connection.send(refreshPacket); } @@ -17908,7 +17909,7 @@ index 253f965e52cd488af88d55cdd09f1bad0ddbeb56..30137f60a3796cf845e8fd7bd3c291be return true; } -@@ -403,20 +406,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -414,20 +417,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public Collection<Plugin> getPluginChunkTickets(int x, int z) { DistanceManager chunkDistanceManager = this.world.getChunkSource().chunkMap.distanceManager; @@ -17930,7 +17931,7 @@ index 253f965e52cd488af88d55cdd09f1bad0ddbeb56..30137f60a3796cf845e8fd7bd3c291be } @Override -@@ -424,7 +414,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -435,7 +425,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { Map<Plugin, ImmutableList.Builder<Chunk>> ret = new HashMap<>(); DistanceManager chunkDistanceManager = this.world.getChunkSource().chunkMap.distanceManager; @@ -17939,7 +17940,7 @@ index 253f965e52cd488af88d55cdd09f1bad0ddbeb56..30137f60a3796cf845e8fd7bd3c291be long chunkKey = chunkTickets.getLongKey(); SortedArraySet<Ticket<?>> tickets = chunkTickets.getValue(); -@@ -1920,14 +1910,53 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1931,14 +1921,53 @@ public class CraftWorld extends CraftRegionAccessor implements World { // Spigot start @Override public int getViewDistance() { @@ -17996,10 +17997,10 @@ index 253f965e52cd488af88d55cdd09f1bad0ddbeb56..30137f60a3796cf845e8fd7bd3c291be // Spigot start private final org.bukkit.World.Spigot spigot = new org.bukkit.World.Spigot() diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index a983573269d5e575c845df3a566d147668ccd86b..feb848813b80acb527e981b653208350639c97cc 100644 +index 67cfa69c73c04931a190918c17a1cd5f9cb006c6..83471457a723a41141d06f0fd11a042d6e5d7918 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -177,6 +177,81 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -178,6 +178,81 @@ public class CraftPlayer extends CraftHumanEntity implements Player { this.firstPlayed = System.currentTimeMillis(); } diff --git a/patches/server/0030-Player-affects-spawning-API.patch b/patches/server/0030-Player-affects-spawning-API.patch index 62f71597dd..a38fd6154c 100644 --- a/patches/server/0030-Player-affects-spawning-API.patch +++ b/patches/server/0030-Player-affects-spawning-API.patch @@ -137,10 +137,10 @@ index be6e3e21ad62da01e5e2dd78e300cbc8efdbeb42..ea98625fe7c00743b8df74a24e6d4b75 for(Player player : this.players()) { if (EntitySelector.NO_SPECTATORS.test(player) && EntitySelector.LIVING_ENTITY_STILL_ALIVE.test(player)) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index feb848813b80acb527e981b653208350639c97cc..72ec95cc014de2ac44e3d27b90e7544cb58c2ee4 100644 +index 83471457a723a41141d06f0fd11a042d6e5d7918..de288116429c7ee87ba2e180e3e39855feee27f5 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -2197,8 +2197,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2227,8 +2227,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @Override public String getLocale() { return this.getHandle().locale; diff --git a/patches/server/0032-Only-refresh-abilities-if-needed.patch b/patches/server/0032-Only-refresh-abilities-if-needed.patch index 24c4c35bab..9cbc4822bd 100644 --- a/patches/server/0032-Only-refresh-abilities-if-needed.patch +++ b/patches/server/0032-Only-refresh-abilities-if-needed.patch @@ -5,10 +5,10 @@ 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 72ec95cc014de2ac44e3d27b90e7544cb58c2ee4..cbefc896cf9e2d8899bb78f694bc1ab64082d0eb 100644 +index de288116429c7ee87ba2e180e3e39855feee27f5..1e710c73c45fc34d2809e75b5e43c32e1cd7c7f1 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1866,12 +1866,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1896,12 +1896,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @Override public void setFlying(boolean value) { diff --git a/patches/server/0034-Prevent-tile-entity-and-entity-crashes.patch b/patches/server/0034-Prevent-tile-entity-and-entity-crashes.patch index 13dc026c06..c6ee88b9e7 100644 --- a/patches/server/0034-Prevent-tile-entity-and-entity-crashes.patch +++ b/patches/server/0034-Prevent-tile-entity-and-entity-crashes.patch @@ -44,10 +44,10 @@ index b300d12e9e00519028b53aca9c3fb01f589eaa91..63acd109a79ed752a05df3d4f1b99309 } } 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 b696638d63998c6dde6df700fd5c9244ffedb505..f30a5bd3c954afa063bf85d9d91340bd017cf896 100644 +index a17ea775afb51dd31871a66a1b6f9f623dd7751a..8254e72595ae5c1ddf5cf969570d83758b744c7b 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -@@ -1196,11 +1196,11 @@ public class LevelChunk extends ChunkAccess { +@@ -1191,11 +1191,11 @@ public class LevelChunk extends ChunkAccess { gameprofilerfiller.pop(); } catch (Throwable throwable) { diff --git a/patches/server/0045-Implement-PlayerLocaleChangeEvent.patch b/patches/server/0045-Implement-PlayerLocaleChangeEvent.patch index 685c289ef9..1b2604b8d8 100644 --- a/patches/server/0045-Implement-PlayerLocaleChangeEvent.patch +++ b/patches/server/0045-Implement-PlayerLocaleChangeEvent.patch @@ -30,10 +30,10 @@ index edb8537e4fdd82991eda914a7d5c3ff6ef773fe0..e1b545cda20f5f165497b751044ff323 this.locale = packet.language; // Paper start diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index cbefc896cf9e2d8899bb78f694bc1ab64082d0eb..7eec465d1997dabc57be5731ff6488839d860dea 100644 +index 1e710c73c45fc34d2809e75b5e43c32e1cd7c7f1..7a2db8458cffd98e8324da101a27b3aee20bbeed 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -2197,8 +2197,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2227,8 +2227,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @Override public String getLocale() { diff --git a/patches/server/0052-Ensure-commands-are-not-ran-async.patch b/patches/server/0052-Ensure-commands-are-not-ran-async.patch index 81a067316f..0d128dbb1e 100644 --- a/patches/server/0052-Ensure-commands-are-not-ran-async.patch +++ b/patches/server/0052-Ensure-commands-are-not-ran-async.patch @@ -21,7 +21,7 @@ character. Co-authored-by: Jake Potrebic <[email protected]> diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 504f3ddca160797a13a39bc813eb12322359ce50..30a6be5487e0bff49d134c5dcae520071763d2ac 100644 +index c1db84d0ed569dd44d1f54cca227f77890e0f66a..026b43e74d99d7b5a971e4de996a30f02d0f8d24 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -2034,7 +2034,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @@ -74,7 +74,7 @@ index 504f3ddca160797a13a39bc813eb12322359ce50..30a6be5487e0bff49d134c5dcae52007 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 07536b696f734fb9e8d0abe1f414ae536610f9ce..a8a9e109b11d124a2018857d0d13c1aacabfa37a 100644 +index 77b8b4d56883dcf672af82189da75ddef7c935a2..af2d401c3faa14664732c001a1ea59f61683374e 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -852,6 +852,28 @@ public final class CraftServer implements Server { @@ -107,10 +107,10 @@ index 07536b696f734fb9e8d0abe1f414ae536610f9ce..a8a9e109b11d124a2018857d0d13c1aa return true; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 10572393e1c45ed277f56e3f8978f73a02eed4c4..c0e3ac7448f50d861914c18a44537882f24709dd 100644 +index 7a2db8458cffd98e8324da101a27b3aee20bbeed..34aca43bf55be421755dd5aff7abc5a833e08ce7 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -505,7 +505,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -506,7 +506,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { public void chat(String msg) { if (this.getHandle().connection == null) return; diff --git a/patches/server/0053-All-chunks-are-slime-spawn-chunks-toggle.patch b/patches/server/0053-All-chunks-are-slime-spawn-chunks-toggle.patch index 49624760b3..dab82d7732 100644 --- a/patches/server/0053-All-chunks-are-slime-spawn-chunks-toggle.patch +++ b/patches/server/0053-All-chunks-are-slime-spawn-chunks-toggle.patch @@ -18,10 +18,10 @@ index ca1d97d6eeea2b0fd2a9b90624ca083026f549de..02aca470c3b41114204da54e2365ee29 if (random.nextInt(10) == 0 && flag && pos.getY() < 40) { return checkMobSpawnRules(type, world, spawnReason, pos, random); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java -index a895c81ea6af0822c8371ae93cfe4b72d419439d..e4a533ace96829414844607a013831dba7a1e73e 100644 +index 1889e53161a2b17b32e838b5bc1cbda820b28619..579f96e6778abe1c565ee359b79cca96a43ae600 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java -@@ -177,7 +177,7 @@ public class CraftChunk implements Chunk { +@@ -161,7 +161,7 @@ public class CraftChunk implements Chunk { @Override public boolean isSlimeChunk() { // 987234911L is deterimined in EntitySlime when seeing if a slime can spawn in a chunk diff --git a/patches/server/0056-Player-Tab-List-and-Title-APIs.patch b/patches/server/0056-Player-Tab-List-and-Title-APIs.patch index d3c8666472..cba96ac6c7 100644 --- a/patches/server/0056-Player-Tab-List-and-Title-APIs.patch +++ b/patches/server/0056-Player-Tab-List-and-Title-APIs.patch @@ -63,7 +63,7 @@ index bd808eb312ade7122973a47f4b96505829511da5..bf0f9cab7c66c089f35b851e799ba4a4 // Paper end buf.writeComponent(this.text); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index c0e3ac7448f50d861914c18a44537882f24709dd..ebbf77b1620a08ecee8917cd6a8f6beee69a645a 100644 +index 34aca43bf55be421755dd5aff7abc5a833e08ce7..3429595e2a28bda3430ac198e60798374a7fc051 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1,5 +1,6 @@ @@ -73,7 +73,7 @@ index c0e3ac7448f50d861914c18a44537882f24709dd..ebbf77b1620a08ecee8917cd6a8f6bee import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableSet; import com.google.common.io.BaseEncoding; -@@ -351,6 +352,100 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -352,6 +353,100 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } } diff --git a/patches/server/0059-Configurable-inter-world-teleportation-safety.patch b/patches/server/0059-Configurable-inter-world-teleportation-safety.patch index 6d8ca27037..f604670949 100644 --- a/patches/server/0059-Configurable-inter-world-teleportation-safety.patch +++ b/patches/server/0059-Configurable-inter-world-teleportation-safety.patch @@ -16,10 +16,10 @@ The wanted destination was on top of the emerald block however the player ended This only is the case if the player is teleporting between worlds. diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index ebbf77b1620a08ecee8917cd6a8f6beee69a645a..120461eb5d4129453ccff4304b376045ccf6f2e7 100644 +index 3429595e2a28bda3430ac198e60798374a7fc051..41753aff6c12c9ceb142b886c35a62bd86e430e7 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1178,7 +1178,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1208,7 +1208,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { if (fromWorld == toWorld) { entity.connection.teleport(to); } else { diff --git a/patches/server/0060-Add-exception-reporting-event.patch b/patches/server/0060-Add-exception-reporting-event.patch index ba017307e6..bb47a3a6ac 100644 --- a/patches/server/0060-Add-exception-reporting-event.patch +++ b/patches/server/0060-Add-exception-reporting-event.patch @@ -131,7 +131,7 @@ index f1675e35be0ab7670c875c6b0d1e982a3ae09d1e..b2bb9bbd3af414c50ec3f8e3e171a679 } 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 f30a5bd3c954afa063bf85d9d91340bd017cf896..58048d90a66cf3291a31d7c1f13ae66eac04ed64 100644 +index 8254e72595ae5c1ddf5cf969570d83758b744c7b..03f7394057c927f55fa962a65988d03553c6a642 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java @@ -1,6 +1,7 @@ @@ -142,7 +142,7 @@ index f30a5bd3c954afa063bf85d9d91340bd017cf896..58048d90a66cf3291a31d7c1f13ae66e import com.google.common.collect.Maps; import com.google.common.collect.UnmodifiableIterator; import com.mojang.logging.LogUtils; -@@ -605,10 +606,16 @@ public class LevelChunk extends ChunkAccess { +@@ -598,10 +599,16 @@ public class LevelChunk extends ChunkAccess { // CraftBukkit start } else { @@ -163,7 +163,7 @@ index f30a5bd3c954afa063bf85d9d91340bd017cf896..58048d90a66cf3291a31d7c1f13ae66e // CraftBukkit end } } -@@ -1199,6 +1206,7 @@ public class LevelChunk extends ChunkAccess { +@@ -1194,6 +1201,7 @@ public class LevelChunk extends ChunkAccess { // Paper start - Prevent tile 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/0065-Complete-resource-pack-API.patch b/patches/server/0065-Complete-resource-pack-API.patch index 4dcfec6ba4..fbc1c683be 100644 --- a/patches/server/0065-Complete-resource-pack-API.patch +++ b/patches/server/0065-Complete-resource-pack-API.patch @@ -23,10 +23,10 @@ index 026b43e74d99d7b5a971e4de996a30f02d0f8d24..cf905220ac5bbce62e5e061f0dfc9690 @Override diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 238bef8e1e9f1e932476b3bbcc9258bca4adbb08..e46023675573e42e6bd510ddaa4bfc470536136f 100644 +index 41753aff6c12c9ceb142b886c35a62bd86e430e7..be1f40a40d805f2e7cde39d5636a9fc793718b93 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -153,6 +153,7 @@ import org.bukkit.plugin.Plugin; +@@ -154,6 +154,7 @@ import org.bukkit.plugin.Plugin; import org.bukkit.plugin.messaging.StandardMessenger; import org.bukkit.profile.PlayerProfile; import org.bukkit.scoreboard.Scoreboard; @@ -34,7 +34,7 @@ index 238bef8e1e9f1e932476b3bbcc9258bca4adbb08..e46023675573e42e6bd510ddaa4bfc47 import net.md_5.bungee.api.chat.BaseComponent; // Spigot -@@ -171,6 +172,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -172,6 +173,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player { private double healthScale = 20; private CraftWorldBorder clientWorldBorder = null; private BorderChangeListener clientWorldBorderListener = this.createWorldBorderListener(); @@ -45,7 +45,7 @@ index 238bef8e1e9f1e932476b3bbcc9258bca4adbb08..e46023675573e42e6bd510ddaa4bfc47 public CraftPlayer(CraftServer server, ServerPlayer entity) { super(server, entity); -@@ -2320,6 +2325,45 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2350,6 +2355,45 @@ public class CraftPlayer extends CraftHumanEntity implements Player { public boolean getAffectsSpawning() { return this.getHandle().affectsSpawning; } diff --git a/patches/server/0073-handle-NaN-health-absorb-values-and-repair-bad-data.patch b/patches/server/0073-handle-NaN-health-absorb-values-and-repair-bad-data.patch index ddbd095f81..6080d3b28b 100644 --- a/patches/server/0073-handle-NaN-health-absorb-values-and-repair-bad-data.patch +++ b/patches/server/0073-handle-NaN-health-absorb-values-and-repair-bad-data.patch @@ -44,10 +44,10 @@ index 9936fb67766dedba71b582316dd2bddd6567c342..2f161145789890fcd9bfd893b099f25a } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index e46023675573e42e6bd510ddaa4bfc470536136f..814bcc343fc2568844dd8da1f328fbae8b09f592 100644 +index be1f40a40d805f2e7cde39d5636a9fc793718b93..2e1d8d53f91bccf3cd565b94b8ab5949f470cbd5 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -2125,6 +2125,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2155,6 +2155,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } public void setRealHealth(double health) { diff --git a/patches/server/0076-Optimize-isInWorldBounds-and-getBlockState-for-inlin.patch b/patches/server/0076-Optimize-isInWorldBounds-and-getBlockState-for-inlin.patch index b11ae54fff..7110c30c68 100644 --- a/patches/server/0076-Optimize-isInWorldBounds-and-getBlockState-for-inlin.patch +++ b/patches/server/0076-Optimize-isInWorldBounds-and-getBlockState-for-inlin.patch @@ -88,10 +88,10 @@ index 8033c8741a0f73919a357893652592b317bfb417..9a1cffd51aaf97f759a9057aefbf50bd @Override public FluidState getFluidState(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 58048d90a66cf3291a31d7c1f13ae66eac04ed64..8775163c42d639516a533559eaf312ee16c19f10 100644 +index 03f7394057c927f55fa962a65988d03553c6a642..a37377f1b8eba0a86cdeb31026c5e7fe790b898a 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -@@ -342,12 +342,29 @@ public class LevelChunk extends ChunkAccess { +@@ -335,12 +335,29 @@ public class LevelChunk extends ChunkAccess { } } diff --git a/patches/server/0079-Configurable-Chunk-Inhabited-Time.patch b/patches/server/0079-Configurable-Chunk-Inhabited-Time.patch index 9bb9893262..93cf642499 100644 --- a/patches/server/0079-Configurable-Chunk-Inhabited-Time.patch +++ b/patches/server/0079-Configurable-Chunk-Inhabited-Time.patch @@ -11,10 +11,10 @@ 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 8775163c42d639516a533559eaf312ee16c19f10..b55080c38b1ac4581b73f0d55ac8a432824a13a4 100644 +index a37377f1b8eba0a86cdeb31026c5e7fe790b898a..f5dcd970fc2828a4ba9ff2c0d495aa8d8cd4ed74 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -@@ -327,6 +327,13 @@ public class LevelChunk extends ChunkAccess { +@@ -320,6 +320,13 @@ public class LevelChunk extends ChunkAccess { return new ChunkAccess.TicksToSave(this.blockTicks, this.fluidTicks); } diff --git a/patches/server/0095-LootTable-API-Replenishable-Lootables-Feature.patch b/patches/server/0095-LootTable-API-Replenishable-Lootables-Feature.patch index 46c63668a9..e3bba82f09 100644 --- a/patches/server/0095-LootTable-API-Replenishable-Lootables-Feature.patch +++ b/patches/server/0095-LootTable-API-Replenishable-Lootables-Feature.patch @@ -86,7 +86,7 @@ index 0000000000000000000000000000000000000000..88e32ed64f90bfd277dac84ba4bd84f0 +} diff --git a/src/main/java/com/destroystokyo/paper/loottable/PaperLootableBlockInventory.java b/src/main/java/com/destroystokyo/paper/loottable/PaperLootableBlockInventory.java new file mode 100644 -index 0000000000000000000000000000000000000000..70ca5625ff5d13a8e9cd64953066a7e1547ff223 +index 0000000000000000000000000000000000000000..24c6ff57cd25533e71f8a1d0b3c0ece2fdbbf87e --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/loottable/PaperLootableBlockInventory.java @@ -0,0 +1,33 @@ @@ -109,18 +109,18 @@ index 0000000000000000000000000000000000000000..70ca5625ff5d13a8e9cd64953066a7e1 + + @Override + default Level getNMSWorld() { -+ return getTileEntity().getLevel(); ++ return this.getTileEntity().getLevel(); + } + + default Block getBlock() { -+ final BlockPos position = getTileEntity().getBlockPos(); -+ final Chunk bukkitChunk = getTileEntity().getLevel().getChunkAt(position).bukkitChunk; ++ final BlockPos position = this.getTileEntity().getBlockPos(); ++ final Chunk bukkitChunk = this.getBukkitWorld().getChunkAt(org.bukkit.craftbukkit.block.CraftBlock.at(this.getNMSWorld(), position)); + return bukkitChunk.getBlock(position.getX(), position.getY(), position.getZ()); + } + + @Override + default PaperLootableInventoryData getLootableData() { -+ return getTileEntity().lootableData; ++ return this.getTileEntity().lootableData; + } +} diff --git a/src/main/java/com/destroystokyo/paper/loottable/PaperLootableEntityInventory.java b/src/main/java/com/destroystokyo/paper/loottable/PaperLootableEntityInventory.java @@ -490,7 +490,7 @@ index 0000000000000000000000000000000000000000..9cfa5d36a6991067a3866e0d437749fa + } +} diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 7f32aae16af188ec0c3dcbcdd7aeae5f1b9526b6..384e4371e56d877118cb68e4ca94a0cc38b4d101 100644 +index ec566ca4525ab9f6131dab57dc693982357c42d8..0aec74557ef981c1e360485ee4bcb57836eb1dbd 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -234,6 +234,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { diff --git a/patches/server/0110-Add-EntityZapEvent.patch b/patches/server/0110-Add-EntityZapEvent.patch index 7a06c999fd..185a344c91 100644 --- a/patches/server/0110-Add-EntityZapEvent.patch +++ b/patches/server/0110-Add-EntityZapEvent.patch @@ -28,10 +28,10 @@ index efbf6b316a70b94e4bd490df8ebe77cd9f638ba4..cad8854cc7523d60c06ca1f03bfd4fbf entitywitch.finalizeSpawn(world, world.getCurrentDifficultyAt(entitywitch.blockPosition()), MobSpawnType.CONVERSION, (SpawnGroupData) null, (CompoundTag) 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 54a9a630ca1aa3cabc9aa29ba7d9e516c0f88a00..ed1a1ca9494bbdde3f496ee284d63e86665d6de0 100644 +index 9bf4b8865237fd2555ed0e4b2e619afd7dc6845e..0d19b629e2e674b9908c25543c739ec357f20d8a 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1164,6 +1164,14 @@ public class CraftEventFactory { +@@ -1180,6 +1180,14 @@ public class CraftEventFactory { return event; } diff --git a/patches/server/0114-Add-source-to-PlayerExpChangeEvent.patch b/patches/server/0114-Add-source-to-PlayerExpChangeEvent.patch index deef444aa4..2a5ff459be 100644 --- a/patches/server/0114-Add-source-to-PlayerExpChangeEvent.patch +++ b/patches/server/0114-Add-source-to-PlayerExpChangeEvent.patch @@ -18,10 +18,10 @@ index 5391c60398c8a7d1d49dc2e73116b27862653873..5a79b49e321cba352d8e4189dfbfdd05 --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 ed1a1ca9494bbdde3f496ee284d63e86665d6de0..e7f673b38615c116227bb1abcbd10746d4cc74d4 100644 +index 0d19b629e2e674b9908c25543c739ec357f20d8a..774063ea6bd7ef9afbc3fd7046c236519e62e3bc 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1123,6 +1123,17 @@ public class CraftEventFactory { +@@ -1139,6 +1139,17 @@ public class CraftEventFactory { return event; } diff --git a/patches/server/0115-Add-ProjectileCollideEvent.patch b/patches/server/0115-Add-ProjectileCollideEvent.patch index a32490e4f3..81bbdccd5e 100644 --- a/patches/server/0115-Add-ProjectileCollideEvent.patch +++ b/patches/server/0115-Add-ProjectileCollideEvent.patch @@ -6,10 +6,10 @@ 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 e7f673b38615c116227bb1abcbd10746d4cc74d4..a1efb66de4cb509781de498bee5c44456ad93395 100644 +index 774063ea6bd7ef9afbc3fd7046c236519e62e3bc..fea90633f10bad7498f8f5e90093eee2a09df549 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1267,6 +1267,17 @@ public class CraftEventFactory { +@@ -1283,6 +1283,17 @@ public class CraftEventFactory { return CraftItemStack.asNMSCopy(bitem); } @@ -27,7 +27,7 @@ index e7f673b38615c116227bb1abcbd10746d4cc74d4..a1efb66de4cb509781de498bee5c4445 public static ProjectileLaunchEvent callProjectileLaunchEvent(Entity entity) { Projectile bukkitEntity = (Projectile) entity.getBukkitEntity(); ProjectileLaunchEvent event = new ProjectileLaunchEvent(bukkitEntity); -@@ -1291,8 +1302,15 @@ public class CraftEventFactory { +@@ -1307,8 +1318,15 @@ public class CraftEventFactory { if (position.getType() == HitResult.Type.ENTITY) { hitEntity = ((EntityHitResult) position).getEntity().getBukkitEntity(); } diff --git a/patches/server/0122-String-based-Action-Bar-API.patch b/patches/server/0122-String-based-Action-Bar-API.patch index a72e8e8693..7d7a26d233 100644 --- a/patches/server/0122-String-based-Action-Bar-API.patch +++ b/patches/server/0122-String-based-Action-Bar-API.patch @@ -26,10 +26,10 @@ index 32ef3edebe94a2014168b7e438752a80b2687e5f..ab6c58eed6707ab7b0aa3e7549a871ad // Paper end buf.writeComponent(this.text); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 814bcc343fc2568844dd8da1f328fbae8b09f592..ff35189ca0f8c0957fab889039fe2283a190a4d0 100644 +index 2e1d8d53f91bccf3cd565b94b8ab5949f470cbd5..2a77e7ffb748c5b7f89aa232b51e7d62732850d9 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -358,6 +358,29 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -359,6 +359,29 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } // Paper start diff --git a/patches/server/0126-Provide-E-TE-Chunk-count-stat-methods.patch b/patches/server/0126-Provide-E-TE-Chunk-count-stat-methods.patch index be8b776bd5..8fbcabe65d 100644 --- a/patches/server/0126-Provide-E-TE-Chunk-count-stat-methods.patch +++ b/patches/server/0126-Provide-E-TE-Chunk-count-stat-methods.patch @@ -20,10 +20,10 @@ index 1a0accca970ca5eb895c63c5a45a5261440d0e12..35eecb719a813fda6113da24a858188a private final List<TickingBlockEntity> pendingBlockEntityTickers = Lists.newArrayList(); private boolean tickingBlockEntities; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 30137f60a3796cf845e8fd7bd3c291be979b8b0c..030ad193dc657810709817c55fb3eb9a08d41459 100644 +index 1684b3ee1b51597e799486bbe129b344a9fe3098..857fac09453f99a56d41a3a57a5f36c22496a643 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -151,6 +151,56 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -152,6 +152,56 @@ public class CraftWorld extends CraftRegionAccessor implements World { private final CraftPersistentDataContainer persistentDataContainer = new CraftPersistentDataContainer(CraftWorld.DATA_TYPE_REGISTRY); private net.kyori.adventure.pointer.Pointers adventure$pointers; // Paper - implement pointers diff --git a/patches/server/0161-Expose-client-protocol-version-and-virtual-host.patch b/patches/server/0161-Expose-client-protocol-version-and-virtual-host.patch index b7c175ec0b..73bbcab8ca 100644 --- a/patches/server/0161-Expose-client-protocol-version-and-virtual-host.patch +++ b/patches/server/0161-Expose-client-protocol-version-and-virtual-host.patch @@ -90,10 +90,10 @@ index 2be1bd39ee1341128f02e38afe5698b837735827..cca08b8c6e1e15f13326a2a7e33e7f32 @Override diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 981ac7ad6efb4024216a0967fd4c2f01245a8816..75017f7464247a4766859250453954c4b775d36f 100644 +index 2a77e7ffb748c5b7f89aa232b51e7d62732850d9..1a4778052126cde62126e04b7bbf285be07b69b6 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -302,6 +302,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -303,6 +303,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } } diff --git a/patches/server/0171-Ability-to-apply-mending-to-XP-API.patch b/patches/server/0171-Ability-to-apply-mending-to-XP-API.patch index c560f6c869..88c6907a7e 100644 --- a/patches/server/0171-Ability-to-apply-mending-to-XP-API.patch +++ b/patches/server/0171-Ability-to-apply-mending-to-XP-API.patch @@ -14,10 +14,10 @@ public net.minecraft.world.entity.ExperienceOrb durabilityToXp(I)I public net.minecraft.world.entity.ExperienceOrb xpToDurability(I)I diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index a9494390868b62824fddd2b7a95f52f3ab31d605..61baea9efa7c1b35c437f6f0a4387c7611f401c3 100644 +index 1a4778052126cde62126e04b7bbf285be07b69b6..26de9507f46a2f811cd8b0ccaf2233f12b250ae1 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1496,7 +1496,37 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1526,7 +1526,37 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } @Override diff --git a/patches/server/0184-Player.setPlayerProfile-API.patch b/patches/server/0184-Player.setPlayerProfile-API.patch index 01dfc14747..1bb9059cfe 100644 --- a/patches/server/0184-Player.setPlayerProfile-API.patch +++ b/patches/server/0184-Player.setPlayerProfile-API.patch @@ -58,7 +58,7 @@ diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/ index 61baea9efa7c1b35c437f6f0a4387c7611f401c3..9099604b5bffc92ca46c096d2d6d7d857ef22c38 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -82,6 +82,7 @@ import net.minecraft.world.entity.ai.attributes.Attributes; +@@ -83,6 +83,7 @@ import net.minecraft.world.entity.ai.attributes.Attributes; import net.minecraft.world.inventory.AbstractContainerMenu; import net.minecraft.world.level.GameType; import net.minecraft.world.level.block.Blocks; @@ -66,7 +66,7 @@ index 61baea9efa7c1b35c437f6f0a4387c7611f401c3..9099604b5bffc92ca46c096d2d6d7d85 import net.minecraft.world.level.block.entity.SignBlockEntity; import net.minecraft.world.level.border.BorderChangeListener; import net.minecraft.world.level.saveddata.maps.MapDecoration; -@@ -285,11 +286,6 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -286,11 +287,6 @@ public class CraftPlayer extends CraftHumanEntity implements Player { return server.getPlayer(getUniqueId()) != null; } @@ -78,7 +78,7 @@ index 61baea9efa7c1b35c437f6f0a4387c7611f401c3..9099604b5bffc92ca46c096d2d6d7d85 @Override public InetSocketAddress getAddress() { if (this.getHandle().connection == null) return null; -@@ -1646,8 +1642,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1676,8 +1672,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { private void untrackAndHideEntity(org.bukkit.entity.Entity entity) { // Remove this entity from the hidden player's EntityTrackerEntry @@ -95,7 +95,7 @@ index 61baea9efa7c1b35c437f6f0a4387c7611f401c3..9099604b5bffc92ca46c096d2d6d7d85 ChunkMap.TrackedEntity entry = tracker.entityMap.get(other.getId()); if (entry != null) { entry.removePlayer(this.getHandle()); -@@ -1660,8 +1663,6 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1690,8 +1693,6 @@ public class CraftPlayer extends CraftHumanEntity implements Player { this.getHandle().connection.send(new ClientboundPlayerInfoRemovePacket(List.of(otherPlayer.getUUID()))); } } @@ -104,7 +104,7 @@ index 61baea9efa7c1b35c437f6f0a4387c7611f401c3..9099604b5bffc92ca46c096d2d6d7d85 } void resetAndHideEntity(org.bukkit.entity.Entity entity) { -@@ -1738,8 +1739,38 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1768,8 +1769,38 @@ public class CraftPlayer extends CraftHumanEntity implements Player { if (entry != null && !entry.seenBy.contains(this.getHandle().connection)) { entry.updatePlayer(this.getHandle()); } @@ -144,7 +144,7 @@ index 61baea9efa7c1b35c437f6f0a4387c7611f401c3..9099604b5bffc92ca46c096d2d6d7d85 } void resetAndShowEntity(org.bukkit.entity.Entity entity) { -@@ -1752,6 +1783,36 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1782,6 +1813,36 @@ public class CraftPlayer extends CraftHumanEntity implements Player { this.trackAndShowEntity(entity); } } diff --git a/patches/server/0189-Flag-to-disable-the-channel-limit.patch b/patches/server/0189-Flag-to-disable-the-channel-limit.patch index c363509c1e..0a6870eabb 100644 --- a/patches/server/0189-Flag-to-disable-the-channel-limit.patch +++ b/patches/server/0189-Flag-to-disable-the-channel-limit.patch @@ -9,10 +9,10 @@ e.g. servers which allow and support the usage of mod packs. provide an optional flag to disable this check, at your own risk. diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 9099604b5bffc92ca46c096d2d6d7d857ef22c38..78e6946466d455f39d08df7063a494ee297a477e 100644 +index 9f2cf313791b146a6e183c805653e445e498c44e..65471cac37cd7b9cf52ef8405434ae8ecb0775d0 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -176,6 +176,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -177,6 +177,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { // Paper start private org.bukkit.event.player.PlayerResourcePackStatusEvent.Status resourcePackStatus; private String resourcePackHash; @@ -20,7 +20,7 @@ index 9099604b5bffc92ca46c096d2d6d7d857ef22c38..78e6946466d455f39d08df7063a494ee // Paper end public CraftPlayer(CraftServer server, ServerPlayer entity) { -@@ -2021,7 +2022,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2051,7 +2052,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { // Paper end public void addChannel(String channel) { diff --git a/patches/server/0196-Expand-World.spawnParticle-API-and-add-Builder.patch b/patches/server/0196-Expand-World.spawnParticle-API-and-add-Builder.patch index 8124f6610b..c8634bdeea 100644 --- a/patches/server/0196-Expand-World.spawnParticle-API-and-add-Builder.patch +++ b/patches/server/0196-Expand-World.spawnParticle-API-and-add-Builder.patch @@ -34,10 +34,10 @@ index d273673978c8270f2e0719412372039406e31f5e..65110445ff8a245742c4f7a7055f544f if (this.sendParticles(entityplayer, force, d0, d1, d2, packetplayoutworldparticles)) { // CraftBukkit diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 030ad193dc657810709817c55fb3eb9a08d41459..eaf38f39e550699fe1ab74174896c8f1cd3b0af0 100644 +index 857fac09453f99a56d41a3a57a5f36c22496a643..323bd3b006f01505f2912ab7e07cd80798a1f054 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1824,11 +1824,17 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1835,11 +1835,17 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public <T> void spawnParticle(Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, T data, boolean force) { diff --git a/patches/server/0213-Expand-Explosions-API.patch b/patches/server/0213-Expand-Explosions-API.patch index 7363a9e300..0adbb00c23 100644 --- a/patches/server/0213-Expand-Explosions-API.patch +++ b/patches/server/0213-Expand-Explosions-API.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Expand Explosions API Add Entity as a Source capability, and add more API choices, and on Location. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index eaf38f39e550699fe1ab74174896c8f1cd3b0af0..c7cf5f1eaedbeff2bd82106a0a1a670c419b2211 100644 +index 323bd3b006f01505f2912ab7e07cd80798a1f054..920579a1061cd8b46d920e48cea8ac0d6c986ad5 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -702,6 +702,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -713,6 +713,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { public boolean createExplosion(double x, double y, double z, float power, boolean setFire, boolean breakBlocks, Entity source) { return !this.world.explode(source == null ? null : ((CraftEntity) source).getHandle(), x, y, z, power, setFire, breakBlocks ? net.minecraft.world.level.Level.ExplosionInteraction.MOB : net.minecraft.world.level.Level.ExplosionInteraction.NONE).wasCanceled; } diff --git a/patches/server/0217-Implement-World.getEntity-UUID-API.patch b/patches/server/0217-Implement-World.getEntity-UUID-API.patch index 576b660a66..7d39614126 100644 --- a/patches/server/0217-Implement-World.getEntity-UUID-API.patch +++ b/patches/server/0217-Implement-World.getEntity-UUID-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Implement World.getEntity(UUID) API diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index c7cf5f1eaedbeff2bd82106a0a1a670c419b2211..0c3c47bfa9af7d0780e60598b703e0d9f906ed9f 100644 +index 920579a1061cd8b46d920e48cea8ac0d6c986ad5..ea55b206eb94a3349585435f6e7184fffccd7bd3 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1036,6 +1036,15 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1047,6 +1047,15 @@ public class CraftWorld extends CraftRegionAccessor implements World { return list; } diff --git a/patches/server/0218-InventoryCloseEvent-Reason-API.patch b/patches/server/0218-InventoryCloseEvent-Reason-API.patch index e9c5063120..89ae7d81c4 100644 --- a/patches/server/0218-InventoryCloseEvent-Reason-API.patch +++ b/patches/server/0218-InventoryCloseEvent-Reason-API.patch @@ -173,10 +173,10 @@ index 787ccb37a39bb506cf9fd8d54cf772b346981f85..f5b3190ffb9e9f92977afc9e40ddfa15 @Override public boolean isBlocking() { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 6d0800737d1e017bc841fddcbd9ac6cb0be0f4fd..25b3e7f8f8182bb5de491fc2f6debf4d7a8cd252 100644 +index b1b4513d9b86195b8c96c49990cb2bf6d3951506..9592da53e4b2ec28c71887ef68a0327c0e3ec119 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1210,7 +1210,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1240,7 +1240,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { // Close any foreign inventory if (this.getHandle().containerMenu != this.getHandle().inventoryMenu) { @@ -186,10 +186,10 @@ index 6d0800737d1e017bc841fddcbd9ac6cb0be0f4fd..25b3e7f8f8182bb5de491fc2f6debf4d // 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 a1efb66de4cb509781de498bee5c44456ad93395..9d088e25eb24af5cbb5cf3038de589313b0afe1d 100644 +index fea90633f10bad7498f8f5e90093eee2a09df549..8a856d7c65e1002d32fa5b2619606e9d08d7286b 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1236,7 +1236,7 @@ public class CraftEventFactory { +@@ -1252,7 +1252,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 @@ -198,7 +198,7 @@ index a1efb66de4cb509781de498bee5c44456ad93395..9d088e25eb24af5cbb5cf3038de58931 } CraftServer server = player.level.getCraftServer(); -@@ -1410,8 +1410,18 @@ public class CraftEventFactory { +@@ -1426,8 +1426,18 @@ public class CraftEventFactory { return event; } diff --git a/patches/server/0228-Vanished-players-don-t-have-rights.patch b/patches/server/0228-Vanished-players-don-t-have-rights.patch index 53c636e9e0..3e1b81858d 100644 --- a/patches/server/0228-Vanished-players-don-t-have-rights.patch +++ b/patches/server/0228-Vanished-players-don-t-have-rights.patch @@ -89,10 +89,10 @@ index f07e70ab26fffaec5055a7dd2571dc4d29c66d35..754e1667aadef89bbaccebc0f437197b 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 9d088e25eb24af5cbb5cf3038de589313b0afe1d..ea385119db05699e355411e779f4464067f923f1 100644 +index 8a856d7c65e1002d32fa5b2619606e9d08d7286b..171f2f3187b0f1d2e86c884cb566d23c048c337b 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1273,6 +1273,14 @@ public class CraftEventFactory { +@@ -1289,6 +1289,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/0242-Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch b/patches/server/0242-Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch index e80d50fd26..1b9cba9296 100644 --- a/patches/server/0242-Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch +++ b/patches/server/0242-Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch @@ -5,21 +5,10 @@ Subject: [PATCH] Ability to get Tile Entities from a chunk without snapshots diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java -index e4a533ace96829414844607a013831dba7a1e73e..832c6d92daaa96210a9c7edbd357ca824a60a4a5 100644 +index 579f96e6778abe1c565ee359b79cca96a43ae600..9316db9a29d446a9c4facfa956927741dffa9a27 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java -@@ -4,8 +4,10 @@ import com.google.common.base.Preconditions; - import com.google.common.base.Predicates; - import com.mojang.serialization.Codec; - import java.lang.ref.WeakReference; -+import java.util.ArrayList; - import java.util.Arrays; - import java.util.Collection; -+import java.util.List; - import java.util.Objects; - import java.util.concurrent.locks.LockSupport; - import java.util.function.BooleanSupplier; -@@ -134,6 +136,13 @@ public class CraftChunk implements Chunk { +@@ -117,6 +117,13 @@ public class CraftChunk implements Chunk { @Override public BlockState[] getTileEntities() { @@ -33,10 +22,10 @@ index e4a533ace96829414844607a013831dba7a1e73e..832c6d92daaa96210a9c7edbd357ca82 if (!this.isLoaded()) { this.getWorld().getChunkAt(x, z); // Transient load for this tick } -@@ -148,7 +157,29 @@ public class CraftChunk implements Chunk { - } +@@ -126,7 +133,29 @@ public class CraftChunk implements Chunk { + BlockState[] entities = new BlockState[chunk.blockEntities.size()]; - BlockPos position = (BlockPos) obj; + for (BlockPos position : chunk.blockEntities.keySet()) { - entities[index++] = this.worldServer.getWorld().getBlockAt(position.getX(), position.getY(), position.getZ()).getState(); + // Paper start + entities[index++] = this.worldServer.getWorld().getBlockAt(position.getX(), position.getY(), position.getZ()).getState(useSnapshot); @@ -48,15 +37,15 @@ index e4a533ace96829414844607a013831dba7a1e73e..832c6d92daaa96210a9c7edbd357ca82 + @Override + public Collection<BlockState> getTileEntities(Predicate<Block> blockPredicate, boolean useSnapshot) { + Preconditions.checkNotNull(blockPredicate, "blockPredicate"); -+ if (!isLoaded()) { -+ getWorld().getChunkAt(x, z); // Transient load for this tick ++ if (!this.isLoaded()) { ++ this.getWorld().getChunkAt(this.x, this.z); // Transient load for this tick + } -+ net.minecraft.world.level.chunk.LevelChunk chunk = getHandle(); ++ ChunkAccess chunk = this.getHandle(ChunkStatus.FULL); + -+ List<BlockState> entities = new ArrayList<>(); ++ java.util.List<BlockState> entities = new java.util.ArrayList<>(); + + for (BlockPos position : chunk.blockEntities.keySet()) { -+ Block block = worldServer.getWorld().getBlockAt(position.getX(), position.getY(), position.getZ()); ++ Block block = this.worldServer.getWorld().getBlockAt(position.getX(), position.getY(), position.getZ()); + if (blockPredicate.test(block)) { + entities.add(block.getState(useSnapshot)); + } diff --git a/patches/server/0247-Optimize-CraftBlockData-Creation.patch b/patches/server/0247-Optimize-CraftBlockData-Creation.patch index dfda501c29..a2f88c22c1 100644 --- a/patches/server/0247-Optimize-CraftBlockData-Creation.patch +++ b/patches/server/0247-Optimize-CraftBlockData-Creation.patch @@ -26,10 +26,10 @@ index 0eb877c80c6492d03681c70f7866ad705a62454e..7cc6dcb128f2792fc32bb8f50e4c94d6 // Paper start protected boolean shapeExceedsCube = true; diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java -index e5a496b72073f75af2df4cea0cf367f47ad9f9f3..ffdd7638d0b88f79ae981924d1c42d2fda2b284e 100644 +index d293ba4f1c4a095c7aee7e4b1b06ab4214ff821c..ccd511f189a9ec57564b2372d7f662da15ef3bba 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java -@@ -550,7 +550,17 @@ public class CraftBlockData implements BlockData { +@@ -553,7 +553,17 @@ public class CraftBlockData implements BlockData { return craft; } diff --git a/patches/server/0252-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch b/patches/server/0252-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch index 97454eaaf0..b67f25d537 100644 --- a/patches/server/0252-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch +++ b/patches/server/0252-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Make CraftWorld#loadChunk(int, int, false) load unconverted diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 0c3c47bfa9af7d0780e60598b703e0d9f906ed9f..dfd87e2711e5bca09e29071375fec239e4e7538c 100644 +index ea55b206eb94a3349585435f6e7184fffccd7bd3..577f488cab5219d2cad203972731bd14a28e869e 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -391,7 +391,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -403,7 +403,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public boolean loadChunk(int x, int z, boolean generate) { org.spigotmc.AsyncCatcher.catchOp("chunk load"); // Spigot diff --git a/patches/server/0254-Expose-attack-cooldown-methods-for-Player.patch b/patches/server/0254-Expose-attack-cooldown-methods-for-Player.patch index d93ea52e7a..c288168594 100644 --- a/patches/server/0254-Expose-attack-cooldown-methods-for-Player.patch +++ b/patches/server/0254-Expose-attack-cooldown-methods-for-Player.patch @@ -8,7 +8,7 @@ diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/ index cd1a2796f8a16775f6fc5fd43d46a398711601ee..b133bb407b88d7bc3ab8cb2011e8ad9e65df4bcd 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -2778,6 +2778,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2808,6 +2808,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player { return this.adventure$pointers; } diff --git a/patches/server/0255-Improve-death-events.patch b/patches/server/0255-Improve-death-events.patch index b2d1b2eb4f..d633a6b104 100644 --- a/patches/server/0255-Improve-death-events.patch +++ b/patches/server/0255-Improve-death-events.patch @@ -355,7 +355,7 @@ diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/ index b133bb407b88d7bc3ab8cb2011e8ad9e65df4bcd..8fdc2b677ef881b28e49f9bf2b39db065ea3d014 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -2281,7 +2281,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2311,7 +2311,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } public void sendHealthUpdate() { @@ -372,10 +372,10 @@ index b133bb407b88d7bc3ab8cb2011e8ad9e65df4bcd..8fdc2b677ef881b28e49f9bf2b39db06 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 ea385119db05699e355411e779f4464067f923f1..ea83f115d96302731ee7576b682bee95259422de 100644 +index 171f2f3187b0f1d2e86c884cb566d23c048c337b..b8dbc05857e5fa1c0bacabd022be3669884aba40 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -806,9 +806,16 @@ public class CraftEventFactory { +@@ -822,9 +822,16 @@ public class CraftEventFactory { public static EntityDeathEvent callEntityDeathEvent(net.minecraft.world.entity.LivingEntity victim, List<org.bukkit.inventory.ItemStack> drops) { CraftLivingEntity entity = (CraftLivingEntity) victim.getBukkitEntity(); EntityDeathEvent event = new EntityDeathEvent(entity, drops, victim.getExpReward()); @@ -392,7 +392,7 @@ index ea385119db05699e355411e779f4464067f923f1..ea83f115d96302731ee7576b682bee95 victim.expToDrop = event.getDroppedExp(); for (org.bukkit.inventory.ItemStack stack : event.getDrops()) { -@@ -825,8 +832,15 @@ public class CraftEventFactory { +@@ -841,8 +848,15 @@ public class CraftEventFactory { PlayerDeathEvent event = new PlayerDeathEvent(entity, drops, victim.getExpReward(), 0, deathMessage, stringDeathMessage); // Paper - Adventure event.setKeepInventory(keepInventory); event.setKeepLevel(victim.keepLevel); // SPIGOT-2222: pre-set keepLevel @@ -408,7 +408,7 @@ index ea385119db05699e355411e779f4464067f923f1..ea83f115d96302731ee7576b682bee95 victim.keepLevel = event.getKeepLevel(); victim.newLevel = event.getNewLevel(); -@@ -843,6 +857,31 @@ public class CraftEventFactory { +@@ -859,6 +873,31 @@ public class CraftEventFactory { return event; } diff --git a/patches/server/0269-Add-sun-related-API.patch b/patches/server/0269-Add-sun-related-API.patch index 964aca3d44..3a8ec3995c 100644 --- a/patches/server/0269-Add-sun-related-API.patch +++ b/patches/server/0269-Add-sun-related-API.patch @@ -7,10 +7,10 @@ Subject: [PATCH] Add sun related API public net.minecraft.world.entity.Mob isSunBurnTick()Z diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index dfd87e2711e5bca09e29071375fec239e4e7538c..3889e880e3a8a21e38d613c552829ad998c24fd5 100644 +index 577f488cab5219d2cad203972731bd14a28e869e..fd908bbcbb652b2b6bc8703c5cdf1374b77a70dd 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -678,6 +678,13 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -689,6 +689,13 @@ public class CraftWorld extends CraftRegionAccessor implements World { } } diff --git a/patches/server/0292-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch b/patches/server/0292-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch index 922e184954..35e6d51ef3 100644 --- a/patches/server/0292-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch +++ b/patches/server/0292-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch @@ -106,10 +106,10 @@ index 69a1852905dd4724c30ac8ab88c14251eee2c371..17b3d5de58a9ef3acc67624c46cd6bbd public Location getLastDeathLocation() { if (this.getData().contains("LastDeathLocation", 10)) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 8fdc2b677ef881b28e49f9bf2b39db065ea3d014..05fd3758b4ac1e2a91dfee7862dba2c2a7850e7b 100644 +index 73e8083b3ab009904ff7bc2003dfb506ee481d4e..5d5823871ea23eae07facb5eecf1708430089b84 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -177,6 +177,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -178,6 +178,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { private org.bukkit.event.player.PlayerResourcePackStatusEvent.Status resourcePackStatus; private String resourcePackHash; private static final boolean DISABLE_CHANNEL_LIMIT = System.getProperty("paper.disableChannelLimit") != null; // Paper - add a flag to disable the channel limit @@ -117,7 +117,7 @@ index 8fdc2b677ef881b28e49f9bf2b39db065ea3d014..05fd3758b4ac1e2a91dfee7862dba2c2 // Paper end public CraftPlayer(CraftServer server, ServerPlayer entity) { -@@ -1893,6 +1894,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1923,6 +1924,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player { this.firstPlayed = firstPlayed; } @@ -136,7 +136,7 @@ index 8fdc2b677ef881b28e49f9bf2b39db065ea3d014..05fd3758b4ac1e2a91dfee7862dba2c2 public void readExtraData(CompoundTag nbttagcompound) { this.hasPlayedBefore = true; if (nbttagcompound.contains("bukkit")) { -@@ -1915,6 +1928,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1945,6 +1958,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } public void setExtraData(CompoundTag nbttagcompound) { @@ -145,7 +145,7 @@ index 8fdc2b677ef881b28e49f9bf2b39db065ea3d014..05fd3758b4ac1e2a91dfee7862dba2c2 if (!nbttagcompound.contains("bukkit")) { nbttagcompound.put("bukkit", new CompoundTag()); } -@@ -1929,6 +1944,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1959,6 +1974,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player { data.putLong("firstPlayed", this.getFirstPlayed()); data.putLong("lastPlayed", System.currentTimeMillis()); data.putString("lastKnownName", handle.getScoreboardName()); diff --git a/patches/server/0294-Block-Entity-remove-from-being-called-on-Players.patch b/patches/server/0294-Block-Entity-remove-from-being-called-on-Players.patch index fa3c358193..f8c9bfacc4 100644 --- a/patches/server/0294-Block-Entity-remove-from-being-called-on-Players.patch +++ b/patches/server/0294-Block-Entity-remove-from-being-called-on-Players.patch @@ -12,10 +12,10 @@ Player we will look at limiting the scope of this change. It appears to be unintentional in the few cases we've seen so far. diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 05fd3758b4ac1e2a91dfee7862dba2c2a7850e7b..b89faca2cbb7fd597175955ebe1f50c6122f7529 100644 +index 5d5823871ea23eae07facb5eecf1708430089b84..da70f20983d3d000fa7731a1388c86a2fd087c4c 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -2825,6 +2825,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2855,6 +2855,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { public void resetCooldown() { getHandle().resetAttackStrengthTicker(); } diff --git a/patches/server/0311-Add-Heightmap-API.patch b/patches/server/0311-Add-Heightmap-API.patch index 4025bf9b6f..5685f02bd6 100644 --- a/patches/server/0311-Add-Heightmap-API.patch +++ b/patches/server/0311-Add-Heightmap-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add Heightmap API diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 3889e880e3a8a21e38d613c552829ad998c24fd5..05b2c78c64dc9258b2a6621bc2aed041d66c33ee 100644 +index fd908bbcbb652b2b6bc8703c5cdf1374b77a70dd..d828b777ae2435579d5f7ea51f920e77a684bb7b 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -221,6 +221,29 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -222,6 +222,29 @@ public class CraftWorld extends CraftRegionAccessor implements World { return this.getHighestBlockYAt(x, z, org.bukkit.HeightMap.MOTION_BLOCKING); } diff --git a/patches/server/0316-Configurable-Keep-Spawn-Loaded-range-per-world.patch b/patches/server/0316-Configurable-Keep-Spawn-Loaded-range-per-world.patch index 8344f05531..9ecd1cde37 100644 --- a/patches/server/0316-Configurable-Keep-Spawn-Loaded-range-per-world.patch +++ b/patches/server/0316-Configurable-Keep-Spawn-Loaded-range-per-world.patch @@ -200,10 +200,10 @@ index 4d2348df25410a0b5364eec066880326d6667dad..286aad3205ef8a9e21a47ef07893844f this.maxCount = i * i; } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 05b2c78c64dc9258b2a6621bc2aed041d66c33ee..ba6d74692039c39660ed5e1d960cb090553a82f0 100644 +index d828b777ae2435579d5f7ea51f920e77a684bb7b..112d6202635d8e9ce101248d69cc7ab5e1feb2cb 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1345,15 +1345,21 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1356,15 +1356,21 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public void setKeepSpawnInMemory(boolean keepLoaded) { diff --git a/patches/server/0319-Fix-World-isChunkGenerated-calls.patch b/patches/server/0319-Fix-World-isChunkGenerated-calls.patch index c323e2617d..cec8db868d 100644 --- a/patches/server/0319-Fix-World-isChunkGenerated-calls.patch +++ b/patches/server/0319-Fix-World-isChunkGenerated-calls.patch @@ -156,10 +156,10 @@ index 8f729134d8f024678f3f5927059791e28ccb5b90..b294ef87fb93e7f4651dc04128124f29 } catch (Throwable throwable) { if (dataoutputstream != null) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index ba6d74692039c39660ed5e1d960cb090553a82f0..19f711f82386aaa731699f60ddb95ac208bf3a19 100644 +index 112d6202635d8e9ce101248d69cc7ab5e1feb2cb..7f04e2009f4917f3350f9e223891cdd9b394d163 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -298,9 +298,23 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -310,9 +310,23 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public boolean isChunkGenerated(int x, int z) { @@ -185,7 +185,7 @@ index ba6d74692039c39660ed5e1d960cb090553a82f0..19f711f82386aaa731699f60ddb95ac2 throw new RuntimeException(ex); } } -@@ -414,20 +428,48 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -426,20 +440,48 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public boolean loadChunk(int x, int z, boolean generate) { org.spigotmc.AsyncCatcher.catchOp("chunk load"); // Spigot diff --git a/patches/server/0343-Anti-Xray.patch b/patches/server/0343-Anti-Xray.patch index 9033e412d2..7e33189971 100644 --- a/patches/server/0343-Anti-Xray.patch +++ b/patches/server/0343-Anti-Xray.patch @@ -1226,7 +1226,7 @@ index 508c2fff8d8e0c6f37b6c4e3b72ba772c2ab2ee5..e254b2d04e4fc1dc76c26f61ea38aeb2 } 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 b55080c38b1ac4581b73f0d55ac8a432824a13a4..f5bdb76e554c9fc492dbf2a67166845ada0ac103 100644 +index f5dcd970fc2828a4ba9ff2c0d495aa8d8cd4ed74..b1471b43392863ce1f2861d07baddbd711e761dc 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java @@ -93,7 +93,7 @@ public class LevelChunk extends ChunkAccess { @@ -1559,10 +1559,10 @@ index b1c5e5ecf2488d1a6f0a5261d4ba8958de9659ae..4138ba8bdf6f359327dfc86d3402b787 // CraftBukkit end diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java -index 832c6d92daaa96210a9c7edbd357ca824a60a4a5..0fadc763fb482cf9f3b51ed44427029bec9f7f63 100644 +index 9316db9a29d446a9c4facfa956927741dffa9a27..72743bf4a8583c712558fb3ed1441fc7b9d2708c 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java -@@ -55,7 +55,7 @@ public class CraftChunk implements Chunk { +@@ -51,7 +51,7 @@ public class CraftChunk implements Chunk { private final ServerLevel worldServer; private final int x; private final int z; @@ -1572,7 +1572,7 @@ index 832c6d92daaa96210a9c7edbd357ca824a60a4a5..0fadc763fb482cf9f3b51ed44427029b public CraftChunk(net.minecraft.world.level.chunk.LevelChunk chunk) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 804f39d980907ddfb71399bd08db14a690d726ba..5101993aabe77289b56f3ae33900a97d2177fe33 100644 +index c27e18a2ba0558f9e7fdc2fb3ed5c6ddc564917e..f870f488cdb78ef1652ce6726d5133d05997e0ab 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -2243,7 +2243,7 @@ public final class CraftServer implements Server { @@ -1585,10 +1585,10 @@ index 804f39d980907ddfb71399bd08db14a690d726ba..5101993aabe77289b56f3ae33900a97d @Override diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 19f711f82386aaa731699f60ddb95ac208bf3a19..c46e875709d83a1684c5e37c6a11bb3e9acd20e5 100644 +index 7f04e2009f4917f3350f9e223891cdd9b394d163..a17ae89a82958bdc3bfa0553440e2887585693c1 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -409,11 +409,16 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -421,11 +421,16 @@ public class CraftWorld extends CraftRegionAccessor implements World { List<ServerPlayer> playersInRange = playerChunk.playerProvider.getPlayers(playerChunk.getPos(), false); if (playersInRange.isEmpty()) return true; // Paper - rewrite player chunk loader diff --git a/patches/server/0357-add-hand-to-BlockMultiPlaceEvent.patch b/patches/server/0357-add-hand-to-BlockMultiPlaceEvent.patch index 2aea3b5aab..294afa1a91 100644 --- a/patches/server/0357-add-hand-to-BlockMultiPlaceEvent.patch +++ b/patches/server/0357-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 bdd4572489cd12ea19560fe82006e3fe4db29b50..cdfd63b5d1a9c6fc9a957730adf2406decef633b 100644 +index b8dbc05857e5fa1c0bacabd022be3669884aba40..e35f44571666d125bb2ce6c30037c6298e428c3f 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -348,13 +348,18 @@ public class CraftEventFactory { +@@ -364,13 +364,18 @@ public class CraftEventFactory { } org.bukkit.inventory.ItemStack item; diff --git a/patches/server/0361-Optimise-Chunk-getFluid.patch b/patches/server/0361-Optimise-Chunk-getFluid.patch index 74e6ef2a60..5d78deb156 100644 --- a/patches/server/0361-Optimise-Chunk-getFluid.patch +++ b/patches/server/0361-Optimise-Chunk-getFluid.patch @@ -8,10 +8,10 @@ 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 f5bdb76e554c9fc492dbf2a67166845ada0ac103..39defceb694875322b3433a3ad4bb16256413ea8 100644 +index b1471b43392863ce1f2861d07baddbd711e761dc..703830416a0483e960643bee269fe01e170112bd 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -@@ -427,18 +427,20 @@ public class LevelChunk extends ChunkAccess { +@@ -420,18 +420,20 @@ public class LevelChunk extends ChunkAccess { } public FluidState getFluidState(int x, int y, int z) { @@ -38,7 +38,7 @@ index f5bdb76e554c9fc492dbf2a67166845ada0ac103..39defceb694875322b3433a3ad4bb162 } catch (Throwable throwable) { CrashReport crashreport = CrashReport.forThrowable(throwable, "Getting fluid state"); CrashReportCategory crashreportsystemdetails = crashreport.addCategory("Block being got"); -@@ -448,6 +450,7 @@ public class LevelChunk extends ChunkAccess { +@@ -441,6 +443,7 @@ public class LevelChunk extends ChunkAccess { }); throw new ReportedException(crashreport); } diff --git a/patches/server/0375-Improved-Watchdog-Support.patch b/patches/server/0375-Improved-Watchdog-Support.patch index 2ab8829d27..9ca427610e 100644 --- a/patches/server/0375-Improved-Watchdog-Support.patch +++ b/patches/server/0375-Improved-Watchdog-Support.patch @@ -306,10 +306,10 @@ index 637092303bbce94fd37f193367264d51b855847d..31edf8f2c683f56e53040e735d015ca6 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 39defceb694875322b3433a3ad4bb16256413ea8..86f19b7ed15c2029c5483f21b44895d8982a90b8 100644 +index 703830416a0483e960643bee269fe01e170112bd..ee1c9f2c8dd30b3f32a6d49aa1c43148f4e5ccac 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -@@ -1230,6 +1230,7 @@ public class LevelChunk extends ChunkAccess { +@@ -1225,6 +1225,7 @@ public class LevelChunk extends ChunkAccess { gameprofilerfiller.pop(); } catch (Throwable throwable) { diff --git a/patches/server/0381-Implement-Player-Client-Options-API.patch b/patches/server/0381-Implement-Player-Client-Options-API.patch index 5aede2f515..f00586d28f 100644 --- a/patches/server/0381-Implement-Player-Client-Options-API.patch +++ b/patches/server/0381-Implement-Player-Client-Options-API.patch @@ -116,10 +116,10 @@ index 71fac1a579b375759462b843d9ef7c8a2a463db5..2d54f2abae82521fbd34aa046f26ec8e if (getMainArm() != packet.mainHand()) { PlayerChangedMainHandEvent event = new PlayerChangedMainHandEvent(this.getBukkitEntity(), getMainArm() == HumanoidArm.LEFT ? MainHand.LEFT : MainHand.RIGHT); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index fdad04d657612979b5b9d30d132ca38efe81858d..254ff289883b37d42095ee286b138015f8dfb81f 100644 +index a6ac9a628cbfeb021934221105a6a193bef61f56..69d4554bb79da980acc4d5de8c00d331f3bd4fea 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -621,6 +621,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -622,6 +622,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player { connection.disconnect(message == null ? net.kyori.adventure.text.Component.empty() : message); } } diff --git a/patches/server/0388-Fix-numerous-item-duplication-issues-and-teleport-is.patch b/patches/server/0388-Fix-numerous-item-duplication-issues-and-teleport-is.patch index ddd87fafe1..daf9eb7706 100644 --- a/patches/server/0388-Fix-numerous-item-duplication-issues-and-teleport-is.patch +++ b/patches/server/0388-Fix-numerous-item-duplication-issues-and-teleport-is.patch @@ -16,7 +16,7 @@ So even if something NEW comes up, it would be impossible to drop the same item twice because the source was destroyed. diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index d3f9954bda58b459e2f64b5d949807ab60905d48..c69cc5dadac4bd81f08258f0420b7acd506cb04a 100644 +index d04c5cd4afd09fbe511811a198135c19ee99c036..52339e85607adb77c260744a48701d8d8da4ef2e 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -2329,11 +2329,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { @@ -80,7 +80,7 @@ index d3f9954bda58b459e2f64b5d949807ab60905d48..c69cc5dadac4bd81f08258f0420b7acd public float getBlockExplosionResistance(Explosion explosion, BlockGetter world, BlockPos pos, BlockState blockState, FluidState fluidState, float max) { diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 6541caa4a574271fa940d1dceef434655ffd8aa9..b0a57ff0780c3f37110a9c3640f29cb08daa52d5 100644 +index f7ae0c52313f4d8c64849605148f8293e0e96141..65f5381c3362b16fa709728458f87b9283b73291 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -1636,9 +1636,9 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -135,10 +135,10 @@ index dbb4bfb3d1f1ce2e435ca531be36ea448c0e3212..3be5ea477cb3dd3ce75f3feced8daf7c } } diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index cdfd63b5d1a9c6fc9a957730adf2406decef633b..440806cc3d7852f9cf3648a747c48236afff7e80 100644 +index e35f44571666d125bb2ce6c30037c6298e428c3f..81d1654ed3520df5cecb929b7089528893b2fd29 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -809,6 +809,11 @@ public class CraftEventFactory { +@@ -825,6 +825,11 @@ public class CraftEventFactory { } public static EntityDeathEvent callEntityDeathEvent(net.minecraft.world.entity.LivingEntity victim, List<org.bukkit.inventory.ItemStack> drops) { @@ -150,7 +150,7 @@ index cdfd63b5d1a9c6fc9a957730adf2406decef633b..440806cc3d7852f9cf3648a747c48236 CraftLivingEntity entity = (CraftLivingEntity) victim.getBukkitEntity(); EntityDeathEvent event = new EntityDeathEvent(entity, drops, victim.getExpReward()); populateFields(victim, event); // Paper - make cancellable -@@ -822,11 +827,13 @@ public class CraftEventFactory { +@@ -838,11 +843,13 @@ public class CraftEventFactory { playDeathSound(victim, event); // Paper end victim.expToDrop = event.getDroppedExp(); diff --git a/patches/server/0396-Deobfuscate-stacktraces-in-log-messages-crash-report.patch b/patches/server/0396-Deobfuscate-stacktraces-in-log-messages-crash-report.patch index 28e1c28a6c..92d371555e 100644 --- a/patches/server/0396-Deobfuscate-stacktraces-in-log-messages-crash-report.patch +++ b/patches/server/0396-Deobfuscate-stacktraces-in-log-messages-crash-report.patch @@ -592,10 +592,10 @@ index 6599f874d9f97e9ef4862039ecad7277bbc5fd91..7edd4b88eb0476f0630630bc4681e859 } } 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 86f19b7ed15c2029c5483f21b44895d8982a90b8..05b8b37a4b1089b859b399323ecda8f23e9f6e67 100644 +index ee1c9f2c8dd30b3f32a6d49aa1c43148f4e5ccac..73a3f9eae86df8e9afd08ee9da4c1b8e16dededd 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -@@ -640,7 +640,7 @@ public class LevelChunk extends ChunkAccess { +@@ -633,7 +633,7 @@ public class LevelChunk extends ChunkAccess { + " (" + getBlockState(blockposition) + ") where there was no entity tile!\n" + "Chunk coordinates: " + (this.chunkPos.x * 16) + "," + (this.chunkPos.z * 16) + "\nWorld: " + level.getLevel().dimension().location()); diff --git a/patches/server/0399-Option-for-maximum-exp-value-when-merging-orbs.patch b/patches/server/0399-Option-for-maximum-exp-value-when-merging-orbs.patch index 4a49521674..c55717a469 100644 --- a/patches/server/0399-Option-for-maximum-exp-value-when-merging-orbs.patch +++ b/patches/server/0399-Option-for-maximum-exp-value-when-merging-orbs.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Option for maximum exp value when merging orbs diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 440806cc3d7852f9cf3648a747c48236afff7e80..e40053ef61b49e3c9269595f714a6c93e872fd6c 100644 +index 81d1654ed3520df5cecb929b7089528893b2fd29..5f61fe52c6fc15c3114a6ba44eea6d219228f26e 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -630,16 +630,30 @@ public class CraftEventFactory { +@@ -646,16 +646,30 @@ public class CraftEventFactory { net.minecraft.world.entity.ExperienceOrb xp = (net.minecraft.world.entity.ExperienceOrb) entity; double radius = world.spigotConfig.expMerge; if (radius > 0) { diff --git a/patches/server/0400-ExperienceOrbMergeEvent.patch b/patches/server/0400-ExperienceOrbMergeEvent.patch index 2da263e110..33df908fa4 100644 --- a/patches/server/0400-ExperienceOrbMergeEvent.patch +++ b/patches/server/0400-ExperienceOrbMergeEvent.patch @@ -9,10 +9,10 @@ Plugins can cancel this if they want to ensure experience orbs do not lose impor metadata such as spawn reason, or conditionally move data from source to target. diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index e40053ef61b49e3c9269595f714a6c93e872fd6c..eb8b13becd2d72c4cac12a11e27aa467d1901b7e 100644 +index 5f61fe52c6fc15c3114a6ba44eea6d219228f26e..6045ebda7250545c255c1e1c1eb614deff3dfc96 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -640,7 +640,7 @@ public class CraftEventFactory { +@@ -656,7 +656,7 @@ public class CraftEventFactory { if (e instanceof net.minecraft.world.entity.ExperienceOrb) { net.minecraft.world.entity.ExperienceOrb loopItem = (net.minecraft.world.entity.ExperienceOrb) e; // Paper start diff --git a/patches/server/0427-Fix-Per-World-Difficulty-Remembering-Difficulty.patch b/patches/server/0427-Fix-Per-World-Difficulty-Remembering-Difficulty.patch index c7c5011cda..379ebe0dd4 100644 --- a/patches/server/0427-Fix-Per-World-Difficulty-Remembering-Difficulty.patch +++ b/patches/server/0427-Fix-Per-World-Difficulty-Remembering-Difficulty.patch @@ -102,7 +102,7 @@ index 77f502c279ec471d65f6cc007d2bc08e3b34d79a..1517c09ccd95448cb0fce0f9ffbb7bd2 } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 9e278a740cf7cb7a593d76f01d6aa590407b087b..5b29bdd8c39bcdec81ed58b8e06ec6b6940363ab 100644 +index fcf43140189efb93e77807a2a6bb982132fef787..777f114e9cb0cfa3633b9a89116be1c73d552065 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -941,8 +941,8 @@ public final class CraftServer implements Server { @@ -117,10 +117,10 @@ index 9e278a740cf7cb7a593d76f01d6aa590407b087b..5b29bdd8c39bcdec81ed58b8e06ec6b6 for (SpawnCategory spawnCategory : SpawnCategory.values()) { if (CraftSpawnCategory.isValidForLimits(spawnCategory)) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index c46e875709d83a1684c5e37c6a11bb3e9acd20e5..efa01ad6ac0757da033f2bdf7729717239e474f2 100644 +index a17ae89a82958bdc3bfa0553440e2887585693c1..0084dceef60b23fa79fadc0a3c1a06c1a3b048cd 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1146,7 +1146,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1157,7 +1157,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public void setDifficulty(Difficulty difficulty) { diff --git a/patches/server/0431-Add-Plugin-Tickets-to-API-Chunk-Methods.patch b/patches/server/0431-Add-Plugin-Tickets-to-API-Chunk-Methods.patch index c8d93c303e..33a24749bf 100644 --- a/patches/server/0431-Add-Plugin-Tickets-to-API-Chunk-Methods.patch +++ b/patches/server/0431-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 5b29bdd8c39bcdec81ed58b8e06ec6b6940363ab..fb98133b733b86596272609533d311633cbf9231 100644 +index 777f114e9cb0cfa3633b9a89116be1c73d552065..4056ba7e9860c8eb8ccd265d9c5ca575c1cabd24 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -369,7 +369,7 @@ public final class CraftServer implements Server { @@ -44,33 +44,38 @@ index 5b29bdd8c39bcdec81ed58b8e06ec6b6940363ab..fb98133b733b86596272609533d31163 this.printSaveWarning = false; console.autosavePeriod = this.configuration.getInt("ticks-per.autosave"); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index efa01ad6ac0757da033f2bdf7729717239e474f2..977004b4b5a294c4eab2995777df6fb1faff4625 100644 +index 0084dceef60b23fa79fadc0a3c1a06c1a3b048cd..3cf399c2e698af057e8e3c7036d8967318e0c415 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -281,8 +281,21 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -282,7 +282,13 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public Chunk getChunkAt(int x, int z) { -- return this.world.getChunkSource().getChunk(x, z, true).bukkitChunk; +- net.minecraft.world.level.chunk.LevelChunk chunk = (net.minecraft.world.level.chunk.LevelChunk) this.world.getChunk(x, z, ChunkStatus.FULL, true); + // Paper start - add ticket to hold chunk for a little while longer if plugin accesses it -+ net.minecraft.world.level.chunk.LevelChunk chunk = world.getChunkSource().getChunkAtIfLoadedImmediately(x, z); ++ net.minecraft.world.level.chunk.LevelChunk chunk = this.world.getChunkSource().getChunkAtIfLoadedImmediately(x, z); + if (chunk == null) { -+ addTicket(x, z); ++ this.addTicket(x, z); + chunk = this.world.getChunkSource().getChunk(x, z, true); + } -+ return chunk.bukkitChunk; + // Paper end -+ } -+ + return new CraftChunk(chunk); + } + +@@ -296,6 +302,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { + return new CraftChunk(this.getHandle(), x, z); + } + + // Paper start + private void addTicket(int x, int z) { -+ io.papermc.paper.util.MCUtil.MAIN_EXECUTOR.execute(() -> world.getChunkSource().addRegionTicket(TicketType.PLUGIN, new ChunkPos(x, z), 0, Unit.INSTANCE)); // Paper - } ++ io.papermc.paper.util.MCUtil.MAIN_EXECUTOR.execute(() -> this.world.getChunkSource().addRegionTicket(TicketType.PLUGIN, new ChunkPos(x, z), 0, Unit.INSTANCE)); // Paper ++ } + // Paper end - ++ @Override public Chunk getChunkAt(Block block) { -@@ -349,7 +362,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { + Preconditions.checkArgument(block != null, "null block"); +@@ -361,7 +373,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { public boolean unloadChunkRequest(int x, int z) { org.spigotmc.AsyncCatcher.catchOp("chunk unload"); // Spigot if (this.isChunkLoaded(x, z)) { @@ -79,7 +84,7 @@ index efa01ad6ac0757da033f2bdf7729717239e474f2..977004b4b5a294c4eab2995777df6fb1 } return true; -@@ -435,9 +448,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -447,9 +459,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { org.spigotmc.AsyncCatcher.catchOp("chunk load"); // Spigot // Paper start - Optimize this method ChunkPos chunkPos = new ChunkPos(x, z); @@ -93,7 +98,7 @@ index efa01ad6ac0757da033f2bdf7729717239e474f2..977004b4b5a294c4eab2995777df6fb1 if (immediate == null) { immediate = world.getChunkSource().chunkMap.getUnloadingChunk(x, z); } -@@ -445,7 +461,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -457,7 +472,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { if (!(immediate instanceof ImposterProtoChunk) && !(immediate instanceof net.minecraft.world.level.chunk.LevelChunk)) { return false; // not full status } @@ -102,7 +107,7 @@ index efa01ad6ac0757da033f2bdf7729717239e474f2..977004b4b5a294c4eab2995777df6fb1 world.getChunk(x, z); // make sure we're at ticket level 32 or lower return true; } -@@ -471,7 +487,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -483,7 +498,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { // we do this so we do not re-read the chunk data on disk } @@ -111,11 +116,11 @@ index efa01ad6ac0757da033f2bdf7729717239e474f2..977004b4b5a294c4eab2995777df6fb1 world.getChunkSource().getChunk(x, z, ChunkStatus.FULL, true); return true; // Paper end -@@ -2164,6 +2180,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -2175,6 +2190,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { io.papermc.paper.chunk.system.ChunkSystem.scheduleChunkLoad(this.getHandle(), x, z, gen, ChunkStatus.FULL, true, priority, (c) -> { net.minecraft.server.MinecraftServer.getServer().scheduleOnMain(() -> { net.minecraft.world.level.chunk.LevelChunk chunk = (net.minecraft.world.level.chunk.LevelChunk)c; -+ if (chunk != null) addTicket(x, z); // Paper - ret.complete(chunk == null ? null : chunk.getBukkitChunk()); ++ if (chunk != null) this.addTicket(x, z); // Paper + ret.complete(chunk == null ? null : new CraftChunk(chunk)); }); }); diff --git a/patches/server/0444-Add-PrepareResultEvent.patch b/patches/server/0444-Add-PrepareResultEvent.patch index b07620901d..37ab622773 100644 --- a/patches/server/0444-Add-PrepareResultEvent.patch +++ b/patches/server/0444-Add-PrepareResultEvent.patch @@ -94,10 +94,10 @@ index 665b01ff3579c8fd87074edfc6da6b7ef07693b2..24c31e96be460bcb5062a1fcf7f86c1a private void setupRecipeList(Container input, ItemStack stack) { diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 1061f45f20ff085c88123e7ca9aa05f8927035e2..b8a3bdb98ce4be5813996d178da06910b13d38bd 100644 +index 6045ebda7250545c255c1e1c1eb614deff3dfc96..7d409becab302fdd5c3f3eaf7288cbda7de4722d 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1599,26 +1599,53 @@ public class CraftEventFactory { +@@ -1615,26 +1615,53 @@ public class CraftEventFactory { return event; } diff --git a/patches/server/0456-Brand-support.patch b/patches/server/0456-Brand-support.patch index b67ae47f4a..4bfd3f853c 100644 --- a/patches/server/0456-Brand-support.patch +++ b/patches/server/0456-Brand-support.patch @@ -56,10 +56,10 @@ index 1517c09ccd95448cb0fce0f9ffbb7bd2e704113b..221a695acf3cbeaeaf9eda818b6cf809 return (!this.player.joining && !this.connection.isConnected()) || this.processedDisconnect; // Paper } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 5d4ad1e41a6a0a4b520645b3dccbaff15f52d044..57641d5d1aea6b322198110dc2430055541fd5c0 100644 +index 99ebc5c686b295c0c66f0073e2ede10a79b80f5c..cefac7bf8a7a73f3d195d9ed66d82f0e94462c5c 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -2952,6 +2952,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2982,6 +2982,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { // Paper end }; diff --git a/patches/server/0460-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch b/patches/server/0460-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch index e7bf385739..b854302b1d 100644 --- a/patches/server/0460-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch +++ b/patches/server/0460-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch @@ -21,10 +21,10 @@ index 06d20e9fde26540d1575975345f3d69405f767d0..959a8a170363227bb8ca833d8399f0c4 // if this keepSpawnInMemory is false a plugin has already removed our tickets, do not re-add this.removeTicketsForSpawn(this.paperConfig().spawn.keepSpawnLoadedRange * 16, prevSpawn); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 977004b4b5a294c4eab2995777df6fb1faff4625..217725e90d3c820467fe9a3b6a7116aeac255105 100644 +index 3cf399c2e698af057e8e3c7036d8967318e0c415..47d4a61934f07836d9275841fa566bf1d6851381 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -261,12 +261,14 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -262,12 +262,14 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public boolean setSpawnLocation(int x, int y, int z, float angle) { try { diff --git a/patches/server/0463-Add-BellRingEvent.patch b/patches/server/0463-Add-BellRingEvent.patch index cd1aafe4c3..b03673d2e8 100644 --- a/patches/server/0463-Add-BellRingEvent.patch +++ b/patches/server/0463-Add-BellRingEvent.patch @@ -6,23 +6,20 @@ Subject: [PATCH] Add BellRingEvent 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/net/minecraft/world/level/block/BellBlock.java b/src/main/java/net/minecraft/world/level/block/BellBlock.java -index 8ccf71bddb2637a9e468e3d958665bbd58c37647..8878d8882d7aee4d44ad8339daff180812912649 100644 ---- a/src/main/java/net/minecraft/world/level/block/BellBlock.java -+++ b/src/main/java/net/minecraft/world/level/block/BellBlock.java -@@ -3,6 +3,7 @@ package net.minecraft.world.level.block; - import javax.annotation.Nullable; - import net.minecraft.core.BlockPos; - import net.minecraft.core.Direction; -+import io.papermc.paper.util.MCUtil; - import net.minecraft.sounds.SoundEvents; - import net.minecraft.sounds.SoundSource; - import net.minecraft.stats.Stats; -@@ -131,6 +132,7 @@ public class BellBlock extends BaseEntityBlock { - direction = world.getBlockState(pos).getValue(FACING); - } +diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +index 7d409becab302fdd5c3f3eaf7288cbda7de4722d..d590d0d2a2a66fdf91aca6238268aa4be91dcf9a 100644 +--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java ++++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +@@ -330,10 +330,11 @@ public class CraftEventFactory { + return tradeSelectEvent; + } -+ if (!new io.papermc.paper.event.block.BellRingEvent(world.getWorld().getBlockAt(MCUtil.toLocation(world, pos)), entity == null ? null : entity.getBukkitEntity()).callEvent()) return false; // Paper - BellRingEvent - ((BellBlockEntity)blockEntity).onHit(direction); - world.playSound((Player)null, pos, SoundEvents.BELL_BLOCK, SoundSource.BLOCKS, 2.0F, 1.0F); - world.gameEvent(entity, GameEvent.BLOCK_CHANGE, pos); ++ @SuppressWarnings("deprecation") // Paper use deprecated event to maintain compat (it extends modern event) + public static boolean handleBellRingEvent(Level world, BlockPos position, Direction direction, Entity entity) { + Block block = CraftBlock.at(world, position); + BlockFace bukkitDirection = CraftBlock.notchToBlockFace(direction); +- BellRingEvent event = new BellRingEvent(block, bukkitDirection, (entity != null) ? entity.getBukkitEntity() : null); ++ BellRingEvent event = new io.papermc.paper.event.block.BellRingEvent(block, bukkitDirection, (entity != null) ? entity.getBukkitEntity() : null); // Paper - deprecated BellRingEvent + Bukkit.getPluginManager().callEvent(event); + return !event.isCancelled(); + } diff --git a/patches/server/0473-Cache-block-data-strings.patch b/patches/server/0473-Cache-block-data-strings.patch index 8e33a7c2db..b63eb77502 100644 --- a/patches/server/0473-Cache-block-data-strings.patch +++ b/patches/server/0473-Cache-block-data-strings.patch @@ -17,10 +17,10 @@ index 4fec26c84cb435756fe4b2dcdfc90716f342f9f1..e2ed1ab01ac95d18aa2d3553ccbc5aab if (this.isSameThread()) { diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java -index 6dbc8b6b39b8d4e3c7645e6b982e97a885ee2438..2f9045d216d52fba11d1d1d1ba6a90c1c2eea3d5 100644 +index ccd511f189a9ec57564b2372d7f662da15ef3bba..9b2b90453935b73a814255101f6d1bd3ff0a4362 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java -@@ -517,9 +517,39 @@ public class CraftBlockData implements BlockData { +@@ -520,9 +520,39 @@ public class CraftBlockData implements BlockData { Preconditions.checkState(CraftBlockData.MAP.put(nms, bukkit) == null, "Duplicate mapping %s->%s", nms, bukkit); } diff --git a/patches/server/0485-Optimise-getType-calls.patch b/patches/server/0485-Optimise-getType-calls.patch index 0ea573bcf3..68429d2864 100644 --- a/patches/server/0485-Optimise-getType-calls.patch +++ b/patches/server/0485-Optimise-getType-calls.patch @@ -28,7 +28,7 @@ index da878e180c6b94f98dc82c6e8395f63ecc9b2c1e..a9b0f5950b6f97ea4c2a1075946b9200 super(block, propertyMap, codec); } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunkSnapshot.java b/src/main/java/org/bukkit/craftbukkit/CraftChunkSnapshot.java -index 484e5d5a2793d18eb49b73898d944776a1ec48e8..05512cc19eb213b6be5c869e133376ee42827806 100644 +index eebac2ea211f58c385b2ceb36ab911ac5e115296..d1aaca5de055fd5e3bf2c6d39ef397bbb2deeaae 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftChunkSnapshot.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftChunkSnapshot.java @@ -98,7 +98,7 @@ public class CraftChunkSnapshot implements ChunkSnapshot { @@ -67,10 +67,10 @@ index 0a755f38fae9dc84440f43113920c5b4c6d8218b..7b9e943b391c061782fccd2b8d705cee public void setFlag(int flag) { diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java -index 780cd4f5fb4bb2ed42b0a168d94f0adde8fd0fc3..6361f096eeb5da035a01fc3a2d79f48def33b38d 100644 +index 9b2b90453935b73a814255101f6d1bd3ff0a4362..a585deb47ceb721489e0da4a09a94922fef86a3f 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java -@@ -53,7 +53,7 @@ public class CraftBlockData implements BlockData { +@@ -56,7 +56,7 @@ public class CraftBlockData implements BlockData { @Override public Material getMaterial() { diff --git a/patches/server/0490-Player-elytra-boost-API.patch b/patches/server/0490-Player-elytra-boost-API.patch index c5b2cb514f..8785d0e65e 100644 --- a/patches/server/0490-Player-elytra-boost-API.patch +++ b/patches/server/0490-Player-elytra-boost-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Player elytra boost API diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 56f88fbc08154d30348bdead4e79b5f96b0aeb0d..f26aa477634f50e1e868c2f56006a5f058223916 100644 +index 9402f57ae6cf4316b55af93d879e770bff1cfc3d..bea687c7a4f48078e0cf3c7a2e8b1cc7371ad4ae 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -643,6 +643,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -644,6 +644,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } throw new RuntimeException("Unknown settings type"); } diff --git a/patches/server/0491-Fixed-TileEntityBell-memory-leak.patch b/patches/server/0491-Fixed-TileEntityBell-memory-leak.patch index 09d0b77f4a..0cd7feb8d4 100644 --- a/patches/server/0491-Fixed-TileEntityBell-memory-leak.patch +++ b/patches/server/0491-Fixed-TileEntityBell-memory-leak.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Fixed TileEntityBell memory leak TileEntityBell has a list of entities (entitiesAtRing) that was not being cleared at the right time, causing leaks whenever a bell would be rung near a crowd of entities. diff --git a/src/main/java/net/minecraft/world/level/block/entity/BellBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BellBlockEntity.java -index 4353ad2f67556feaa0fdd34e8e907b17ab697565..feaad48e9bbc1e658324ef9e1e7e73aca0b3bf48 100644 +index 30e9d4b20005dc6d20baf578f2ae958bdfcea02a..b446d6549922f3dabaaa05793d8ee3eb45566ac3 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/BellBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/BellBlockEntity.java -@@ -61,6 +61,11 @@ public class BellBlockEntity extends BlockEntity { +@@ -63,6 +63,11 @@ public class BellBlockEntity extends BlockEntity { if (blockEntity.ticks >= 50) { blockEntity.shaking = false; @@ -21,7 +21,7 @@ index 4353ad2f67556feaa0fdd34e8e907b17ab697565..feaad48e9bbc1e658324ef9e1e7e73ac blockEntity.ticks = 0; } -@@ -74,6 +79,7 @@ public class BellBlockEntity extends BlockEntity { +@@ -76,6 +81,7 @@ public class BellBlockEntity extends BlockEntity { ++blockEntity.resonationTicks; } else { bellEffect.run(world, pos, blockEntity.nearbyEntities); @@ -29,7 +29,7 @@ index 4353ad2f67556feaa0fdd34e8e907b17ab697565..feaad48e9bbc1e658324ef9e1e7e73ac blockEntity.resonating = false; } } -@@ -116,6 +122,7 @@ public class BellBlockEntity extends BlockEntity { +@@ -125,6 +131,7 @@ public class BellBlockEntity extends BlockEntity { } } diff --git a/patches/server/0504-Fix-Player-spawnParticle-x-y-z-precision-loss.patch b/patches/server/0504-Fix-Player-spawnParticle-x-y-z-precision-loss.patch index 13bb457f83..ae95bf1ca6 100644 --- a/patches/server/0504-Fix-Player-spawnParticle-x-y-z-precision-loss.patch +++ b/patches/server/0504-Fix-Player-spawnParticle-x-y-z-precision-loss.patch @@ -5,10 +5,10 @@ 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 5b3c1dbb6d37de327efb0c43d9c776b2c0b1b665..0bd24de222863654a1721529508007a8f972a1e6 100644 +index f84962620f6800977dcb105eeb13b86bd8f14480..a82e1f7230e8d39f264e6a84336d88747e40b23b 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -2474,7 +2474,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2504,7 +2504,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { if (data != null && !particle.getDataType().isInstance(data)) { throw new IllegalArgumentException("data should be " + particle.getDataType() + " got " + data.getClass()); } diff --git a/patches/server/0518-Add-OBSTRUCTED-reason-to-BedEnterResult.patch b/patches/server/0518-Add-OBSTRUCTED-reason-to-BedEnterResult.patch index 1fd2641409..02c1ab2bf7 100644 --- a/patches/server/0518-Add-OBSTRUCTED-reason-to-BedEnterResult.patch +++ b/patches/server/0518-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 2cbe470e30807f7c54d1726a824c3c265fd3265c..8b00741f2e17d9f1b2759ffba5d322b6e3439ab5 100644 +index d590d0d2a2a66fdf91aca6238268aa4be91dcf9a..47519c7eca8ed44ea17edb0f7256b000c0af7f9d 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -264,6 +264,10 @@ public class CraftEventFactory { +@@ -265,6 +265,10 @@ public class CraftEventFactory { return BedEnterResult.TOO_FAR_AWAY; case NOT_SAFE: return BedEnterResult.NOT_SAFE; diff --git a/patches/server/0534-Added-WorldGameRuleChangeEvent.patch b/patches/server/0534-Added-WorldGameRuleChangeEvent.patch index 1b03d8b8b5..f21ee6ffce 100644 --- a/patches/server/0534-Added-WorldGameRuleChangeEvent.patch +++ b/patches/server/0534-Added-WorldGameRuleChangeEvent.patch @@ -64,10 +64,10 @@ index 4a0321f56ef80aa4991e61f586ddd3f6b45e499b..de713f1ca1d61a6b1fca2b66de916255 public int get() { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 217725e90d3c820467fe9a3b6a7116aeac255105..d0a2e20d4d85056abb54e6916753305ef2f3dfab 100644 +index 47d4a61934f07836d9275841fa566bf1d6851381..d51999ddb1403d72e38c93e5f6ad9d41ab34a059 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1808,8 +1808,13 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1818,8 +1818,13 @@ public class CraftWorld extends CraftRegionAccessor implements World { if (!this.isGameRule(rule)) return false; @@ -82,7 +82,7 @@ index 217725e90d3c820467fe9a3b6a7116aeac255105..d0a2e20d4d85056abb54e6916753305e handle.onChanged(this.getHandle().getServer()); return true; } -@@ -1844,8 +1849,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1854,8 +1859,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { if (!this.isGameRule(rule.getName())) return false; diff --git a/patches/server/0537-Implemented-BlockFailedDispenseEvent.patch b/patches/server/0537-Implemented-BlockFailedDispenseEvent.patch index e79c0ddb24..ba143d3e1d 100644 --- a/patches/server/0537-Implemented-BlockFailedDispenseEvent.patch +++ b/patches/server/0537-Implemented-BlockFailedDispenseEvent.patch @@ -32,10 +32,10 @@ index 1415ad60163f6584619cc7caa61f1848d6ebaa93..801c4c120e98584bcf218a4ef9bd66d7 } 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 791f1c454a1ead8eeb4c18483bf9e40b898b5f7a..48d499c60739835f603629e248a9a92f54b3cda4 100644 +index 47519c7eca8ed44ea17edb0f7256b000c0af7f9d..74c45f5451f9284e3c6b46941b65f535574deda6 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1882,4 +1882,12 @@ public class CraftEventFactory { +@@ -1899,4 +1899,12 @@ public class CraftEventFactory { EntitiesUnloadEvent event = new EntitiesUnloadEvent(new CraftChunk((ServerLevel) world, coords.x, coords.z), bukkitEntities); Bukkit.getPluginManager().callEvent(event); } diff --git a/patches/server/0542-Implement-API-to-expose-exact-interaction-point.patch b/patches/server/0542-Implement-API-to-expose-exact-interaction-point.patch index 5fc4f19ca6..40d8b11989 100644 --- a/patches/server/0542-Implement-API-to-expose-exact-interaction-point.patch +++ b/patches/server/0542-Implement-API-to-expose-exact-interaction-point.patch @@ -18,10 +18,10 @@ index 77eec518940ae41880e395b3dd051d89bd67c319..e6154cf74df39d0c87fc820027adc964 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 48d499c60739835f603629e248a9a92f54b3cda4..a7c8736391692dfdf028c40d82754adf47fd26dc 100644 +index 74c45f5451f9284e3c6b46941b65f535574deda6..702a30fd7f3178ce30043283afd36a0ea6745cf9 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -58,7 +58,9 @@ import net.minecraft.world.level.storage.loot.parameters.LootContextParams; +@@ -57,7 +57,9 @@ import net.minecraft.world.level.storage.loot.parameters.LootContextParams; import net.minecraft.world.phys.BlockHitResult; import net.minecraft.world.phys.EntityHitResult; import net.minecraft.world.phys.HitResult; @@ -31,7 +31,7 @@ index 48d499c60739835f603629e248a9a92f54b3cda4..a7c8736391692dfdf028c40d82754adf import org.bukkit.Material; import org.bukkit.NamespacedKey; import org.bukkit.Server; -@@ -473,7 +475,13 @@ public class CraftEventFactory { +@@ -490,7 +492,13 @@ public class CraftEventFactory { return CraftEventFactory.callPlayerInteractEvent(who, action, position, direction, itemstack, false, hand); } @@ -45,7 +45,7 @@ index 48d499c60739835f603629e248a9a92f54b3cda4..a7c8736391692dfdf028c40d82754adf Player player = (who == null) ? null : (Player) who.getBukkitEntity(); CraftItemStack itemInHand = CraftItemStack.asCraftMirror(itemstack); -@@ -499,7 +507,10 @@ public class CraftEventFactory { +@@ -516,7 +524,10 @@ public class CraftEventFactory { itemInHand = null; } diff --git a/patches/server/0545-Add-sendOpLevel-API.patch b/patches/server/0545-Add-sendOpLevel-API.patch index f2c4ba09d2..8b7933fc06 100644 --- a/patches/server/0545-Add-sendOpLevel-API.patch +++ b/patches/server/0545-Add-sendOpLevel-API.patch @@ -32,10 +32,10 @@ index 22f362143f7c01742dd07220dac5ea3dc691d43c..e3631616f04c3051b306fbdf49138b50 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 c0338f597b9c50218862005220a8753d5822a6e4..0b0dc51dfb7174c359305448575ae714398917e4 100644 +index 69f1c668cb303d30bb228e7f79f5df462b791b2c..43d204c7013150b8525b7d0106edac6d0611d723 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -657,6 +657,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -658,6 +658,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { ? (org.bukkit.entity.Firework) entity.getBukkitEntity() : null; } diff --git a/patches/server/0553-Implement-BlockPreDispenseEvent.patch b/patches/server/0553-Implement-BlockPreDispenseEvent.patch index 73ca5aa42d..e4be6588fa 100644 --- a/patches/server/0553-Implement-BlockPreDispenseEvent.patch +++ b/patches/server/0553-Implement-BlockPreDispenseEvent.patch @@ -17,10 +17,10 @@ index 85c5319837295bd2f85baebfe8d6660b267f1d5f..8f55d0753fa26924235c943595f0d1a0 tileentitydispenser.setItem(i, idispensebehavior.dispense(sourceblock, itemstack)); } diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index a7c8736391692dfdf028c40d82754adf47fd26dc..a86b1f163bf1801ba8b5118b9994c1c57808bc1a 100644 +index 702a30fd7f3178ce30043283afd36a0ea6745cf9..9aca4ca86176c18428440218715485f18ea6e069 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1900,5 +1900,11 @@ public class CraftEventFactory { +@@ -1917,5 +1917,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/0557-Add-dropLeash-variable-to-EntityUnleashEvent.patch b/patches/server/0557-Add-dropLeash-variable-to-EntityUnleashEvent.patch index edec5f3b67..e1e8de21d0 100644 --- a/patches/server/0557-Add-dropLeash-variable-to-EntityUnleashEvent.patch +++ b/patches/server/0557-Add-dropLeash-variable-to-EntityUnleashEvent.patch @@ -122,10 +122,10 @@ index b5e35033e63da0e5f2c21fddf3b704d6730f0938..7a6cdae1b566f59508b180e720de4eff 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 a86b1f163bf1801ba8b5118b9994c1c57808bc1a..15b4be18064137d21565434adae97883fb0a8d6a 100644 +index 9aca4ca86176c18428440218715485f18ea6e069..9beed77bacf77ab480a5fffac8c542e834730eac 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1532,8 +1532,10 @@ public class CraftEventFactory { +@@ -1549,8 +1549,10 @@ public class CraftEventFactory { return itemInHand; } diff --git a/patches/server/0563-Allow-adding-items-to-BlockDropItemEvent.patch b/patches/server/0563-Allow-adding-items-to-BlockDropItemEvent.patch index fb8b16b645..0903afa181 100644 --- a/patches/server/0563-Allow-adding-items-to-BlockDropItemEvent.patch +++ b/patches/server/0563-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 15b4be18064137d21565434adae97883fb0a8d6a..451fee716b07c8daadcffc9b87973a56641e8198 100644 +index 9beed77bacf77ab480a5fffac8c542e834730eac..c00b2460f40c5c806e88645af63dfeb6f89ddd00 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -399,13 +399,30 @@ public class CraftEventFactory { +@@ -416,13 +416,30 @@ public class CraftEventFactory { } public static void handleBlockDropItemEvent(Block block, BlockState state, ServerPlayer player, List<ItemEntity> items) { diff --git a/patches/server/0600-More-World-API.patch b/patches/server/0600-More-World-API.patch index ab46622df2..68cc74cd6c 100644 --- a/patches/server/0600-More-World-API.patch +++ b/patches/server/0600-More-World-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] More World API diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index d0a2e20d4d85056abb54e6916753305ef2f3dfab..8a068c4fe548a3744244c96a3062e10bbf05e793 100644 +index d51999ddb1403d72e38c93e5f6ad9d41ab34a059..87fca10b6e37f01250bff14862215120763232d5 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -2050,6 +2050,69 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -2060,6 +2060,69 @@ public class CraftWorld extends CraftRegionAccessor implements World { return new CraftStructureSearchResult(CraftStructure.minecraftToBukkit(found.getSecond().value(), this.getHandle().registryAccess()), new Location(this, found.getFirst().getX(), found.getFirst().getY(), found.getFirst().getZ())); } diff --git a/patches/server/0617-additions-to-PlayerGameModeChangeEvent.patch b/patches/server/0617-additions-to-PlayerGameModeChangeEvent.patch index 9d6aca8aba..39d35a47c9 100644 --- a/patches/server/0617-additions-to-PlayerGameModeChangeEvent.patch +++ b/patches/server/0617-additions-to-PlayerGameModeChangeEvent.patch @@ -142,10 +142,10 @@ index dffb219c0abdac46320aaec168e232df322a4bca..8987bbb4feed89c44e3615a58dac321a } } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index a927c725d08738fdd0f42e21efd09362e9da938d..2095d844bd819321c984f5432ceec9bea135fb73 100644 +index 43d204c7013150b8525b7d0106edac6d0611d723..0f73f0e377c84ed3e1064b9ce6d9254a938c1ae0 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1521,7 +1521,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1551,7 +1551,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { throw new IllegalArgumentException("Mode cannot be null"); } diff --git a/patches/server/0626-Add-cause-to-Weather-ThunderChangeEvents.patch b/patches/server/0626-Add-cause-to-Weather-ThunderChangeEvents.patch index e63cbdc6d0..42549abfa0 100644 --- a/patches/server/0626-Add-cause-to-Weather-ThunderChangeEvents.patch +++ b/patches/server/0626-Add-cause-to-Weather-ThunderChangeEvents.patch @@ -95,10 +95,10 @@ index 543d578eb87da6ff526cad7e65c8af76b1043e84..936b7f464097c30fe4dfbe4cee1c1490 if (weather.isCancelled()) { return; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 71fbfdaab3ff03c7ba3b987d0285bbaa6d3cbce4..ad53803f90faa5805cc0e961094752830328cbf5 100644 +index 87fca10b6e37f01250bff14862215120763232d5..c28f873cbc3c6f9180f051cf6277f75866415474 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1183,7 +1183,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1193,7 +1193,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public void setStorm(boolean hasStorm) { @@ -107,7 +107,7 @@ index 71fbfdaab3ff03c7ba3b987d0285bbaa6d3cbce4..ad53803f90faa5805cc0e96109475283 this.setWeatherDuration(0); // Reset weather duration (legacy behaviour) this.setClearWeatherDuration(0); // Reset clear weather duration (reset "/weather clear" commands) } -@@ -1205,7 +1205,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1215,7 +1215,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public void setThundering(boolean thundering) { diff --git a/patches/server/0629-Add-PlayerKickEvent-causes.patch b/patches/server/0629-Add-PlayerKickEvent-causes.patch index bc9d11a7eb..a2426a280b 100644 --- a/patches/server/0629-Add-PlayerKickEvent-causes.patch +++ b/patches/server/0629-Add-PlayerKickEvent-causes.patch @@ -491,10 +491,10 @@ index a24e7a66d52eddbdad8db71cf5e45f1a458c389f..e1c13ac7b11fb0080435fc34502208c8 } } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 2095d844bd819321c984f5432ceec9bea135fb73..1944f812bffbe0d2b4d0a2d879acd83c0da98497 100644 +index 0f73f0e377c84ed3e1064b9ce6d9254a938c1ae0..24f77ef4a948bf5cf0346a8d8e1907f27a41cd2b 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -603,7 +603,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -604,7 +604,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { org.spigotmc.AsyncCatcher.catchOp("player kick"); // Spigot if (this.getHandle().connection == null) return; @@ -503,7 +503,7 @@ index 2095d844bd819321c984f5432ceec9bea135fb73..1944f812bffbe0d2b4d0a2d879acd83c } // Paper start -@@ -615,10 +615,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -616,10 +616,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @Override public void kick(final net.kyori.adventure.text.Component message) { diff --git a/patches/server/0634-Add-BellRevealRaiderEvent.patch b/patches/server/0634-Add-BellRevealRaiderEvent.patch index 416490bb3d..7ae9f6eb2d 100644 --- a/patches/server/0634-Add-BellRevealRaiderEvent.patch +++ b/patches/server/0634-Add-BellRevealRaiderEvent.patch @@ -5,19 +5,19 @@ Subject: [PATCH] Add BellRevealRaiderEvent diff --git a/src/main/java/net/minecraft/world/level/block/entity/BellBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BellBlockEntity.java -index feaad48e9bbc1e658324ef9e1e7e73aca0b3bf48..648d8f3e72e30aacf68eb073a1ac30f8ec29503c 100644 +index b446d6549922f3dabaaa05793d8ee3eb45566ac3..79e74a5f020ad971fdbef75c502a5aa8bead2258 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/BellBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/BellBlockEntity.java -@@ -138,7 +138,7 @@ public class BellBlockEntity extends BlockEntity { - private static void makeRaidersGlow(Level world, BlockPos pos, List<LivingEntity> hearingEntities) { - hearingEntities.stream().filter((entity) -> { - return isRaiderWithinRange(pos, entity); -- }).forEach(BellBlockEntity::glow); -+ }).forEach(entity -> glow(entity, pos)); // Paper - pass BlockPos +@@ -156,7 +156,7 @@ public class BellBlockEntity extends BlockEntity { + return BellBlockEntity.isRaiderWithinRange(pos, entityliving); + }).map((entity) -> (org.bukkit.entity.LivingEntity) entity.getBukkitEntity()).collect(java.util.stream.Collectors.toCollection(java.util.ArrayList::new)); // CraftBukkit + +- org.bukkit.craftbukkit.event.CraftEventFactory.handleBellResonateEvent(world, pos, entities).forEach(BellBlockEntity::glow); ++ org.bukkit.craftbukkit.event.CraftEventFactory.handleBellResonateEvent(world, pos, entities).forEach(entity -> glow(entity, pos)); // Paper - pass BlockPos + // CraftBukkit end } - private static void showBellParticles(Level world, BlockPos pos, List<LivingEntity> hearingEntities) { -@@ -170,7 +170,11 @@ public class BellBlockEntity extends BlockEntity { +@@ -191,7 +191,11 @@ public class BellBlockEntity extends BlockEntity { return entity.isAlive() && !entity.isRemoved() && pos.closerToCenterThan(entity.position(), 48.0D) && entity.getType().is(EntityTypeTags.RAIDERS); } diff --git a/patches/server/0641-add-per-world-spawn-limits.patch b/patches/server/0641-add-per-world-spawn-limits.patch index 01e9af7ed2..dfee9deab0 100644 --- a/patches/server/0641-add-per-world-spawn-limits.patch +++ b/patches/server/0641-add-per-world-spawn-limits.patch @@ -6,10 +6,10 @@ Subject: [PATCH] add per world spawn limits Taken from #2982. Credit to Chasewhip8 diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index ad53803f90faa5805cc0e961094752830328cbf5..3b36581c30ee7fa19de573c2ee270eefc6027c38 100644 +index c28f873cbc3c6f9180f051cf6277f75866415474..39412e69ac3bc5ff15162741d7f418bd32196745 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -209,6 +209,13 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -210,6 +210,13 @@ public class CraftWorld extends CraftRegionAccessor implements World { this.biomeProvider = biomeProvider; this.environment = env; diff --git a/patches/server/0645-Missing-Entity-Behavior-API.patch b/patches/server/0645-Missing-Entity-Behavior-API.patch index 70a5c02b12..b6c842141b 100644 --- a/patches/server/0645-Missing-Entity-Behavior-API.patch +++ b/patches/server/0645-Missing-Entity-Behavior-API.patch @@ -37,7 +37,7 @@ Co-authored-by: William Blake Galbreath <[email protected]> Co-authored-by: SoSeDiK <[email protected]> diff --git a/src/main/java/com/destroystokyo/paper/entity/ai/MobGoalHelper.java b/src/main/java/com/destroystokyo/paper/entity/ai/MobGoalHelper.java -index 1ec0f71cb9882648bdd1e645f5719d8c3cc53a3d..ed74f2b90afaa43ae66fbd4797d23cfac9ea9e88 100644 +index f80a6ad7638453348ee82ea00b166a3aac029142..a08c00b8c0488d18be5e182f7892e5ab71d12247 100644 --- a/src/main/java/com/destroystokyo/paper/entity/ai/MobGoalHelper.java +++ b/src/main/java/com/destroystokyo/paper/entity/ai/MobGoalHelper.java @@ -164,7 +164,7 @@ public class MobGoalHelper { @@ -788,61 +788,6 @@ index ee9648739fb39c5842063d7442df6eb5c9336d7f..67fe56cc4c2af24f6bd883c6e1485101 + } + // Paper end } -diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartTNT.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartTNT.java -index 9569068c0a6e1eb934f063634f5d3efe674aa33d..5e3f0180accf633aa28ae87fe07464edfde50bff 100644 ---- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartTNT.java -+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartTNT.java -@@ -5,7 +5,7 @@ import org.bukkit.craftbukkit.CraftServer; - import org.bukkit.entity.EntityType; - import org.bukkit.entity.minecart.ExplosiveMinecart; - --final class CraftMinecartTNT extends CraftMinecart implements ExplosiveMinecart { -+public final class CraftMinecartTNT extends CraftMinecart implements ExplosiveMinecart { // Paper - getHandle -> make public - CraftMinecartTNT(CraftServer server, MinecartTNT entity) { - super(server, entity); - } -@@ -19,4 +19,41 @@ final class CraftMinecartTNT extends CraftMinecart implements ExplosiveMinecart - public EntityType getType() { - return EntityType.MINECART_TNT; - } -+ // Paper start -+ @Override -+ public net.minecraft.world.entity.vehicle.MinecartTNT getHandle() { -+ return (net.minecraft.world.entity.vehicle.MinecartTNT) entity; -+ } -+ -+ @Override -+ public void setFuseTicks(int fuseTicks) { -+ this.getHandle().fuse = fuseTicks; -+ } -+ -+ @Override -+ public int getFuseTicks() { -+ return this.getHandle().getFuse(); -+ } -+ -+ @Override -+ public boolean isIgnited() { -+ return this.getHandle().isPrimed(); -+ } -+ -+ @Override -+ public void ignite() { -+ this.getHandle().primeFuse(); -+ } -+ -+ @Override -+ public void explode() { -+ explode(this.getHandle().getDeltaMovement().horizontalDistanceSqr()); -+ } -+ -+ @Override -+ public void explode(double power) { -+ com.google.common.base.Preconditions.checkArgument(power >= 0 && Double.isFinite(power), "Explosion power must be a finite non-negative number"); -+ this.getHandle().explode(power); -+ } -+ // Paper end - } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java index 383c6d464e8077eeb900d61baa6a02f15a818b01..20eaa3424428b8b30fd15591b660983cb7fc4375 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java diff --git a/patches/server/0665-Add-PlayerSetSpawnEvent.patch b/patches/server/0665-Add-PlayerSetSpawnEvent.patch index e0b1773d4c..214bbe2013 100644 --- a/patches/server/0665-Add-PlayerSetSpawnEvent.patch +++ b/patches/server/0665-Add-PlayerSetSpawnEvent.patch @@ -129,10 +129,10 @@ index a64cd3b54840af9a9c946b3e4e4f91d1c5f4bc97..16f23ecffa52925904d585f3fed76aa6 } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 1944f812bffbe0d2b4d0a2d879acd83c0da98497..e5a9d5862461f2458987eecf05ea9a395afe368c 100644 +index 24f77ef4a948bf5cf0346a8d8e1907f27a41cd2b..b16ce6bde4d7478a3fabe5a5c0a48489ada2d579 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1341,9 +1341,9 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1371,9 +1371,9 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @Override public void setBedSpawnLocation(Location location, boolean override) { if (location == null) { diff --git a/patches/server/0680-Add-methods-to-find-targets-for-lightning-strikes.patch b/patches/server/0680-Add-methods-to-find-targets-for-lightning-strikes.patch index ad0cc15683..1b04de8c43 100644 --- a/patches/server/0680-Add-methods-to-find-targets-for-lightning-strikes.patch +++ b/patches/server/0680-Add-methods-to-find-targets-for-lightning-strikes.patch @@ -31,10 +31,10 @@ index 16b73f0498936a8413f6adedd7f92bab07a4a108..f12d844d422ca4175d4cb2b8e3112b59 blockposition1 = blockposition1.above(2); } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 3b36581c30ee7fa19de573c2ee270eefc6027c38..bf0ad61418f0832c23ed9374be91e586c73050de 100644 +index 39412e69ac3bc5ff15162741d7f418bd32196745..cf0892b4d4e5d3759ce743de9a0e36bb8924c7cd 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -685,6 +685,23 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -695,6 +695,23 @@ public class CraftWorld extends CraftRegionAccessor implements World { return (LightningStrike) lightning.getBukkitEntity(); } diff --git a/patches/server/0685-Add-critical-damage-API.patch b/patches/server/0685-Add-critical-damage-API.patch index 8d7c2bdc8e..bc2c94d4c5 100644 --- a/patches/server/0685-Add-critical-damage-API.patch +++ b/patches/server/0685-Add-critical-damage-API.patch @@ -71,10 +71,10 @@ index 6486fa86e4bf3c90c09c0425d825bab568a68757..8257563afc3fe04c9e821da363b1f3f6 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 451fee716b07c8daadcffc9b87973a56641e8198..30360517235b2a568b92a43aa5efc0d6759c7e8e 100644 +index c00b2460f40c5c806e88645af63dfeb6f89ddd00..d2c0461bcc8e4c08bf375f76fad0c10086c40fd4 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -969,7 +969,7 @@ public class CraftEventFactory { +@@ -986,7 +986,7 @@ public class CraftEventFactory { } else { damageCause = DamageCause.ENTITY_EXPLOSION; } @@ -83,7 +83,7 @@ index 451fee716b07c8daadcffc9b87973a56641e8198..30360517235b2a568b92a43aa5efc0d6 } event.setCancelled(cancelled); -@@ -1001,7 +1001,7 @@ public class CraftEventFactory { +@@ -1018,7 +1018,7 @@ public class CraftEventFactory { cause = DamageCause.SONIC_BOOM; } @@ -92,7 +92,7 @@ index 451fee716b07c8daadcffc9b87973a56641e8198..30360517235b2a568b92a43aa5efc0d6 } else if (source.is(DamageTypes.OUT_OF_WORLD)) { EntityDamageEvent event = new EntityDamageByBlockEvent(null, entity.getBukkitEntity(), DamageCause.VOID, modifiers, modifierFunctions); event.setCancelled(cancelled); -@@ -1071,7 +1071,7 @@ public class CraftEventFactory { +@@ -1088,7 +1088,7 @@ public class CraftEventFactory { } else { throw new IllegalStateException(String.format("Unhandled damage of %s by %s from %s", entity, damager.getHandle(), source.getMsgId())); } @@ -101,7 +101,7 @@ index 451fee716b07c8daadcffc9b87973a56641e8198..30360517235b2a568b92a43aa5efc0d6 event.setCancelled(cancelled); CraftEventFactory.callEvent(event); if (!event.isCancelled()) { -@@ -1116,20 +1116,28 @@ public class CraftEventFactory { +@@ -1133,20 +1133,28 @@ public class CraftEventFactory { } if (cause != null) { diff --git a/patches/server/0695-Add-paper-mobcaps-and-paper-playermobcaps.patch b/patches/server/0695-Add-paper-mobcaps-and-paper-playermobcaps.patch index 2a96176091..60b1f8598a 100644 --- a/patches/server/0695-Add-paper-mobcaps-and-paper-playermobcaps.patch +++ b/patches/server/0695-Add-paper-mobcaps-and-paper-playermobcaps.patch @@ -278,7 +278,7 @@ index a1770e5ae4b3014c3538b52d4912c60864e186a8..906def91bba96bab7c7aea9b87d9ec56 // Paper start - add parameters and int ret type spawnCategoryForChunk(group, world, chunk, checker, runner, Integer.MAX_VALUE, null); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index fdad054d9e6fedc7c6367abb12c38f66bf6fdfca..ed0aa7ddb4cd3d2f1a08baa4754b01f08a1537d1 100644 +index 46755f34fb0af5dea2db8d8321caebfc163a8268..9b3f01e84b5855b64e9f59ca29e5ff9a598084a4 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -2165,6 +2165,11 @@ public final class CraftServer implements Server { @@ -294,10 +294,10 @@ index fdad054d9e6fedc7c6367abb12c38f66bf6fdfca..ed0aa7ddb4cd3d2f1a08baa4754b01f0 } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index d0e1c1eb00409523f7e771cfa5ec21b6b23516cd..e955b72d6a26224c39059fa56874b5e47384b5f4 100644 +index cf0892b4d4e5d3759ce743de9a0e36bb8924c7cd..dc9e6042e6c8deb997f609e10455f7947faa479e 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1700,9 +1700,14 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1710,9 +1710,14 @@ public class CraftWorld extends CraftRegionAccessor implements World { Validate.notNull(spawnCategory, "SpawnCategory cannot be null"); Validate.isTrue(CraftSpawnCategory.isValidForLimits(spawnCategory), "SpawnCategory." + spawnCategory + " are not supported."); diff --git a/patches/server/0719-Optimise-nearby-player-lookups.patch b/patches/server/0719-Optimise-nearby-player-lookups.patch index 18193bdeea..9442ccf3ec 100644 --- a/patches/server/0719-Optimise-nearby-player-lookups.patch +++ b/patches/server/0719-Optimise-nearby-player-lookups.patch @@ -208,7 +208,7 @@ index 9523f6acd2c86892b390e14aaab628b40b452bf1..a3e8765e00ca816781441448d8bd4ac3 this.handlingTick = true; diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java -index 00c6605f06773c52f6f5c5c1f5bcdd6dd67fb5b6..ba1a43758bb29e3204b5f88edf4cb02af2cc07b3 100644 +index 83b1bed5bb6588ad009727e473337eebaf385cfa..02cb6b8c1d59855ff4a8aad3024fe12007eca0ee 100644 --- a/src/main/java/net/minecraft/world/entity/Mob.java +++ b/src/main/java/net/minecraft/world/entity/Mob.java @@ -855,7 +855,12 @@ public abstract class Mob extends LivingEntity implements Targeting { @@ -322,10 +322,10 @@ index 906def91bba96bab7c7aea9b87d9ec56374e6588..15d266fc97eb73338f4f6fb2cfe25d68 private static Boolean isValidSpawnPostitionForType(ServerLevel world, MobCategory group, StructureManager structureAccessor, ChunkGenerator chunkGenerator, MobSpawnSettings.SpawnerData spawnEntry, BlockPos.MutableBlockPos pos, double squaredDistance) { // Paper 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 05b8b37a4b1089b859b399323ecda8f23e9f6e67..206dc04086a218b510930739a6c573f2653ab0fa 100644 +index 73a3f9eae86df8e9afd08ee9da4c1b8e16dededd..d190bad5d287766ed4165ed827d9901a9d878687 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -@@ -269,6 +269,98 @@ public class LevelChunk extends ChunkAccess { +@@ -262,6 +262,98 @@ public class LevelChunk extends ChunkAccess { } } // Paper end diff --git a/patches/server/0754-Add-player-health-update-API.patch b/patches/server/0754-Add-player-health-update-API.patch index 3c4b137416..6bfca830bc 100644 --- a/patches/server/0754-Add-player-health-update-API.patch +++ b/patches/server/0754-Add-player-health-update-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add player health update API diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index acc5eaab4ecfd16290f845099dfe5ea7b132a7c6..bdcc739eed7adec1610af56c47afff114dc91477 100644 +index df7471ce615077933577f1e9e62933577a3b9781..d044420955a2a8e19337771ce155777a462c00fe 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -2353,9 +2353,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2383,9 +2383,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player { this.getHandle().maxHealthCache = getMaxHealth(); } @@ -22,7 +22,7 @@ index acc5eaab4ecfd16290f845099dfe5ea7b132a7c6..bdcc739eed7adec1610af56c47afff11 if (this.getHandle().queueHealthUpdatePacket) { this.getHandle().queuedHealthUpdatePacket = packet; } else { -@@ -2364,6 +2366,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2394,6 +2396,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player { // Paper end } diff --git a/patches/server/0759-Fix-ChunkSnapshot-isSectionEmpty-int-and-optimize-Pa.patch b/patches/server/0759-Fix-ChunkSnapshot-isSectionEmpty-int-and-optimize-Pa.patch index 13937bc043..6f34e516c5 100644 --- a/patches/server/0759-Fix-ChunkSnapshot-isSectionEmpty-int-and-optimize-Pa.patch +++ b/patches/server/0759-Fix-ChunkSnapshot-isSectionEmpty-int-and-optimize-Pa.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Fix ChunkSnapshot#isSectionEmpty(int) and optimize diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java -index 0fadc763fb482cf9f3b51ed44427029bec9f7f63..edb726d7db0c2e1c276458c997bbfed9b76b69d4 100644 +index 72743bf4a8583c712558fb3ed1441fc7b9d2708c..ce51563e97274253363c727e541cfe4161a7ad15 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java -@@ -298,13 +298,17 @@ public class CraftChunk implements Chunk { +@@ -281,13 +281,17 @@ public class CraftChunk implements Chunk { PalettedContainerRO<Holder<net.minecraft.world.level.biome.Biome>>[] biome = (includeBiome || includeBiomeTempRain) ? new PalettedContainer[cs.length] : null; Registry<net.minecraft.world.level.biome.Biome> iregistry = this.worldServer.registryAccess().registryOrThrow(Registries.BIOME); @@ -29,9 +29,9 @@ index 0fadc763fb482cf9f3b51ed44427029bec9f7f63..edb726d7db0c2e1c276458c997bbfed9 + } + // Paper end - LevelLightEngine lightengine = chunk.level.getLightEngine(); + LevelLightEngine lightengine = this.worldServer.getLightEngine(); DataLayer skyLightArray = lightengine.getLayerListener(LightLayer.SKY).getDataLayerData(SectionPos.of(x, i, z)); -@@ -323,8 +327,7 @@ public class CraftChunk implements Chunk { +@@ -306,8 +310,7 @@ public class CraftChunk implements Chunk { } if (biome != null) { diff --git a/patches/server/0776-Expose-vanilla-BiomeProvider-from-WorldInfo.patch b/patches/server/0776-Expose-vanilla-BiomeProvider-from-WorldInfo.patch index a7856f8504..e7ac49dc61 100644 --- a/patches/server/0776-Expose-vanilla-BiomeProvider-from-WorldInfo.patch +++ b/patches/server/0776-Expose-vanilla-BiomeProvider-from-WorldInfo.patch @@ -18,7 +18,7 @@ index 24c88555ea85dd2a0656e1f67a4828a5137157b8..cbbb0ff40488c430d15c2ed054d1b288 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 8543dd8e933364befa5d29f80f53408a2cd2606b..532ea1dd6548264f4ccc639d7cccab39a851a1ad 100644 +index 9f172ccae28779ae28eeeceb4305298b9ceed44a..8be3aeab748b57a73522f6124f8e3aacf1f2ee0e 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -1217,7 +1217,7 @@ public final class CraftServer implements Server { @@ -31,10 +31,10 @@ index 8543dd8e933364befa5d29f80f53408a2cd2606b..532ea1dd6548264f4ccc639d7cccab39 biomeProvider = generator.getDefaultBiomeProvider(worldInfo); } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index e955b72d6a26224c39059fa56874b5e47384b5f4..8fcc553b6f1bf62fb9febb46402940039c37606a 100644 +index dc9e6042e6c8deb997f609e10455f7947faa479e..5f9696a4a2490baf7667fa15a8b01a5f845e5f23 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -199,6 +199,30 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -200,6 +200,30 @@ public class CraftWorld extends CraftRegionAccessor implements World { public int getPlayerCount() { return world.players().size(); } diff --git a/patches/server/0785-Multi-Block-Change-API-Implementation.patch b/patches/server/0785-Multi-Block-Change-API-Implementation.patch index 7107bc3eb3..3be6433cec 100644 --- a/patches/server/0785-Multi-Block-Change-API-Implementation.patch +++ b/patches/server/0785-Multi-Block-Change-API-Implementation.patch @@ -25,26 +25,23 @@ index c96e75456c2f8564d3bc75993cc6e03ba605597d..7c6a6693760638a07b7c7c330aaeffd9 public void write(FriendlyByteBuf buf) { buf.writeLong(this.sectionPos.asLong()); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 64c2026a5b4231434bb750bdf95a7751942cd701..51ddd6f0265c64241ff9d8b85959346e8106fa5e 100644 +index de5bd1107f21c8319178c2287a4a01091b4966b0..93a7d7a3b65c85b639bfa7a419ef8ea840b1d92f 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -947,6 +947,35 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -948,6 +948,32 @@ public class CraftPlayer extends CraftHumanEntity implements Player { this.getHandle().connection.send(packet); } + // Paper start + @Override -+ public void sendMultiBlockChange(Map<Location, BlockData> blockChanges, boolean suppressLightUpdates) { ++ public void sendMultiBlockChange(final Map<? extends io.papermc.paper.math.Position, BlockData> blockChanges, final boolean suppressLightUpdates) { + if (this.getHandle().connection == null) return; + + Map<SectionPos, it.unimi.dsi.fastutil.shorts.Short2ObjectMap<net.minecraft.world.level.block.state.BlockState>> sectionMap = new HashMap<>(); + -+ for (Map.Entry<Location, BlockData> entry : blockChanges.entrySet()) { -+ Location location = entry.getKey(); -+ if (!location.getWorld().equals(this.getWorld())) continue; -+ ++ for (Map.Entry<? extends io.papermc.paper.math.Position, BlockData> entry : blockChanges.entrySet()) { + BlockData blockData = entry.getValue(); -+ BlockPos blockPos = new BlockPos(location.getBlockX(), location.getBlockY(), location.getBlockZ()); ++ BlockPos blockPos = io.papermc.paper.util.MCUtil.toBlockPos(entry.getKey()); + SectionPos sectionPos = SectionPos.of(blockPos); + + it.unimi.dsi.fastutil.shorts.Short2ObjectMap<net.minecraft.world.level.block.state.BlockState> sectionData = sectionMap.computeIfAbsent(sectionPos, key -> new it.unimi.dsi.fastutil.shorts.Short2ObjectArrayMap<>()); diff --git a/patches/server/0793-Implement-regenerateChunk.patch b/patches/server/0793-Implement-regenerateChunk.patch index c2d47675b9..3db87dad36 100644 --- a/patches/server/0793-Implement-regenerateChunk.patch +++ b/patches/server/0793-Implement-regenerateChunk.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Implement regenerateChunk Co-authored-by: Jason Penilla <[email protected]> diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 8fcc553b6f1bf62fb9febb46402940039c37606a..eeeaaf379c7273c276e1faac5d6c55730d5b51bc 100644 +index 5f9696a4a2490baf7667fa15a8b01a5f845e5f23..8e8edda568b60b7bb0d2ebd454c7d52df4d16d24 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -138,6 +138,7 @@ import org.bukkit.util.Vector; +@@ -139,6 +139,7 @@ import org.jetbrains.annotations.NotNull; public class CraftWorld extends CraftRegionAccessor implements World { public static final int CUSTOM_DIMENSION_OFFSET = 10; private static final CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new CraftPersistentDataTypeRegistry(); @@ -17,7 +17,7 @@ index 8fcc553b6f1bf62fb9febb46402940039c37606a..eeeaaf379c7273c276e1faac5d6c5573 private final ServerLevel world; private WorldBorder worldBorder; -@@ -418,27 +419,62 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -429,27 +430,62 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public boolean regenerateChunk(int x, int z) { org.spigotmc.AsyncCatcher.catchOp("chunk regenerate"); // Spigot diff --git a/patches/server/0806-Fix-falling-block-spawn-methods.patch b/patches/server/0806-Fix-falling-block-spawn-methods.patch index c06e54b904..54dda5fa8c 100644 --- a/patches/server/0806-Fix-falling-block-spawn-methods.patch +++ b/patches/server/0806-Fix-falling-block-spawn-methods.patch @@ -24,10 +24,10 @@ index a92d43c0c4793a594b3e17b5e03f7e944b781a55..a968b27ef287b699f3e0d7e666741979 if (Snowball.class.isAssignableFrom(clazz)) { entity = new net.minecraft.world.entity.projectile.Snowball(world, x, y, z); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index e52008c574d1f8738c02848c98aee12dd5fb30ab..56e086458783a5f85f88184dd063f73647c2ee8f 100644 +index 8e8edda568b60b7bb0d2ebd454c7d52df4d16d24..8c566479d0936a4d21a40adb87f6272158b217bd 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1394,7 +1394,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1404,7 +1404,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { Validate.notNull(material, "Material cannot be null"); Validate.isTrue(material.isBlock(), "Material must be a block"); @@ -41,7 +41,7 @@ index e52008c574d1f8738c02848c98aee12dd5fb30ab..56e086458783a5f85f88184dd063f736 return (FallingBlock) entity.getBukkitEntity(); } -@@ -1403,7 +1408,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1413,7 +1418,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { Validate.notNull(location, "Location cannot be null"); Validate.notNull(data, "BlockData cannot be null"); diff --git a/patches/server/0829-Pass-ServerLevel-for-gamerule-callbacks.patch b/patches/server/0829-Pass-ServerLevel-for-gamerule-callbacks.patch index 5cbd16b895..21f7badd50 100644 --- a/patches/server/0829-Pass-ServerLevel-for-gamerule-callbacks.patch +++ b/patches/server/0829-Pass-ServerLevel-for-gamerule-callbacks.patch @@ -158,10 +158,10 @@ index de713f1ca1d61a6b1fca2b66de9162556d102449..edd2c9d0cf5a81c779011cb4215d496a this.onChanged(server); } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 56e086458783a5f85f88184dd063f73647c2ee8f..e5e38c225e7c83dfb8a8427ef6a38d644a492d09 100644 +index 8c566479d0936a4d21a40adb87f6272158b217bd..831c746e9aeab0fd5d6b1eec2fad4d9222c2f359 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1914,7 +1914,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1924,7 +1924,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { // Paper end GameRules.Value<?> handle = this.getHandle().getGameRules().getRule(CraftWorld.getGameRulesNMS().get(rule)); handle.deserialize(event.getValue()); // Paper @@ -170,7 +170,7 @@ index 56e086458783a5f85f88184dd063f73647c2ee8f..e5e38c225e7c83dfb8a8427ef6a38d64 return true; } -@@ -1954,7 +1954,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1964,7 +1964,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { // Paper end GameRules.Value<?> handle = this.getHandle().getGameRules().getRule(CraftWorld.getGameRulesNMS().get(rule.getName())); handle.deserialize(event.getValue()); // Paper diff --git a/patches/server/0864-More-Teleport-API.patch b/patches/server/0864-More-Teleport-API.patch index a82fe2fc8e..099c50008c 100644 --- a/patches/server/0864-More-Teleport-API.patch +++ b/patches/server/0864-More-Teleport-API.patch @@ -74,10 +74,10 @@ index 7df1eebce5b62214943e55314e9ec98f056fa330..2aee8aacd50431c18ff28af678348ec2 // Let the server handle cross world teleports if (location.getWorld() != null && !location.getWorld().equals(this.getWorld())) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 51ddd6f0265c64241ff9d8b85959346e8106fa5e..0df3bb9893d5ed22a9e9f85ebc8ef7987168923a 100644 +index 93a7d7a3b65c85b639bfa7a419ef8ea840b1d92f..1253b9d39582baa9f3be36b2f9f134032a7e91b3 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1234,13 +1234,100 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1261,13 +1261,100 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @Override public void setRotation(float yaw, float pitch) { @@ -179,7 +179,7 @@ index 51ddd6f0265c64241ff9d8b85959346e8106fa5e..0df3bb9893d5ed22a9e9f85ebc8ef798 location.checkFinite(); ServerPlayer entity = this.getHandle(); -@@ -1253,7 +1340,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1280,7 +1367,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { return false; } @@ -188,7 +188,7 @@ index 51ddd6f0265c64241ff9d8b85959346e8106fa5e..0df3bb9893d5ed22a9e9f85ebc8ef798 return false; } -@@ -1271,7 +1358,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1298,7 +1385,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } // If this player is riding another entity, we must dismount before teleporting. @@ -197,7 +197,7 @@ index 51ddd6f0265c64241ff9d8b85959346e8106fa5e..0df3bb9893d5ed22a9e9f85ebc8ef798 // SPIGOT-5509: Wakeup, similar to riding if (this.isSleeping()) { -@@ -1287,13 +1374,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1314,13 +1401,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { ServerLevel toWorld = ((CraftWorld) to.getWorld()).getHandle(); // Close any foreign inventory diff --git a/patches/server/0868-Warn-on-plugins-accessing-faraway-chunks.patch b/patches/server/0868-Warn-on-plugins-accessing-faraway-chunks.patch index 0502f31c29..d91539074d 100644 --- a/patches/server/0868-Warn-on-plugins-accessing-faraway-chunks.patch +++ b/patches/server/0868-Warn-on-plugins-accessing-faraway-chunks.patch @@ -18,10 +18,10 @@ index 4ace5a32e8d17303a4b5d9e8935a803d7c0df409..174f5ff8f827dab2d85cee525429d46b private static boolean isOutsideSpawnableHeight(int y) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index e5e38c225e7c83dfb8a8427ef6a38d644a492d09..e25f2922abb0c83789796aa6fcf8fe80e320ffc5 100644 +index 831c746e9aeab0fd5d6b1eec2fad4d9222c2f359..86ffc869b57410fd4993c0fd0ae000da2e2c070c 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -312,9 +312,24 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -313,9 +313,24 @@ public class CraftWorld extends CraftRegionAccessor implements World { public boolean setSpawnLocation(int x, int y, int z) { return this.setSpawnLocation(x, y, z, 0.0F); } @@ -44,9 +44,9 @@ index e5e38c225e7c83dfb8a8427ef6a38d644a492d09..e25f2922abb0c83789796aa6fcf8fe80 public Chunk getChunkAt(int x, int z) { + warnUnsafeChunk("getting a faraway chunk", x, z); // Paper // Paper start - add ticket to hold chunk for a little while longer if plugin accesses it - net.minecraft.world.level.chunk.LevelChunk chunk = world.getChunkSource().getChunkAtIfLoadedImmediately(x, z); + net.minecraft.world.level.chunk.LevelChunk chunk = this.world.getChunkSource().getChunkAtIfLoadedImmediately(x, z); if (chunk == null) { -@@ -419,6 +434,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -430,6 +445,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public boolean regenerateChunk(int x, int z) { org.spigotmc.AsyncCatcher.catchOp("chunk regenerate"); // Spigot @@ -54,7 +54,7 @@ index e5e38c225e7c83dfb8a8427ef6a38d644a492d09..e25f2922abb0c83789796aa6fcf8fe80 // Paper start - implement regenerateChunk method final ServerLevel serverLevel = this.world; final net.minecraft.server.level.ServerChunkCache serverChunkCache = serverLevel.getChunkSource(); -@@ -515,6 +531,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -526,6 +542,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public boolean loadChunk(int x, int z, boolean generate) { org.spigotmc.AsyncCatcher.catchOp("chunk load"); // Spigot @@ -62,7 +62,7 @@ index e5e38c225e7c83dfb8a8427ef6a38d644a492d09..e25f2922abb0c83789796aa6fcf8fe80 // Paper start - Optimize this method ChunkPos chunkPos = new ChunkPos(x, z); ChunkAccess immediate = world.getChunkSource().getChunkAtIfLoadedImmediately(x, z); // Paper -@@ -579,6 +596,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -589,6 +606,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public boolean addPluginChunkTicket(int x, int z, Plugin plugin) { @@ -70,7 +70,7 @@ index e5e38c225e7c83dfb8a8427ef6a38d644a492d09..e25f2922abb0c83789796aa6fcf8fe80 Preconditions.checkArgument(plugin != null, "null plugin"); Preconditions.checkArgument(plugin.isEnabled(), "plugin is not enabled"); -@@ -647,6 +665,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -657,6 +675,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public void setChunkForceLoaded(int x, int z, boolean forced) { @@ -78,7 +78,7 @@ index e5e38c225e7c83dfb8a8427ef6a38d644a492d09..e25f2922abb0c83789796aa6fcf8fe80 this.getHandle().setChunkForced(x, z, forced); } -@@ -958,6 +977,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -968,6 +987,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public int getHighestBlockYAt(int x, int z, org.bukkit.HeightMap heightMap) { @@ -86,7 +86,7 @@ index e5e38c225e7c83dfb8a8427ef6a38d644a492d09..e25f2922abb0c83789796aa6fcf8fe80 // Transient load for this tick return this.world.getChunk(x >> 4, z >> 4).getHeight(CraftHeightMap.toNMS(heightMap), x, z); } -@@ -2334,6 +2354,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -2344,6 +2364,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { // Spigot end // Paper start public java.util.concurrent.CompletableFuture<Chunk> getChunkAtAsync(int x, int z, boolean gen, boolean urgent) { diff --git a/patches/server/0869-Custom-Chat-Completion-Suggestions-API.patch b/patches/server/0869-Custom-Chat-Completion-Suggestions-API.patch index 9b459453e7..0eb1dde73f 100644 --- a/patches/server/0869-Custom-Chat-Completion-Suggestions-API.patch +++ b/patches/server/0869-Custom-Chat-Completion-Suggestions-API.patch @@ -5,10 +5,10 @@ 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 0df3bb9893d5ed22a9e9f85ebc8ef7987168923a..7ad4d931f6dabff1400695fcc016da2cd8f7df07 100644 +index 1253b9d39582baa9f3be36b2f9f134032a7e91b3..63da84519af19680d93c5d845d337ec784f2dc9e 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -669,6 +669,22 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -670,6 +670,22 @@ public class CraftPlayer extends CraftHumanEntity implements Player { this.getHandle().getServer().getPlayerList().sendPlayerPermissionLevel(this.getHandle(), level, false); } diff --git a/patches/server/0875-Block-Ticking-API.patch b/patches/server/0875-Block-Ticking-API.patch index 06b8ddfc44..86598b006e 100644 --- a/patches/server/0875-Block-Ticking-API.patch +++ b/patches/server/0875-Block-Ticking-API.patch @@ -31,12 +31,12 @@ index 0d30b388d8d93a6dbbf8dfb30d26eb44c73e1e4e..962c950ca9c7e047a3aec215d4faa736 // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java -index b052f197a4616e0e6151f81ec3287666b64da5ad..d70541cf10674aeb7581043d09269793f109e657 100644 +index a585deb47ceb721489e0da4a09a94922fef86a3f..27344a44b776311801b03034730fd6710190e11a 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java -@@ -662,4 +662,11 @@ public class CraftBlockData implements BlockData { - public Material getPlacementMaterial() { - return CraftMagicNumbers.getMaterial(this.state.getBlock().asItem()); +@@ -675,4 +675,11 @@ public class CraftBlockData implements BlockData { + public void mirror(Mirror mirror) { + this.state = this.state.mirror(net.minecraft.world.level.block.Mirror.valueOf(mirror.name())); } + + // Paper start - Block tick API diff --git a/patches/server/0882-Add-custom-destroyerIdentity-to-sendBlockDamage.patch b/patches/server/0882-Add-custom-destroyerIdentity-to-sendBlockDamage.patch deleted file mode 100644 index 114bef97cc..0000000000 --- a/patches/server/0882-Add-custom-destroyerIdentity-to-sendBlockDamage.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: TheFruxz <[email protected]> -Date: Sat, 26 Mar 2022 18:41:36 +0100 -Subject: [PATCH] Add custom destroyerIdentity to sendBlockDamage - - -diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 7ad4d931f6dabff1400695fcc016da2cd8f7df07..0bb3a20c1f390b14edc9286eee5d976ab7d45f44 100644 ---- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1032,13 +1032,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { - - @Override - public void sendBlockDamage(Location loc, float progress) { -+ // Paper start - customBlockDamage identity -+ sendBlockDamage(loc, progress, this.getHandle().getId()); -+ } -+ -+ @Override -+ public void sendBlockDamage(Location loc, float progress, int destroyerIdentity) { -+ // Paper end - customBlockDamage identity - Preconditions.checkArgument(loc != null, "loc must not be null"); - Preconditions.checkArgument(progress >= 0.0 && progress <= 1.0, "progress must be between 0.0 and 1.0 (inclusive)"); - - if (this.getHandle().connection == null) return; - - int stage = (int) (9 * progress); // There are 0 - 9 damage states -- ClientboundBlockDestructionPacket packet = new ClientboundBlockDestructionPacket(this.getHandle().getId(), new BlockPos(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ()), stage); -+ ClientboundBlockDestructionPacket packet = new ClientboundBlockDestructionPacket(destroyerIdentity, new BlockPos(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ()), stage); // Paper - customBlockDamage identity - this.getHandle().connection.send(packet); - } - diff --git a/patches/server/0883-Fix-EndDragonFight-killed-statuses-should-be-false-f.patch b/patches/server/0882-Fix-EndDragonFight-killed-statuses-should-be-false-f.patch index 7a4404512c..7a4404512c 100644 --- a/patches/server/0883-Fix-EndDragonFight-killed-statuses-should-be-false-f.patch +++ b/patches/server/0882-Fix-EndDragonFight-killed-statuses-should-be-false-f.patch diff --git a/patches/server/0884-Fire-EntityChangeBlockEvent-in-more-places.patch b/patches/server/0883-Fire-EntityChangeBlockEvent-in-more-places.patch index b9d398ccc1..b9d398ccc1 100644 --- a/patches/server/0884-Fire-EntityChangeBlockEvent-in-more-places.patch +++ b/patches/server/0883-Fire-EntityChangeBlockEvent-in-more-places.patch diff --git a/patches/server/0885-Missing-eating-regain-reason.patch b/patches/server/0884-Missing-eating-regain-reason.patch index 8a23bd4de4..8a23bd4de4 100644 --- a/patches/server/0885-Missing-eating-regain-reason.patch +++ b/patches/server/0884-Missing-eating-regain-reason.patch diff --git a/patches/server/0886-Missing-effect-cause.patch b/patches/server/0885-Missing-effect-cause.patch index 193dbee015..193dbee015 100644 --- a/patches/server/0886-Missing-effect-cause.patch +++ b/patches/server/0885-Missing-effect-cause.patch diff --git a/patches/server/0887-Added-byte-array-serialization-deserialization-for-P.patch b/patches/server/0886-Added-byte-array-serialization-deserialization-for-P.patch index 3553cbd00c..3553cbd00c 100644 --- a/patches/server/0887-Added-byte-array-serialization-deserialization-for-P.patch +++ b/patches/server/0886-Added-byte-array-serialization-deserialization-for-P.patch diff --git a/patches/server/0888-Add-a-consumer-parameter-to-ProjectileSource-launchP.patch b/patches/server/0887-Add-a-consumer-parameter-to-ProjectileSource-launchP.patch index 9e82b6ea10..598fea5f74 100644 --- a/patches/server/0888-Add-a-consumer-parameter-to-ProjectileSource-launchP.patch +++ b/patches/server/0887-Add-a-consumer-parameter-to-ProjectileSource-launchP.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add a consumer parameter to ProjectileSource#launchProjectile diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index 1a2ea36994175c690c62aa8bc70201d8845c9209..02d181c0c4b5e105a3db238342d45c2e3e7b3dec 100644 +index cbb6b437358823cd52518682f32dd597c9aeb85a..b1b13bbcc01edae7b86e2ee78ebc88e686b482c2 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java @@ -499,8 +499,15 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { diff --git a/patches/server/0889-Call-BlockPhysicsEvent-more-often.patch b/patches/server/0888-Call-BlockPhysicsEvent-more-often.patch index 532418a20f..532418a20f 100644 --- a/patches/server/0889-Call-BlockPhysicsEvent-more-often.patch +++ b/patches/server/0888-Call-BlockPhysicsEvent-more-often.patch diff --git a/patches/server/0890-Configurable-chat-thread-limit.patch b/patches/server/0889-Configurable-chat-thread-limit.patch index e23447bc3e..e23447bc3e 100644 --- a/patches/server/0890-Configurable-chat-thread-limit.patch +++ b/patches/server/0889-Configurable-chat-thread-limit.patch diff --git a/patches/server/0891-Mitigate-effects-of-WorldCreator-keepSpawnLoaded-ret.patch b/patches/server/0890-Mitigate-effects-of-WorldCreator-keepSpawnLoaded-ret.patch index 5894565e16..5894565e16 100644 --- a/patches/server/0891-Mitigate-effects-of-WorldCreator-keepSpawnLoaded-ret.patch +++ b/patches/server/0890-Mitigate-effects-of-WorldCreator-keepSpawnLoaded-ret.patch diff --git a/patches/server/0892-Set-position-before-player-sending-on-dimension-chan.patch b/patches/server/0891-Set-position-before-player-sending-on-dimension-chan.patch index ed62ec7656..ed62ec7656 100644 --- a/patches/server/0892-Set-position-before-player-sending-on-dimension-chan.patch +++ b/patches/server/0891-Set-position-before-player-sending-on-dimension-chan.patch diff --git a/patches/server/0893-fix-Jigsaw-block-kicking-user.patch b/patches/server/0892-fix-Jigsaw-block-kicking-user.patch index 6206d8d028..6206d8d028 100644 --- a/patches/server/0893-fix-Jigsaw-block-kicking-user.patch +++ b/patches/server/0892-fix-Jigsaw-block-kicking-user.patch diff --git a/patches/server/0894-use-BlockFormEvent-for-mud-converting-into-clay.patch b/patches/server/0893-use-BlockFormEvent-for-mud-converting-into-clay.patch index 584695d3c9..584695d3c9 100644 --- a/patches/server/0894-use-BlockFormEvent-for-mud-converting-into-clay.patch +++ b/patches/server/0893-use-BlockFormEvent-for-mud-converting-into-clay.patch diff --git a/patches/server/0895-Add-getDrops-to-BlockState.patch b/patches/server/0894-Add-getDrops-to-BlockState.patch index a83779ec9a..a83779ec9a 100644 --- a/patches/server/0895-Add-getDrops-to-BlockState.patch +++ b/patches/server/0894-Add-getDrops-to-BlockState.patch diff --git a/patches/server/0896-Fix-a-bunch-of-vanilla-bugs.patch b/patches/server/0895-Fix-a-bunch-of-vanilla-bugs.patch index 519e58a711..519e58a711 100644 --- a/patches/server/0896-Fix-a-bunch-of-vanilla-bugs.patch +++ b/patches/server/0895-Fix-a-bunch-of-vanilla-bugs.patch diff --git a/patches/server/0897-Remove-unnecessary-onTrackingStart-during-navigation.patch b/patches/server/0896-Remove-unnecessary-onTrackingStart-during-navigation.patch index 25c03c6e50..d44526fff6 100644 --- a/patches/server/0897-Remove-unnecessary-onTrackingStart-during-navigation.patch +++ b/patches/server/0896-Remove-unnecessary-onTrackingStart-during-navigation.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Remove unnecessary onTrackingStart during navigation warning diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 0e02012f90efd729a9e4122f23a3d724ab7ebfbf..e265a11ef8cbb7b4da6dac01eb7f1aa45e0d6869 100644 +index 131a7ff0847272b2f9fecf62d0d28ca014689f5b..066744d37670e0ee4254a34743887416412b0065 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -2533,7 +2533,7 @@ public class ServerLevel extends Level implements WorldGenLevel { diff --git a/patches/server/0898-Fix-custom-piglin-loved-items.patch b/patches/server/0897-Fix-custom-piglin-loved-items.patch index 66144b5596..66144b5596 100644 --- a/patches/server/0898-Fix-custom-piglin-loved-items.patch +++ b/patches/server/0897-Fix-custom-piglin-loved-items.patch diff --git a/patches/server/0899-EntityPickupItemEvent-fixes.patch b/patches/server/0898-EntityPickupItemEvent-fixes.patch index b8ba8cba65..b8ba8cba65 100644 --- a/patches/server/0899-EntityPickupItemEvent-fixes.patch +++ b/patches/server/0898-EntityPickupItemEvent-fixes.patch diff --git a/patches/server/0900-Correctly-handle-interactions-with-items-on-cooldown.patch b/patches/server/0899-Correctly-handle-interactions-with-items-on-cooldown.patch index 72b11a7729..b342a73515 100644 --- a/patches/server/0900-Correctly-handle-interactions-with-items-on-cooldown.patch +++ b/patches/server/0899-Correctly-handle-interactions-with-items-on-cooldown.patch @@ -30,10 +30,10 @@ index 16a1416cb2ce01071a033c5049edfb60b614d56a..1d33c02088c150189d7f4b0aa27f6a1d 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 30360517235b2a568b92a43aa5efc0d6759c7e8e..cdb8ec04f4a19ec3dbedbd5b17a7d1f3afaa238e 100644 +index d2c0461bcc8e4c08bf375f76fad0c10086c40fd4..819c9c020f4d5a1373f68850134960d24b8fc308 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -498,6 +498,12 @@ public class CraftEventFactory { +@@ -515,6 +515,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 hitVec) { @@ -46,7 +46,7 @@ index 30360517235b2a568b92a43aa5efc0d6759c7e8e..cdb8ec04f4a19ec3dbedbd5b17a7d1f3 // Paper end Player player = (who == null) ? null : (Player) who.getBukkitEntity(); CraftItemStack itemInHand = CraftItemStack.asCraftMirror(itemstack); -@@ -531,6 +537,11 @@ public class CraftEventFactory { +@@ -548,6 +554,11 @@ public class CraftEventFactory { if (cancelledBlock) { event.setUseInteractedBlock(Event.Result.DENY); } diff --git a/patches/server/0901-Add-PlayerInventorySlotChangeEvent.patch b/patches/server/0900-Add-PlayerInventorySlotChangeEvent.patch index 5eca8e0ad2..5eca8e0ad2 100644 --- a/patches/server/0901-Add-PlayerInventorySlotChangeEvent.patch +++ b/patches/server/0900-Add-PlayerInventorySlotChangeEvent.patch diff --git a/patches/server/0902-Elder-Guardian-appearance-API.patch b/patches/server/0901-Elder-Guardian-appearance-API.patch index 78a171993a..df872f7ff2 100644 --- a/patches/server/0902-Elder-Guardian-appearance-API.patch +++ b/patches/server/0901-Elder-Guardian-appearance-API.patch @@ -5,10 +5,10 @@ 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 215fc81f5241f3fd24723f4d893f6968b1154aa7..1d4850c87ce2e98348f6e3ed951762271a3dae9b 100644 +index 061df56e4334b1821605b7e6badea4a760fdb512..884fe9c47f30b423d193137df7589660f9baca7b 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -3132,6 +3132,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -3152,6 +3152,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } // Paper end diff --git a/patches/server/0903-Allow-changing-bed-s-occupied-property.patch b/patches/server/0902-Allow-changing-bed-s-occupied-property.patch index 4d0128b6d3..4d0128b6d3 100644 --- a/patches/server/0903-Allow-changing-bed-s-occupied-property.patch +++ b/patches/server/0902-Allow-changing-bed-s-occupied-property.patch diff --git a/patches/server/0904-Add-entity-knockback-API.patch b/patches/server/0903-Add-entity-knockback-API.patch index a028ca3ed7..8c465ea23d 100644 --- a/patches/server/0904-Add-entity-knockback-API.patch +++ b/patches/server/0903-Add-entity-knockback-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add entity knockback API diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index 02d181c0c4b5e105a3db238342d45c2e3e7b3dec..97a0d3c9883704b40585b5738bd3498b1a95f36c 100644 +index b1b13bbcc01edae7b86e2ee78ebc88e686b482c2..1dcae648dd8b5fcd0ccd814ec44d4e071f0439c3 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java @@ -994,5 +994,11 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { diff --git a/patches/server/0905-Detect-headless-JREs.patch b/patches/server/0904-Detect-headless-JREs.patch index 2af5fb20b5..2af5fb20b5 100644 --- a/patches/server/0905-Detect-headless-JREs.patch +++ b/patches/server/0904-Detect-headless-JREs.patch diff --git a/patches/server/0906-fixed-entity-vehicle-collision-event-not-called.patch b/patches/server/0905-fixed-entity-vehicle-collision-event-not-called.patch index 7ed7d72f0b..7ed7d72f0b 100644 --- a/patches/server/0906-fixed-entity-vehicle-collision-event-not-called.patch +++ b/patches/server/0905-fixed-entity-vehicle-collision-event-not-called.patch diff --git a/patches/server/0907-optimized-dirt-and-snow-spreading.patch b/patches/server/0906-optimized-dirt-and-snow-spreading.patch index a146caa330..a146caa330 100644 --- a/patches/server/0907-optimized-dirt-and-snow-spreading.patch +++ b/patches/server/0906-optimized-dirt-and-snow-spreading.patch diff --git a/patches/server/0908-Added-EntityToggleSitEvent.patch b/patches/server/0907-Added-EntityToggleSitEvent.patch index bcf83ec157..bcf83ec157 100644 --- a/patches/server/0908-Added-EntityToggleSitEvent.patch +++ b/patches/server/0907-Added-EntityToggleSitEvent.patch diff --git a/patches/server/0909-Add-fire-tick-delay-option.patch b/patches/server/0908-Add-fire-tick-delay-option.patch index d1a7affb60..d1a7affb60 100644 --- a/patches/server/0909-Add-fire-tick-delay-option.patch +++ b/patches/server/0908-Add-fire-tick-delay-option.patch diff --git a/patches/server/0910-Add-Moving-Piston-API.patch b/patches/server/0909-Add-Moving-Piston-API.patch index 53df041ba1..53df041ba1 100644 --- a/patches/server/0910-Add-Moving-Piston-API.patch +++ b/patches/server/0909-Add-Moving-Piston-API.patch diff --git a/patches/server/0911-Ignore-impossible-spawn-tick.patch b/patches/server/0910-Ignore-impossible-spawn-tick.patch index 6c8f1c65d1..6c8f1c65d1 100644 --- a/patches/server/0911-Ignore-impossible-spawn-tick.patch +++ b/patches/server/0910-Ignore-impossible-spawn-tick.patch diff --git a/patches/server/0912-Track-projectile-source-for-fireworks-from-dispenser.patch b/patches/server/0911-Track-projectile-source-for-fireworks-from-dispenser.patch index 3f313856ec..3f313856ec 100644 --- a/patches/server/0912-Track-projectile-source-for-fireworks-from-dispenser.patch +++ b/patches/server/0911-Track-projectile-source-for-fireworks-from-dispenser.patch diff --git a/patches/server/0913-Fix-EntityArgument-suggestion-permissions-to-align-w.patch b/patches/server/0912-Fix-EntityArgument-suggestion-permissions-to-align-w.patch index af543e8884..af543e8884 100644 --- a/patches/server/0913-Fix-EntityArgument-suggestion-permissions-to-align-w.patch +++ b/patches/server/0912-Fix-EntityArgument-suggestion-permissions-to-align-w.patch diff --git a/patches/server/0914-Fix-EntityCombustEvent-cancellation-cant-fully-preve.patch b/patches/server/0913-Fix-EntityCombustEvent-cancellation-cant-fully-preve.patch index 19e7c0049d..e4e29a3c4f 100644 --- a/patches/server/0914-Fix-EntityCombustEvent-cancellation-cant-fully-preve.patch +++ b/patches/server/0913-Fix-EntityCombustEvent-cancellation-cant-fully-preve.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Fix EntityCombustEvent cancellation cant fully prevent diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 3a609fb4cd770d3945bd4ca7d7f0cca1a86d3d64..9796c6fc7c114e3e2af0dc433a87cda910683e06 100644 +index 32a74fa1afeef72c9014ded08ffb29eba7be1a1b..ad7754fc9bc8340ced8e39bcd882a1307781910c 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -3183,6 +3183,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { diff --git a/patches/server/0915-Prevent-compass-from-loading-chunks.patch b/patches/server/0914-Prevent-compass-from-loading-chunks.patch index fd21636990..fd21636990 100644 --- a/patches/server/0915-Prevent-compass-from-loading-chunks.patch +++ b/patches/server/0914-Prevent-compass-from-loading-chunks.patch diff --git a/patches/server/0916-Add-PrePlayerAttackEntityEvent.patch b/patches/server/0915-Add-PrePlayerAttackEntityEvent.patch index 666945e26b..666945e26b 100644 --- a/patches/server/0916-Add-PrePlayerAttackEntityEvent.patch +++ b/patches/server/0915-Add-PrePlayerAttackEntityEvent.patch diff --git a/patches/server/0917-ensure-reset-EnderDragon-boss-event-name.patch b/patches/server/0916-ensure-reset-EnderDragon-boss-event-name.patch index 369164484e..369164484e 100644 --- a/patches/server/0917-ensure-reset-EnderDragon-boss-event-name.patch +++ b/patches/server/0916-ensure-reset-EnderDragon-boss-event-name.patch diff --git a/patches/server/0918-fix-MC-252817-green-map-markers-do-not-disappear.patch b/patches/server/0917-fix-MC-252817-green-map-markers-do-not-disappear.patch index 0f696efd4d..0f696efd4d 100644 --- a/patches/server/0918-fix-MC-252817-green-map-markers-do-not-disappear.patch +++ b/patches/server/0917-fix-MC-252817-green-map-markers-do-not-disappear.patch diff --git a/patches/server/0919-Add-Player-Warden-Warning-API.patch b/patches/server/0918-Add-Player-Warden-Warning-API.patch index 487962a16d..6e2d9622ec 100644 --- a/patches/server/0919-Add-Player-Warden-Warning-API.patch +++ b/patches/server/0918-Add-Player-Warden-Warning-API.patch @@ -10,10 +10,10 @@ 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 1d4850c87ce2e98348f6e3ed951762271a3dae9b..5738e4494baffb035a82a2778b9f279acf463aeb 100644 +index 884fe9c47f30b423d193137df7589660f9baca7b..5279560ce77822f8aad8930fe916d49a47eb928c 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -3137,6 +3137,41 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -3157,6 +3157,41 @@ public class CraftPlayer extends CraftHumanEntity implements Player { public void showElderGuardian(boolean silent) { if (getHandle().connection != null) getHandle().connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.GUARDIAN_ELDER_EFFECT, silent ? 0F : 1F)); } diff --git a/patches/server/0920-More-vanilla-friendly-methods-to-update-trades.patch b/patches/server/0919-More-vanilla-friendly-methods-to-update-trades.patch index e8f2a36299..e8f2a36299 100644 --- a/patches/server/0920-More-vanilla-friendly-methods-to-update-trades.patch +++ b/patches/server/0919-More-vanilla-friendly-methods-to-update-trades.patch diff --git a/patches/server/0921-Add-paper-dumplisteners-command.patch b/patches/server/0920-Add-paper-dumplisteners-command.patch index cbf1598dd5..cbf1598dd5 100644 --- a/patches/server/0921-Add-paper-dumplisteners-command.patch +++ b/patches/server/0920-Add-paper-dumplisteners-command.patch diff --git a/patches/server/0922-check-global-player-list-where-appropriate.patch b/patches/server/0921-check-global-player-list-where-appropriate.patch index a3adbf37e2..a798961a60 100644 --- a/patches/server/0922-check-global-player-list-where-appropriate.patch +++ b/patches/server/0921-check-global-player-list-where-appropriate.patch @@ -7,7 +7,7 @@ Makes certain entities check all players when searching for a player instead of just checking players in their world. diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index e265a11ef8cbb7b4da6dac01eb7f1aa45e0d6869..5a5ff40df37db9cbd53c584ed26a3ce4888b29c0 100644 +index 066744d37670e0ee4254a34743887416412b0065..309ef1b2181eae609737212a50d037a1565daf86 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -2655,4 +2655,12 @@ public class ServerLevel extends Level implements WorldGenLevel { diff --git a/patches/server/0923-Fix-async-entity-add-due-to-fungus-trees.patch b/patches/server/0922-Fix-async-entity-add-due-to-fungus-trees.patch index 1db4b01581..1db4b01581 100644 --- a/patches/server/0923-Fix-async-entity-add-due-to-fungus-trees.patch +++ b/patches/server/0922-Fix-async-entity-add-due-to-fungus-trees.patch diff --git a/patches/server/0924-ItemStack-damage-API.patch b/patches/server/0923-ItemStack-damage-API.patch index 1281637f41..d2b6d9c704 100644 --- a/patches/server/0924-ItemStack-damage-API.patch +++ b/patches/server/0923-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/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index 97a0d3c9883704b40585b5738bd3498b1a95f36c..d7c3edea63fd447ea9e6b48c3ccd6fa4ee94542c 100644 +index 1dcae648dd8b5fcd0ccd814ec44d4e071f0439c3..755ada4b9cbec40bd1d0db2b0ba4ece5933d4e8d 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java @@ -995,6 +995,53 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { diff --git a/patches/server/0925-Friction-API.patch b/patches/server/0924-Friction-API.patch index 2622586400..4ddd0807eb 100644 --- a/patches/server/0925-Friction-API.patch +++ b/patches/server/0924-Friction-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Friction API diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 590a14cd045baa892119505df1063b18c6f1fd71..24bcbe515dac7f6cab28a4148afb23d1f44be94b 100644 +index a7d74f16d82853f40d5641794dc12a8404359c94..1f41b48964f168532e9f07a4e708e2afb3791c3e 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -260,6 +260,7 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -132,7 +132,7 @@ index e9946edf568db010e4ccb9fe7755709ed7b8310f..a925b5c490e7129b27370aa57b5fad1c public int getHealth() { return item.health; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index d7c3edea63fd447ea9e6b48c3ccd6fa4ee94542c..62b5df7e3bcf1037d96897b41f25038c535515d5 100644 +index 755ada4b9cbec40bd1d0db2b0ba4ece5933d4e8d..a77f626f79db9a10367bcd51ae946f93fea6ee69 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java @@ -1042,6 +1042,18 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { diff --git a/patches/server/0926-Ability-to-control-player-s-insomnia-and-phantoms.patch b/patches/server/0925-Ability-to-control-player-s-insomnia-and-phantoms.patch index a2a1265494..a2a1265494 100644 --- a/patches/server/0926-Ability-to-control-player-s-insomnia-and-phantoms.patch +++ b/patches/server/0925-Ability-to-control-player-s-insomnia-and-phantoms.patch diff --git a/patches/server/0927-Fix-player-kick-on-shutdown.patch b/patches/server/0926-Fix-player-kick-on-shutdown.patch index 0d15ddf052..b954657690 100644 --- a/patches/server/0927-Fix-player-kick-on-shutdown.patch +++ b/patches/server/0926-Fix-player-kick-on-shutdown.patch @@ -9,7 +9,7 @@ also check if all packets are ignored during the shutdown process. See net.minecraft.network.Connection#channelRead0(ChannelHandlerContext, Packet) and net.minecraft.util.thread.BlockableEventLoop#executeIfPossible(Runnable) diff --git a/src/main/java/net/minecraft/network/protocol/PacketUtils.java b/src/main/java/net/minecraft/network/protocol/PacketUtils.java -index 23c81b3a96056f0b755735ad75fc81af9b046475..10ce342d663527601a638a9904257648b867e8f3 100644 +index 52a84eeb3b7df782cbf91aac6df42fb8f99077f6..d2f0a0755317f5fa9a1ccf7db346aa77fd287d80 100644 --- a/src/main/java/net/minecraft/network/protocol/PacketUtils.java +++ b/src/main/java/net/minecraft/network/protocol/PacketUtils.java @@ -41,7 +41,7 @@ public class PacketUtils { diff --git a/patches/server/0928-Sync-offhand-slot-in-menus.patch b/patches/server/0927-Sync-offhand-slot-in-menus.patch index 3e2a8413e4..3e2a8413e4 100644 --- a/patches/server/0928-Sync-offhand-slot-in-menus.patch +++ b/patches/server/0927-Sync-offhand-slot-in-menus.patch diff --git a/patches/server/0929-Player-Entity-Tracking-Events.patch b/patches/server/0928-Player-Entity-Tracking-Events.patch index d9eba049b4..d9eba049b4 100644 --- a/patches/server/0929-Player-Entity-Tracking-Events.patch +++ b/patches/server/0928-Player-Entity-Tracking-Events.patch diff --git a/patches/server/0930-Limit-pet-look-distance.patch b/patches/server/0929-Limit-pet-look-distance.patch index 8309939ccb..8309939ccb 100644 --- a/patches/server/0930-Limit-pet-look-distance.patch +++ b/patches/server/0929-Limit-pet-look-distance.patch diff --git a/patches/server/0931-Properly-resend-entities.patch b/patches/server/0930-Properly-resend-entities.patch index c7c1dfd208..c7c1dfd208 100644 --- a/patches/server/0931-Properly-resend-entities.patch +++ b/patches/server/0930-Properly-resend-entities.patch diff --git a/patches/server/0932-Fixes-and-additions-to-the-SpawnReason-API.patch b/patches/server/0931-Fixes-and-additions-to-the-SpawnReason-API.patch index 8a818be552..8a818be552 100644 --- a/patches/server/0932-Fixes-and-additions-to-the-SpawnReason-API.patch +++ b/patches/server/0931-Fixes-and-additions-to-the-SpawnReason-API.patch diff --git a/patches/server/0933-fix-Instruments.patch b/patches/server/0932-fix-Instruments.patch index 77044918ef..e86c82fab7 100644 --- a/patches/server/0933-fix-Instruments.patch +++ b/patches/server/0932-fix-Instruments.patch @@ -6,10 +6,10 @@ 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 634e1b33996471e2a9dc0274f3a22cffcb0d4ff7..18357352824fdd6604c450b759646134a3a42074 100644 +index 68acf053ff84cc32967de27363cf8fadd557f55b..df977da24611434b29cd00c6d3ae07e479ee228d 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -771,62 +771,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -772,62 +772,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player { public void playNote(Location loc, Instrument instrument, Note note) { if (this.getHandle().connection == null) return; diff --git a/patches/server/0934-Improve-inlining-for-some-hot-BlockBehavior-and-Flui.patch b/patches/server/0933-Improve-inlining-for-some-hot-BlockBehavior-and-Flui.patch index cef783939a..cef783939a 100644 --- a/patches/server/0934-Improve-inlining-for-some-hot-BlockBehavior-and-Flui.patch +++ b/patches/server/0933-Improve-inlining-for-some-hot-BlockBehavior-and-Flui.patch diff --git a/patches/server/0935-Fix-MapLike-Codec-missing-key-selector.patch b/patches/server/0934-Fix-MapLike-Codec-missing-key-selector.patch index 4902873c14..4902873c14 100644 --- a/patches/server/0935-Fix-MapLike-Codec-missing-key-selector.patch +++ b/patches/server/0934-Fix-MapLike-Codec-missing-key-selector.patch diff --git a/patches/server/0936-Fix-inconsistencies-in-dispense-events-regarding-sta.patch b/patches/server/0935-Fix-inconsistencies-in-dispense-events-regarding-sta.patch index e131a4e0c2..e131a4e0c2 100644 --- a/patches/server/0936-Fix-inconsistencies-in-dispense-events-regarding-sta.patch +++ b/patches/server/0935-Fix-inconsistencies-in-dispense-events-regarding-sta.patch diff --git a/patches/server/0937-Improve-logging-and-errors.patch b/patches/server/0936-Improve-logging-and-errors.patch index 5f9461d68e..5f9461d68e 100644 --- a/patches/server/0937-Improve-logging-and-errors.patch +++ b/patches/server/0936-Improve-logging-and-errors.patch diff --git a/patches/server/0938-Add-BlockLockCheckEvent.patch b/patches/server/0937-Add-BlockLockCheckEvent.patch index 418beed161..418beed161 100644 --- a/patches/server/0938-Add-BlockLockCheckEvent.patch +++ b/patches/server/0937-Add-BlockLockCheckEvent.patch diff --git a/patches/server/0939-Add-Sneaking-API-for-Entities.patch b/patches/server/0938-Add-Sneaking-API-for-Entities.patch index e96f4985cd..e96f4985cd 100644 --- a/patches/server/0939-Add-Sneaking-API-for-Entities.patch +++ b/patches/server/0938-Add-Sneaking-API-for-Entities.patch diff --git a/patches/server/0940-Improve-PortalEvents.patch b/patches/server/0939-Improve-PortalEvents.patch index 46a25cee0c..46a25cee0c 100644 --- a/patches/server/0940-Improve-PortalEvents.patch +++ b/patches/server/0939-Improve-PortalEvents.patch diff --git a/patches/server/0941-Add-config-option-for-spider-worldborder-climbing.patch b/patches/server/0940-Add-config-option-for-spider-worldborder-climbing.patch index 6c2a6ed80b..6c2a6ed80b 100644 --- a/patches/server/0941-Add-config-option-for-spider-worldborder-climbing.patch +++ b/patches/server/0940-Add-config-option-for-spider-worldborder-climbing.patch diff --git a/patches/server/0942-Add-missing-SpigotConfig-logCommands-check.patch b/patches/server/0941-Add-missing-SpigotConfig-logCommands-check.patch index 4379b7b7b7..4379b7b7b7 100644 --- a/patches/server/0942-Add-missing-SpigotConfig-logCommands-check.patch +++ b/patches/server/0941-Add-missing-SpigotConfig-logCommands-check.patch diff --git a/patches/server/0943-Fix-NPE-on-Allay-stopDancing-while-not-dancing.patch b/patches/server/0942-Fix-NPE-on-Allay-stopDancing-while-not-dancing.patch index c031d75462..c031d75462 100644 --- a/patches/server/0943-Fix-NPE-on-Allay-stopDancing-while-not-dancing.patch +++ b/patches/server/0942-Fix-NPE-on-Allay-stopDancing-while-not-dancing.patch diff --git a/patches/server/0944-Flying-Fall-Damage.patch b/patches/server/0943-Flying-Fall-Damage.patch index 89fea580e9..6144ef002c 100644 --- a/patches/server/0944-Flying-Fall-Damage.patch +++ b/patches/server/0943-Flying-Fall-Damage.patch @@ -26,10 +26,10 @@ index 5b772b3caeafe98aa45a01bffe215a5dd33323b6..0629c471d38a77c44fc1c86ccdfcb069 } 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 788b05b3b2c6277051bdf81e2a788e03c42a3e42..68241347f9e69593b34e0073f86150b53bae0122 100644 +index f26655ebc1edfef060fb4d97fa56a42cede9b4ff..0d804163de6d332aa1ed60eece6ad4c8c538df85 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -2300,6 +2300,19 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2320,6 +2320,19 @@ public class CraftPlayer extends CraftHumanEntity implements Player { this.getHandle().onUpdateAbilities(); } diff --git a/patches/server/0945-Add-exploded-block-state-to-BlockExplodeEvent.patch b/patches/server/0944-Add-exploded-block-state-to-BlockExplodeEvent.patch index edb84486aa..edb84486aa 100644 --- a/patches/server/0945-Add-exploded-block-state-to-BlockExplodeEvent.patch +++ b/patches/server/0944-Add-exploded-block-state-to-BlockExplodeEvent.patch diff --git a/patches/server/0946-Expose-pre-collision-moving-velocity-to-VehicleBlock.patch b/patches/server/0945-Expose-pre-collision-moving-velocity-to-VehicleBlock.patch index b6ed2a081f..b6ed2a081f 100644 --- a/patches/server/0946-Expose-pre-collision-moving-velocity-to-VehicleBlock.patch +++ b/patches/server/0945-Expose-pre-collision-moving-velocity-to-VehicleBlock.patch diff --git a/patches/server/0947-config-for-disabling-entity-tag-tags.patch b/patches/server/0946-config-for-disabling-entity-tag-tags.patch index 9cbe2afe45..9cbe2afe45 100644 --- a/patches/server/0947-config-for-disabling-entity-tag-tags.patch +++ b/patches/server/0946-config-for-disabling-entity-tag-tags.patch diff --git a/patches/server/0948-Use-single-player-info-update-packet-on-join.patch b/patches/server/0947-Use-single-player-info-update-packet-on-join.patch index 7798b6aa59..7798b6aa59 100644 --- a/patches/server/0948-Use-single-player-info-update-packet-on-join.patch +++ b/patches/server/0947-Use-single-player-info-update-packet-on-join.patch diff --git a/patches/server/0949-Correctly-shrink-items-during-EntityResurrectEvent.patch b/patches/server/0948-Correctly-shrink-items-during-EntityResurrectEvent.patch index 46a3999218..46a3999218 100644 --- a/patches/server/0949-Correctly-shrink-items-during-EntityResurrectEvent.patch +++ b/patches/server/0948-Correctly-shrink-items-during-EntityResurrectEvent.patch diff --git a/patches/server/0950-Win-Screen-API.patch b/patches/server/0949-Win-Screen-API.patch index 24af96107a..d46c7a1fc9 100644 --- a/patches/server/0950-Win-Screen-API.patch +++ b/patches/server/0949-Win-Screen-API.patch @@ -7,10 +7,10 @@ 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 cdb1e5d82ff1e18e3f27c816df57bd9eeebbe80b..0ae1fce0c1a2e3bfbbab756a088fc76545e263fa 100644 +index cec690035206876ac8bd1ad0b06cb88ec1e178ab..cd28c82f3f8150ca7def1fd6e4cb4a321e53c18e 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1211,6 +1211,25 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1231,6 +1231,25 @@ public class CraftPlayer extends CraftHumanEntity implements Player { this.getHandle().connection.send(packet); } diff --git a/patches/server/0951-Remove-CraftItemStack-setAmount-null-assignment.patch b/patches/server/0950-Remove-CraftItemStack-setAmount-null-assignment.patch index 173cdf6f07..173cdf6f07 100644 --- a/patches/server/0951-Remove-CraftItemStack-setAmount-null-assignment.patch +++ b/patches/server/0950-Remove-CraftItemStack-setAmount-null-assignment.patch diff --git a/patches/server/0952-Fix-force-opening-enchantment-tables.patch b/patches/server/0951-Fix-force-opening-enchantment-tables.patch index 2abcb07620..2abcb07620 100644 --- a/patches/server/0952-Fix-force-opening-enchantment-tables.patch +++ b/patches/server/0951-Fix-force-opening-enchantment-tables.patch diff --git a/patches/server/0953-Add-Entity-Body-Yaw-API.patch b/patches/server/0952-Add-Entity-Body-Yaw-API.patch index d678f5f776..d678f5f776 100644 --- a/patches/server/0953-Add-Entity-Body-Yaw-API.patch +++ b/patches/server/0952-Add-Entity-Body-Yaw-API.patch diff --git a/patches/server/0954-Fix-MC-157464-Prevent-sleeping-villagers-moving-towa.patch b/patches/server/0953-Fix-MC-157464-Prevent-sleeping-villagers-moving-towa.patch index efaf1a6e90..efaf1a6e90 100644 --- a/patches/server/0954-Fix-MC-157464-Prevent-sleeping-villagers-moving-towa.patch +++ b/patches/server/0953-Fix-MC-157464-Prevent-sleeping-villagers-moving-towa.patch diff --git a/patches/server/0955-Update-the-flag-when-a-captured-block-state-is-outda.patch b/patches/server/0954-Update-the-flag-when-a-captured-block-state-is-outda.patch index b2d97d5308..b2d97d5308 100644 --- a/patches/server/0955-Update-the-flag-when-a-captured-block-state-is-outda.patch +++ b/patches/server/0954-Update-the-flag-when-a-captured-block-state-is-outda.patch diff --git a/patches/server/0956-Add-EntityFertilizeEggEvent.patch b/patches/server/0955-Add-EntityFertilizeEggEvent.patch index 6adba33ca2..6adba33ca2 100644 --- a/patches/server/0956-Add-EntityFertilizeEggEvent.patch +++ b/patches/server/0955-Add-EntityFertilizeEggEvent.patch diff --git a/patches/server/0957-Fix-HumanEntity-drop-not-updating-the-client-inv.patch b/patches/server/0956-Fix-HumanEntity-drop-not-updating-the-client-inv.patch index 5d32898ade..5d32898ade 100644 --- a/patches/server/0957-Fix-HumanEntity-drop-not-updating-the-client-inv.patch +++ b/patches/server/0956-Fix-HumanEntity-drop-not-updating-the-client-inv.patch diff --git a/patches/server/0958-Add-CompostItemEvent-and-EntityCompostItemEvent.patch b/patches/server/0957-Add-CompostItemEvent-and-EntityCompostItemEvent.patch index 4ab90c3947..4ab90c3947 100644 --- a/patches/server/0958-Add-CompostItemEvent-and-EntityCompostItemEvent.patch +++ b/patches/server/0957-Add-CompostItemEvent-and-EntityCompostItemEvent.patch diff --git a/patches/server/0959-Correctly-handle-ArmorStand-invisibility.patch b/patches/server/0958-Correctly-handle-ArmorStand-invisibility.patch index 103ddcbb11..103ddcbb11 100644 --- a/patches/server/0959-Correctly-handle-ArmorStand-invisibility.patch +++ b/patches/server/0958-Correctly-handle-ArmorStand-invisibility.patch diff --git a/patches/server/0960-Fix-advancement-triggers-for-entity-damage.patch b/patches/server/0959-Fix-advancement-triggers-for-entity-damage.patch index 585ee6a4dd..585ee6a4dd 100644 --- a/patches/server/0960-Fix-advancement-triggers-for-entity-damage.patch +++ b/patches/server/0959-Fix-advancement-triggers-for-entity-damage.patch diff --git a/patches/server/0961-Fix-text-display-error-on-spawn.patch b/patches/server/0960-Fix-text-display-error-on-spawn.patch index a486841821..a486841821 100644 --- a/patches/server/0961-Fix-text-display-error-on-spawn.patch +++ b/patches/server/0960-Fix-text-display-error-on-spawn.patch diff --git a/patches/server/0962-Fix-certain-inventories-returning-null-Locations.patch b/patches/server/0961-Fix-certain-inventories-returning-null-Locations.patch index 3cd182f806..3cd182f806 100644 --- a/patches/server/0962-Fix-certain-inventories-returning-null-Locations.patch +++ b/patches/server/0961-Fix-certain-inventories-returning-null-Locations.patch diff --git a/patches/server/0963-Add-Shearable-API.patch b/patches/server/0962-Add-Shearable-API.patch index 950ecc2beb..950ecc2beb 100644 --- a/patches/server/0963-Add-Shearable-API.patch +++ b/patches/server/0962-Add-Shearable-API.patch diff --git a/patches/server/0964-Fix-SpawnEggMeta-get-setSpawnedType.patch b/patches/server/0963-Fix-SpawnEggMeta-get-setSpawnedType.patch index 4c90082c28..4c90082c28 100644 --- a/patches/server/0964-Fix-SpawnEggMeta-get-setSpawnedType.patch +++ b/patches/server/0963-Fix-SpawnEggMeta-get-setSpawnedType.patch diff --git a/patches/server/0965-Fix-chiseled-bookshelf-and-jukebox-setItem-with-air.patch b/patches/server/0964-Fix-chiseled-bookshelf-and-jukebox-setItem-with-air.patch index 7d6b194d1b..7d6b194d1b 100644 --- a/patches/server/0965-Fix-chiseled-bookshelf-and-jukebox-setItem-with-air.patch +++ b/patches/server/0964-Fix-chiseled-bookshelf-and-jukebox-setItem-with-air.patch diff --git a/patches/server/0966-Optimize-Hoppers.patch b/patches/server/0965-Optimize-Hoppers.patch index 79e1fb0299..79e1fb0299 100644 --- a/patches/server/0966-Optimize-Hoppers.patch +++ b/patches/server/0965-Optimize-Hoppers.patch diff --git a/patches/server/0967-Fix-beehives-generating-from-using-bonemeal.patch b/patches/server/0966-Fix-beehives-generating-from-using-bonemeal.patch index 2157e12c6e..2157e12c6e 100644 --- a/patches/server/0967-Fix-beehives-generating-from-using-bonemeal.patch +++ b/patches/server/0966-Fix-beehives-generating-from-using-bonemeal.patch diff --git a/patches/server/0968-Properly-cancel-bed-block-placement.patch b/patches/server/0967-Properly-cancel-bed-block-placement.patch index b6c7ef8f4e..b6c7ef8f4e 100644 --- a/patches/server/0968-Properly-cancel-bed-block-placement.patch +++ b/patches/server/0967-Properly-cancel-bed-block-placement.patch diff --git a/patches/server/0969-Fix-api-checking-banned-ips.patch b/patches/server/0968-Fix-api-checking-banned-ips.patch index a69b2e70fd..a69b2e70fd 100644 --- a/patches/server/0969-Fix-api-checking-banned-ips.patch +++ b/patches/server/0968-Fix-api-checking-banned-ips.patch diff --git a/patches/server/0970-Fix-crash-relating-to-bad-recipes-in-furnace-like-ti.patch b/patches/server/0969-Fix-crash-relating-to-bad-recipes-in-furnace-like-ti.patch index 59f3bf134a..59f3bf134a 100644 --- a/patches/server/0970-Fix-crash-relating-to-bad-recipes-in-furnace-like-ti.patch +++ b/patches/server/0969-Fix-crash-relating-to-bad-recipes-in-furnace-like-ti.patch diff --git a/patches/server/0971-Treat-sequence-violations-like-they-should-be.patch b/patches/server/0970-Treat-sequence-violations-like-they-should-be.patch index ece089f04f..ece089f04f 100644 --- a/patches/server/0971-Treat-sequence-violations-like-they-should-be.patch +++ b/patches/server/0970-Treat-sequence-violations-like-they-should-be.patch diff --git a/patches/server/0972-remove-duplicate-animate-packet-for-records.patch b/patches/server/0971-remove-duplicate-animate-packet-for-records.patch index 0958982027..0958982027 100644 --- a/patches/server/0972-remove-duplicate-animate-packet-for-records.patch +++ b/patches/server/0971-remove-duplicate-animate-packet-for-records.patch diff --git a/patches/server/0973-Prevent-causing-expired-keys-from-impacting-new-join.patch b/patches/server/0972-Prevent-causing-expired-keys-from-impacting-new-join.patch index 40dacfb413..40dacfb413 100644 --- a/patches/server/0973-Prevent-causing-expired-keys-from-impacting-new-join.patch +++ b/patches/server/0972-Prevent-causing-expired-keys-from-impacting-new-join.patch diff --git a/patches/server/0974-Prevent-GameEvents-being-fired-from-unloaded-chunks.patch b/patches/server/0973-Prevent-GameEvents-being-fired-from-unloaded-chunks.patch index 73b980dd13..73b980dd13 100644 --- a/patches/server/0974-Prevent-GameEvents-being-fired-from-unloaded-chunks.patch +++ b/patches/server/0973-Prevent-GameEvents-being-fired-from-unloaded-chunks.patch diff --git a/patches/server/0975-Use-array-for-gamerule-storage.patch b/patches/server/0974-Use-array-for-gamerule-storage.patch index 52052561af..52052561af 100644 --- a/patches/server/0975-Use-array-for-gamerule-storage.patch +++ b/patches/server/0974-Use-array-for-gamerule-storage.patch diff --git a/patches/server/0976-Fix-block-place-logic.patch b/patches/server/0975-Fix-block-place-logic.patch index 0191cb1f5d..0191cb1f5d 100644 --- a/patches/server/0976-Fix-block-place-logic.patch +++ b/patches/server/0975-Fix-block-place-logic.patch diff --git a/work/Bukkit b/work/Bukkit -Subproject 9153f77e75057c0d0be267de6e0dca89e487625 +Subproject 5efeb7bdbfa459cd0a59aa6a8941ff962662617 diff --git a/work/CraftBukkit b/work/CraftBukkit -Subproject e142fb9fd3784080c43e025c32d8306881fee4c +Subproject be8682aa824764ebf811107c5eb928ffad6c1af diff --git a/work/Spigot b/work/Spigot -Subproject 6ad4b93c2ab4d981910821bd43be6a085177bed +Subproject b31949f2f33ef94ed07dbe37fb00939cf049a98 |