Files
Purpur/patches/api/0001-Tuinity-API-Changes.patch
William Blake Galbreath dd259870b0 Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
2780e94 Fix PaperTickList (#6241)
b854e7e Drop unneeded patch (#6240)
2961b2a Fix various mob drops being captured as death drops (#5675)
3801a39 Add ItemRarity test (#6247)
170382f Updated Upstream (Bukkit/CraftBukkit/Spigot) (#6245)
2021-07-23 10:55:21 -05:00

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 024da3febe3fd6c54aa30e99cb08300bc38ddb92..2002423121ed73faf6b06ccb1f19152980d1ea21 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -1677,6 +1677,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 8ae9198ba7fdb006dc420504a984627add20dbb5..4017cc64532a9a8e42c3a6492878cd96db13fcb3 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -3639,6 +3639,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 5e8814cc317a705eaf8bdd9f3876a5366c0a0226..7be8c47bdb8cc73c039efe05d81085cdbe0bef58 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -1818,23 +1818,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
/**