diff --git a/patches/api/0013-Add-view-distance-API.patch b/patches/api/0013-Add-view-distance-API.patch index a412614ba2..39d56d9e1d 100644 --- a/patches/api/0013-Add-view-distance-API.patch +++ b/patches/api/0013-Add-view-distance-API.patch @@ -7,6 +7,63 @@ 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 c58b1885662c6a234ffee75995051c9750c1a512..7b1fb280a86ab44756fc233b085f878d2a27ad66 100644 +--- a/src/main/java/org/bukkit/World.java ++++ b/src/main/java/org/bukkit/World.java +@@ -2450,6 +2450,52 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient + int getSimulationDistance(); + // 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 15ffc7d80bcd7e19fe5477d553e16874d9133c87..e1069d58142c863047b6ed13358e7cfee30a3685 100644 --- a/src/main/java/org/bukkit/entity/Player.java