From 0d44fec1fb68fe6efd1425c2c61ff26490fc290e Mon Sep 17 00:00:00 2001 From: Jason Penilla <11360596+jpenilla@users.noreply.github.com> Date: Sun, 21 Nov 2021 21:21:37 -0800 Subject: [PATCH] Update API patches --- patches/api/Add-view-distance-API.patch | 56 ---------------- patches/api/Adventure.patch | 72 ++++----------------- patches/api/Build-system-changes.patch | 10 +-- patches/api/Convert-project-to-Gradle.patch | 20 +++--- 4 files changed, 25 insertions(+), 133 deletions(-) diff --git a/patches/api/Add-view-distance-API.patch b/patches/api/Add-view-distance-API.patch index 5ca99cef8a..c45c2c0a48 100644 --- a/patches/api/Add-view-distance-API.patch +++ b/patches/api/Add-view-distance-API.patch @@ -7,62 +7,6 @@ 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/org/bukkit/World.java -+++ b/src/main/java/org/bukkit/World.java -@@ -0,0 +0,0 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient - int getViewDistance(); - // Spigot end - -+ // Paper start - view distance api -+ /** -+ * Sets the view distance for this world. -+ * @param viewDistance view distance in [2, 32] -+ */ -+ void setViewDistance(int viewDistance); -+ -+ /** -+ * Returns the no-tick view distance for this world. -+ *
-+ * No-tick view distance is the view distance where chunks will load, however the chunks and their entities will not -+ * be set to tick. -+ *
-+ * @return The no-tick view distance for this world. -+ */ -+ int getNoTickViewDistance(); -+ -+ /** -+ * Sets the no-tick view distance for this world. -+ *-+ * No-tick view distance is the view distance where chunks will load, however the chunks and their entities will not -+ * be set to tick. -+ *
-+ * @param viewDistance view distance in [2, 32] -+ */ -+ void setNoTickViewDistance(int viewDistance); -+ -+ /** -+ * Gets the sending view distance for this world. -+ *-+ * Sending view distance is the view distance where chunks will load in for players in this world. -+ *
-+ * @return The sending view distance for this world. -+ */ -+ public int getSendViewDistance(); -+ -+ /** -+ * Sets the sending view distance for this world. -+ *-+ * Sending view distance is the view distance where chunks will load in for players in this world. -+ *
-+ * @param viewDistance view distance in [2, 32] or -1 -+ */ -+ public void setSendViewDistance(int viewDistance); -+ // Paper end - view distance api - // Spigot start - public class Spigot { - diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/entity/Player.java diff --git a/patches/api/Adventure.patch b/patches/api/Adventure.patch index eb36f17c40..193fac3d49 100644 --- a/patches/api/Adventure.patch +++ b/patches/api/Adventure.patch @@ -42,32 +42,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 compileOnly("org.apache.maven:maven-resolver-provider:3.8.1") compileOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.7.0") -@@ -0,0 +0,0 @@ tasks.jar { - } - - tasks.withType
-+ * If the client does not have a sign at the given location it will
-+ * display an error message to the user.
-+ *
-+ * @param loc the location of the sign
-+ * @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
+ /**
+ * 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.
+@@ -0,0 +0,0 @@ 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
+ * @deprecated in favour of {@link #sendSignChange(org.bukkit.Location, java.util.List)}
-+ */
+ */
+ @Deprecated // Paper
public void sendSignChange(@NotNull Location loc, @Nullable String[] lines) throws IllegalArgumentException;
diff --git a/patches/api/Build-system-changes.patch b/patches/api/Build-system-changes.patch
index 2f8f0e748e..4228bc8577 100644
--- a/patches/api/Build-system-changes.patch
+++ b/patches/api/Build-system-changes.patch
@@ -9,11 +9,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -0,0 +0,0 @@ dependencies {
- // api dependencies are listed transitively to API consumers
- api("commons-lang:commons-lang:2.6")
- api("com.google.guava:guava:21.0")
-- api("com.google.code.gson:gson:2.8.0")
-+ api("com.google.code.gson:gson:2.8.8") // Paper - bump
+ api("com.google.code.gson:gson:2.8.8")
api("net.md-5:bungeecord-chat:1.16-R0.4")
api("org.yaml:snakeyaml:1.28")
+ api("com.googlecode.json-simple:json-simple:1.1.1") // Paper
@@ -29,7 +25,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
testCompileOnly(annotations)
+ // Paper start - add checker
-+ val checkerAnnotations = "org.checkerframework:checker-qual:3.18.0"
++ val checkerAnnotations = "org.checkerframework:checker-qual:3.19.0"
+ compileOnlyApi(checkerAnnotations)
+ testCompileOnly(checkerAnnotations)
+ // Paper end
@@ -39,7 +35,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
testImplementation("org.ow2.asm:asm-tree:9.2")
@@ -0,0 +0,0 @@ tasks.withType