mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 08:27:43 +01:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: 809466f2e Fix anchor respawn acting as a bed respawn when using the end portal (#5540) d219fd642 [Auto] Updated Upstream (Bukkit/CraftBukkit) db464b099 Implement methods to convert between Component and Brigadier's Message (#5542) 4047cffca Add PlayerBedFailEnterEvent (#4935) 70d697e6e Update Paperpclip 5ed771591 [CI-SKIP] Remove bad null annotation (#5538) 454a4c78e More World API (#3850) 869e02304 Add PlayerDeepSleepEvent (#5525) fb56fc35e fix non-dummy objectives not updating dc859a61f [CI-SKIP] [Auto] Rebuild Patches 7d1689f1a Add missing checkReachable check for shulker boxes (#5453) ba8eb3d4b Add missing Javadoc for COLORABLE MaterialTag (#5376) db801cbf3 Fix PlayerItemHeldEvent firing twice (#5534) 14de2b795 fix PigZombieAngerEvent cancellation (fixes #5319) (v2) (#5329) 86d684ad1 Add get-set drop chance to EntityEquipment (#5528) 33fb8cf63 Add consumeFuel to FurnaceBurnEvent (#5532) 9957f4630 Fix duplicating /give items on item drop cancel (#5536) d94882043 Fix legacyComposer not using AsyncChatEvent messages (#5509) 053bd82cc Don't print spawn load time when not loading spawn (#5467) a6d78caae Add isDeeplySleeping to HumanEntity (#5470) 711b7a80b Expose more Adventure serializers through PaperComponents (#5443) 3f63bde0c Set Area Effect Cloud Rotation (#5462) 3523f0fda Remove useless check on player interact cancellation (#5448) 6574d1aa8 fix #5526 - use correct type when sending message to clients dbfa833ec don't throw when loading TE with invalid keys a9525a6f7 Do not schedule poi task for each block write on chunk gen 39bf5b525 Update teams known as code owners fbae9dbe0 [Auto] Updated Upstream (Bukkit/CraftBukkit) ac4a33aab [Auto] Updated Upstream (Bukkit) c1e07158b [Auto] Updated Upstream (Bukkit/CraftBukkit) 5e4b88e95 Fix dangling sout 23afda179 basic hostname validation 0fb8bdf0e Updated Upstream (Bukkit/CraftBukkit) (#5508) 88ab784da [Auto] Updated Upstream (CraftBukkit) ca7111d5f Fix PlayerItemConsumeEvent cancelling (fixes #4682) (#5383) 06fb560dc Add support for tab completing and highlighting console input from the Brigadier command tree (#5437) 0a9b89c7a Fix occasional light gen issues for neighbor blocks (#5500) Tuinity Changes: b12d0cce3 Replace ticket level propagator 42df8e1e0 Correctly handle recursion for chunkholder updates 73eb2a856 Do not copy visible chunks 8a4f3be69 Do not schedule poi task for each block write on chunk gen 7d36676fc Fix light source locking f1ec0c20d Add concurrency check to ProtoChunk light sources 159d1468f Improvements to chunk loader system 32b4d526b Updated Upstream (Paper) ac5adca33 Make sure lit is set for pre 1.14 chunks Airplane Changes: d8bdbc508 Reduce allocations for fire spreading 41051fd56 Redo reduction of entity chunk ticking check patch 31272d80f Flare Update 8f3271328 Remove criterion patch 0fed2df62 Various patches that need to be reorganized later f78856bde Updated Upstream (Tuinity) f7d6382ad Flare Update 71d079991 Update gradle configuration 0f7977428 Updated Upstream (Tuinity) 3b3cde7b0 Correctly use DEAR values, fix config reloading dd6091981 Updated Upstream (Tuinity) 07897895b Updated Upstream (Tuinity) c1e4d7143 Fluid cache patch
322 lines
14 KiB
Diff
322 lines
14 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
|
Date: Fri, 14 Dec 2018 21:52:29 -0800
|
|
Subject: [PATCH] Tuinity API Changes
|
|
|
|
GNU LESSER GENERAL PUBLIC LICENSE
|
|
Version 3, 29 June 2007
|
|
|
|
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
|
Everyone is permitted to copy and distribute verbatim copies
|
|
of this license document, but changing it is not allowed.
|
|
|
|
This version of the GNU Lesser General Public License incorporates
|
|
the terms and conditions of version 3 of the GNU General Public
|
|
License, supplemented by the additional permissions listed below.
|
|
|
|
0. Additional Definitions.
|
|
|
|
As used herein, "this License" refers to version 3 of the GNU Lesser
|
|
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
|
General Public License.
|
|
|
|
"The Library" refers to a covered work governed by this License,
|
|
other than an Application or a Combined Work as defined below.
|
|
|
|
An "Application" is any work that makes use of an interface provided
|
|
by the Library, but which is not otherwise based on the Library.
|
|
Defining a subclass of a class defined by the Library is deemed a mode
|
|
of using an interface provided by the Library.
|
|
|
|
A "Combined Work" is a work produced by combining or linking an
|
|
Application with the Library. The particular version of the Library
|
|
with which the Combined Work was made is also called the "Linked
|
|
Version".
|
|
|
|
The "Minimal Corresponding Source" for a Combined Work means the
|
|
Corresponding Source for the Combined Work, excluding any source code
|
|
for portions of the Combined Work that, considered in isolation, are
|
|
based on the Application, and not on the Linked Version.
|
|
|
|
The "Corresponding Application Code" for a Combined Work means the
|
|
object code and/or source code for the Application, including any data
|
|
and utility programs needed for reproducing the Combined Work from the
|
|
Application, but excluding the System Libraries of the Combined Work.
|
|
|
|
1. Exception to Section 3 of the GNU GPL.
|
|
|
|
You may convey a covered work under sections 3 and 4 of this License
|
|
without being bound by section 3 of the GNU GPL.
|
|
|
|
2. Conveying Modified Versions.
|
|
|
|
If you modify a copy of the Library, and, in your modifications, a
|
|
facility refers to a function or data to be supplied by an Application
|
|
that uses the facility (other than as an argument passed when the
|
|
facility is invoked), then you may convey a copy of the modified
|
|
version:
|
|
|
|
a) under this License, provided that you make a good faith effort to
|
|
ensure that, in the event an Application does not supply the
|
|
function or data, the facility still operates, and performs
|
|
whatever part of its purpose remains meaningful, or
|
|
|
|
b) under the GNU GPL, with none of the additional permissions of
|
|
this License applicable to that copy.
|
|
|
|
3. Object Code Incorporating Material from Library Header Files.
|
|
|
|
The object code form of an Application may incorporate material from
|
|
a header file that is part of the Library. You may convey such object
|
|
code under terms of your choice, provided that, if the incorporated
|
|
material is not limited to numerical parameters, data structure
|
|
layouts and accessors, or small macros, inline functions and templates
|
|
(ten or fewer lines in length), you do both of the following:
|
|
|
|
a) Give prominent notice with each copy of the object code that the
|
|
Library is used in it and that the Library and its use are
|
|
covered by this License.
|
|
|
|
b) Accompany the object code with a copy of the GNU GPL and this license
|
|
document.
|
|
|
|
4. Combined Works.
|
|
|
|
You may convey a Combined Work under terms of your choice that,
|
|
taken together, effectively do not restrict modification of the
|
|
portions of the Library contained in the Combined Work and reverse
|
|
engineering for debugging such modifications, if you also do each of
|
|
the following:
|
|
|
|
a) Give prominent notice with each copy of the Combined Work that
|
|
the Library is used in it and that the Library and its use are
|
|
covered by this License.
|
|
|
|
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
|
document.
|
|
|
|
c) For a Combined Work that displays copyright notices during
|
|
execution, include the copyright notice for the Library among
|
|
these notices, as well as a reference directing the user to the
|
|
copies of the GNU GPL and this license document.
|
|
|
|
d) Do one of the following:
|
|
|
|
0) Convey the Minimal Corresponding Source under the terms of this
|
|
License, and the Corresponding Application Code in a form
|
|
suitable for, and under terms that permit, the user to
|
|
recombine or relink the Application with a modified version of
|
|
the Linked Version to produce a modified Combined Work, in the
|
|
manner specified by section 6 of the GNU GPL for conveying
|
|
Corresponding Source.
|
|
|
|
1) Use a suitable shared library mechanism for linking with the
|
|
Library. A suitable mechanism is one that (a) uses at run time
|
|
a copy of the Library already present on the user's computer
|
|
system, and (b) will operate properly with a modified version
|
|
of the Library that is interface-compatible with the Linked
|
|
Version.
|
|
|
|
e) Provide Installation Information, but only if you would otherwise
|
|
be required to provide such information under section 6 of the
|
|
GNU GPL, and only to the extent that such information is
|
|
necessary to install and execute a modified version of the
|
|
Combined Work produced by recombining or relinking the
|
|
Application with a modified version of the Linked Version. (If
|
|
you use option 4d0, the Installation Information must accompany
|
|
the Minimal Corresponding Source and Corresponding Application
|
|
Code. If you use option 4d1, you must provide the Installation
|
|
Information in the manner specified by section 6 of the GNU GPL
|
|
for conveying Corresponding Source.)
|
|
|
|
5. Combined Libraries.
|
|
|
|
You may place library facilities that are a work based on the
|
|
Library side by side in a single library together with other library
|
|
facilities that are not Applications and are not covered by this
|
|
License, and convey such a combined library under terms of your
|
|
choice, if you do both of the following:
|
|
|
|
a) Accompany the combined library with a copy of the same work based
|
|
on the Library, uncombined with any other library facilities,
|
|
conveyed under the terms of this License.
|
|
|
|
b) Give prominent notice with the combined library that part of it
|
|
is a work based on the Library, and explaining where to find the
|
|
accompanying uncombined form of the same work.
|
|
|
|
6. Revised Versions of the GNU Lesser General Public License.
|
|
|
|
The Free Software Foundation may publish revised and/or new versions
|
|
of the GNU Lesser General Public License from time to time. Such new
|
|
versions will be similar in spirit to the present version, but may
|
|
differ in detail to address new problems or concerns.
|
|
|
|
Each version is given a distinguishing version number. If the
|
|
Library as you received it specifies that a certain numbered version
|
|
of the GNU Lesser General Public License "or any later version"
|
|
applies to it, you have the option of following the terms and
|
|
conditions either of that published version or of any later version
|
|
published by the Free Software Foundation. If the Library as you
|
|
received it does not specify a version number of the GNU Lesser
|
|
General Public License, you may choose any version of the GNU Lesser
|
|
General Public License ever published by the Free Software Foundation.
|
|
|
|
If the Library as you received it specifies that a proxy can decide
|
|
whether future versions of the GNU Lesser General Public License shall
|
|
apply, that proxy's public statement of acceptance of any version is
|
|
permanent authorization for you to choose that version for the
|
|
Library.
|
|
|
|
diff --git a/pom.xml b/pom.xml
|
|
index e66661eb84308dc13faa0d39b7487f40c1180443..6c200882954adc4831307f3d6dfa3202571fb30b 100644
|
|
--- a/pom.xml
|
|
+++ b/pom.xml
|
|
@@ -3,18 +3,18 @@
|
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
<modelVersion>4.0.0</modelVersion>
|
|
<parent>
|
|
- <groupId>com.destroystokyo.paper</groupId>
|
|
- <artifactId>paper-parent</artifactId>
|
|
+ <groupId>com.tuinity</groupId>
|
|
+ <artifactId>tuinity-parent</artifactId>
|
|
<version>dev-SNAPSHOT</version>
|
|
+ <relativePath>../pom.xml</relativePath>
|
|
</parent>
|
|
|
|
- <groupId>com.destroystokyo.paper</groupId>
|
|
- <artifactId>paper-api</artifactId>
|
|
+ <artifactId>tuinity-api</artifactId>
|
|
<version>1.16.5-R0.1-SNAPSHOT</version>
|
|
<packaging>jar</packaging>
|
|
|
|
- <name>Paper-API</name>
|
|
- <url>https://github.com/PaperMC/Paper</url>
|
|
+ <name>Tuinity-API</name>
|
|
+ <url>https://github.com/Spottedleaf/Tuinity</url>
|
|
<description>An enhanced plugin API for Minecraft servers.</description>
|
|
|
|
<properties>
|
|
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
|
index f3e27d2d02a9407bb1b091b8c1125ad5abf99e55..b3e7b2a8eaa3980e34bc74a846320b7871dc6e4b 100644
|
|
--- a/src/main/java/org/bukkit/Server.java
|
|
+++ b/src/main/java/org/bukkit/Server.java
|
|
@@ -1595,6 +1595,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 a1496fe00a2d5ba6c1af054d4327f868b2cd7344..6ca9aa2c438810b5537dc196b3fd89b0750b3d67 100644
|
|
--- a/src/main/java/org/bukkit/World.java
|
|
+++ b/src/main/java/org/bukkit/World.java
|
|
@@ -3631,6 +3631,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 2ea531eaef8c455fdd503f0c0258813fe9136085..a84ea92d02d34cd48174152e0391f1af6c6b5def 100644
|
|
--- a/src/main/java/org/bukkit/entity/Player.java
|
|
+++ b/src/main/java/org/bukkit/entity/Player.java
|
|
@@ -1768,23 +1768,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
|
|
|
|
/**
|