mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Upstream has released updates that appear to apply and compile correctly Paper Changes:415f7ca165Updated Upstream (Bukkit/CraftBukkit)37df95b189refactor: do not import List; use FQN5c65546f5crebasefdef125b19Expose EntityType#getTranslationKey4d9b14efa4Use AsyncAppender instead of AsyncLoggerContextSelector to keep loggging IO off main thread (#6381)8c2adf8e9eAdd warning to getOfflinePlayers (#6365)370b60de14Optimize indirect passenger iteration (#6366)80836709e7Fix block drops position losing precision millions of blocks out (#6387)e942509e73Updated Upstream (Bukkit/CraftBukkit/Spigot) (#6379)ce43ce8265Make EntityUnleashEvent cancellable (#4993)591cac3685Configurable item frame map cursor interval (#6385)e9aa9ce66bAdd config migration for named entity death logging option (#6390)c2f47a76aeImplement Translatable in appropriate places (#6248)f12a7f57e1Clear bucket NBT after dispense (#6391)4dd33cb8b6[ci skip] Drop "Fix CME on adding a passenger in CreatureSpawnEvent" (#6384)565cd3306c[ci skip] Add some helper methods to the ObfHelper util class (#6374) Tuinity Changes:6fd7e2b376Update paper
141 lines
5.6 KiB
Diff
141 lines
5.6 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Spottedleaf <spottedleaf@spottedleaf.dev>
|
|
Date: Sat, 21 Mar 2020 20:12:48 -0700
|
|
Subject: [PATCH] Tuinity API Changes
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
(at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
|
index 83870d54a5ff1017ad7455e9c931fdee54354434..d6607c1cc3b976367f0087810de698281d4733ab 100644
|
|
--- a/src/main/java/org/bukkit/Server.java
|
|
+++ b/src/main/java/org/bukkit/Server.java
|
|
@@ -1679,6 +1679,14 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
|
}
|
|
// Paper end
|
|
|
|
+ // Tuinity start - add config to timings report
|
|
+ @NotNull
|
|
+ public org.bukkit.configuration.file.YamlConfiguration getTuinityConfig()
|
|
+ {
|
|
+ throw new UnsupportedOperationException("Not supported yet.");
|
|
+ }
|
|
+ // Tuinity end - add config to timings report
|
|
+
|
|
/**
|
|
* Sends the component to the player
|
|
*
|
|
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
|
index 953d3470811d5877bd8a9653343f4c38770b266f..6d5c60a7def6926421df09214e9a9053a321bc00 100644
|
|
--- a/src/main/java/org/bukkit/World.java
|
|
+++ b/src/main/java/org/bukkit/World.java
|
|
@@ -3706,6 +3706,26 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad
|
|
* @param viewDistance view distance in [2, 32]
|
|
*/
|
|
void setNoTickViewDistance(int viewDistance);
|
|
+
|
|
+ // Tuinity start - add view distances
|
|
+ /**
|
|
+ * Gets the sending view distance for this world.
|
|
+ * <p>
|
|
+ * Sending view distance is the view distance where chunks will load in for players in this world.
|
|
+ * </p>
|
|
+ * @return The sending view distance for this world.
|
|
+ */
|
|
+ public int getSendViewDistance();
|
|
+
|
|
+ /**
|
|
+ * Sets the sending view distance for this world.
|
|
+ * <p>
|
|
+ * Sending view distance is the view distance where chunks will load in for players in this world.
|
|
+ * </p>
|
|
+ * @param viewDistance view distance in [2, 32] or -1
|
|
+ */
|
|
+ public void setSendViewDistance(int viewDistance);
|
|
+ // Tuinity end - add view distances
|
|
// Paper end - view distance api
|
|
|
|
// Spigot start
|
|
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
|
index 3ec1be36b90dbedb8631135555da4b69110e4791..c87cb640dc829a266e85e97a2e3bb2f0f52a2eaa 100644
|
|
--- a/src/main/java/org/bukkit/entity/Player.java
|
|
+++ b/src/main/java/org/bukkit/entity/Player.java
|
|
@@ -1887,23 +1887,63 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
|
* Gets the view distance for this player
|
|
*
|
|
* @return the player's view distance
|
|
- * @deprecated This is unimplemented and <i>will</i> throw an exception at runtime. The {@link org.bukkit.World World}-based methods still work.
|
|
+ * // Tuinity - implemented
|
|
* @see org.bukkit.World#getViewDistance()
|
|
* @see org.bukkit.World#getNoTickViewDistance()
|
|
*/
|
|
- @Deprecated
|
|
+ //@Deprecated // Tuinity - implemented
|
|
public int getViewDistance();
|
|
|
|
/**
|
|
* Sets the view distance for this player
|
|
*
|
|
* @param viewDistance the player's view distance
|
|
- * @deprecated This is unimplemented and <i>will</i> throw an exception at runtime. The {@link org.bukkit.World World}-based methods still work.
|
|
+ * // Tuinity - implemented
|
|
* @see org.bukkit.World#setViewDistance(int)
|
|
* @see org.bukkit.World#setNoTickViewDistance(int)
|
|
*/
|
|
- @Deprecated
|
|
+ //@Deprecated // Tuinity - implemented
|
|
public void setViewDistance(int viewDistance);
|
|
+
|
|
+ // Tuinity start - add view distances api
|
|
+ /**
|
|
+ * Gets the no-ticking view distance for this player.
|
|
+ * <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 player.
|
|
+ */
|
|
+ public int getNoTickViewDistance();
|
|
+
|
|
+ /**
|
|
+ * Sets the no-ticking view distance for this player.
|
|
+ * <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] or -1
|
|
+ */
|
|
+ public void setNoTickViewDistance(int viewDistance);
|
|
+
|
|
+ /**
|
|
+ * Gets the sending view distance for this player.
|
|
+ * <p>
|
|
+ * Sending view distance is the view distance where chunks will load in for players.
|
|
+ * </p>
|
|
+ * @return The sending view distance for this player.
|
|
+ */
|
|
+ public int getSendViewDistance();
|
|
+
|
|
+ /**
|
|
+ * Sets the sending view distance for this player.
|
|
+ * <p>
|
|
+ * Sending view distance is the view distance where chunks will load in for players.
|
|
+ * </p>
|
|
+ * @param viewDistance view distance in [2, 32] or -1
|
|
+ */
|
|
+ public void setSendViewDistance(int viewDistance);
|
|
+ // Tuinity end - add view distances api
|
|
// Paper end
|
|
|
|
/**
|