-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
No-Tick view distance implementation - Closes #3196
Implements world view distance getters/setters Per-Player is absent due to difficulty of maintaining the diff required to make it happen.
- Loading branch information
1 parent
b87743c
commit 878c66f
Showing
2 changed files
with
710 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
From 919aecffc9c10f8e95f114e326cae396bd48e409 Mon Sep 17 00:00:00 2001 | ||
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 | ||
index db18f70e..421ad6a9 100644 | ||
--- a/src/main/java/org/bukkit/World.java | ||
+++ b/src/main/java/org/bukkit/World.java | ||
@@ -3166,6 +3166,34 @@ public interface World extends PluginMessageRecipient, Metadatable { | ||
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 { | ||
|
||
-- | ||
2.26.0 | ||
|
Oops, something went wrong.