2020-05-06 09:48:49 +00:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
2020-05-06 07:49:52 +00:00
|
|
|
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
|
|
|
Date: Tue, 5 May 2020 21:28:01 -0700
|
|
|
|
Subject: [PATCH] World view distance api
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
2020-11-16 00:26:25 +00:00
|
|
|
index 85f549c7593c417d280fb31ce5cfdaf89f2f8dd2..677c29d1e4a768c9349368f9ec618bc86d31a439 100644
|
2020-05-06 07:49:52 +00:00
|
|
|
--- a/src/main/java/org/bukkit/World.java
|
|
|
|
+++ b/src/main/java/org/bukkit/World.java
|
2020-11-16 00:26:25 +00:00
|
|
|
@@ -3368,6 +3368,34 @@ public interface World extends PluginMessageRecipient, Metadatable {
|
2020-05-06 07:49:52 +00:00
|
|
|
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.
|
|
|
|
+ * <p>
|
|
|
|
+ * No-tick view distance is the view distance where chunks will load, however the chunks and their entities will not
|
|
|
|
+ * be set to tick.
|
|
|
|
+ * </p>
|
|
|
|
+ * @return The no-tick view distance for this world.
|
|
|
|
+ */
|
|
|
|
+ int getNoTickViewDistance();
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * Sets the no-tick view distance for this world.
|
|
|
|
+ * <p>
|
|
|
|
+ * No-tick view distance is the view distance where chunks will load, however the chunks and their entities will not
|
|
|
|
+ * be set to tick.
|
|
|
|
+ * </p>
|
|
|
|
+ * @param viewDistance view distance in [2, 32]
|
|
|
|
+ */
|
|
|
|
+ void setNoTickViewDistance(int viewDistance);
|
|
|
|
+ // Paper end - view distance api
|
|
|
|
+
|
|
|
|
// Spigot start
|
|
|
|
public class Spigot {
|
|
|
|
|