spigot/Bukkit-Patches/0015-View-Distance.patch

38 lines
1.2 KiB
Diff
Raw Normal View History

2023-05-11 07:10:33 +10:00
From d4a20319cfa7e16122435be27d8e537ad39bb108 Mon Sep 17 00:00:00 2001
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
Date: Tue, 30 Jul 2019 13:47:34 -0700
Subject: [PATCH] View Distance
This commit allows the retrieval of per world view distances.
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
2023-05-11 07:10:33 +10:00
index fe2a14aa..e75cd448 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
2023-05-11 07:10:33 +10:00
@@ -2637,6 +2637,22 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
@Nullable
2022-07-01 20:42:44 +10:00
StructureSearchResult locateNearestStructure(@NotNull Location origin, @NotNull Structure structure, int radius, boolean findUnexplored);
+ // Spigot start
+ /**
+ * Returns the view distance used for this world.
+ *
+ * @return the view distance used for this world
+ */
+ int getViewDistance();
2021-11-22 09:00:00 +11:00
+
+ /**
+ * Returns the simulation distance used for this world.
+ *
+ * @return the simulation distance used for this world
+ */
+ int getSimulationDistance();
+ // Spigot end
+
// Spigot start
2020-01-24 17:56:32 +11:00
public class Spigot {
--
2023-05-11 07:10:33 +10:00
2.40.1