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
This commit is contained in:
Jake Potrebic 2023-04-07 11:39:13 -07:00 committed by GitHub
parent ad6c14c62e
commit 29b17a892d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
274 changed files with 557 additions and 771 deletions

View File

@ -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>

View File

@ -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

View File

@ -7,7 +7,7 @@ Co-authored-by: zml <zml@stellardrift.ca>
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
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

View File

@ -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.");

View File

@ -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();

View File

@ -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);

View File

@ -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.

View File

@ -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);
}

View File

@ -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())));
}

View File

@ -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
*

View File

@ -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

View File

@ -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();

View File

@ -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();

View File

@ -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.
*

View File

@ -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

View File

@ -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);

View File

@ -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()}
*/

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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.

View File

@ -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));
}

View File

@ -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

View File

@ -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);

View File

@ -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);

View File

@ -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

View File

@ -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();

View File

@ -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
}

View File

@ -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);
+ }
+}

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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();
+

View File

@ -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

View File

@ -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);

View File

@ -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();

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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);

View File

@ -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
+ /**

View File

@ -1,38 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: TheFruxz <cedricspitzer@outlook.de>
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.

View File

@ -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

View File

@ -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);

View File

@ -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

View File

@ -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

View File

@ -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);

View File

@ -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);

View File

@ -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>

View File

@ -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));
+ });
+ });
+

View File

@ -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) {

View File

@ -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));
}

View File

@ -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());

View File

@ -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();
}

View File

@ -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;

View File

@ -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) {

View File

@ -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) {

View File

@ -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() {

View File

@ -21,7 +21,7 @@ character.
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
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;

View File

@ -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

View File

@ -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 {
}
}

View File

@ -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 {

View File

@ -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);

View File

@ -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;
}

View File

@ -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) {

View File

@ -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 {
}
}

View File

@ -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);
}

View File

@ -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 {

Some files were not shown because too many files have changed in this diff Show More