mirror of
https://github.com/PurpurMC/Purpur.git
synced 2025-02-11 12:50:28 +08:00
initial work on paperweight & prepare for 1.17
This commit is contained in:
parent
b3f1d47932
commit
d7a6784491
4
.gitmodules
vendored
4
.gitmodules
vendored
@ -1,4 +0,0 @@
|
||||
[submodule "Paper"]
|
||||
path = Paper
|
||||
url = https://github.com/PaperMC/Paper.git
|
||||
branch = origin/master
|
1
Paper
1
Paper
@ -1 +0,0 @@
|
||||
Subproject commit e04368045e2fe8e53a7b686e9bfb7c41766267be
|
@ -1,49 +1,58 @@
|
||||
plugins {
|
||||
`java-library`
|
||||
`maven-publish`
|
||||
id("xyz.jpenilla.toothpick")
|
||||
java
|
||||
id("com.github.johnrengelman.shadow") version "7.0.0" apply false
|
||||
id("io.papermc.paperweight.patcher") version "1.0.0-LOCAL-SNAPSHOT"
|
||||
}
|
||||
|
||||
toothpick {
|
||||
forkName = "Purpur"
|
||||
groupId = "net.pl3x.purpur"
|
||||
forkUrl = "https://github.com/pl3xgaming/Purpur"
|
||||
val versionTag = System.getenv("BUILD_NUMBER")
|
||||
?: "\"${commitHash() ?: error("Could not obtain git hash")}\""
|
||||
forkVersion = "git-$forkName-$versionTag"
|
||||
group = "net.pl3x.purpur"
|
||||
version = providers.gradleProperty("projectVersion").forUseAtConfigurationTime().get()
|
||||
|
||||
minecraftVersion = "1.16.5"
|
||||
nmsPackage = "1_16_R3"
|
||||
nmsRevision = "R0.1-SNAPSHOT"
|
||||
allprojects {
|
||||
apply(plugin = "java")
|
||||
|
||||
upstream = "Paper"
|
||||
upstreamBranch = "origin/master"
|
||||
|
||||
server {
|
||||
project = projects.purpurServer.dependencyProject
|
||||
patchesDir = rootProject.projectDir.resolve("patches/server")
|
||||
}
|
||||
api {
|
||||
project = projects.purpurApi.dependencyProject
|
||||
patchesDir = rootProject.projectDir.resolve("patches/api")
|
||||
java {
|
||||
toolchain {
|
||||
languageVersion.set(JavaLanguageVersion.of(16))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
subprojects {
|
||||
tasks.withType<JavaCompile>().configureEach {
|
||||
options.encoding = "UTF-8"
|
||||
options.release.set(16)
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven("https://repo1.maven.org/maven2/")
|
||||
maven("https://oss.sonatype.org/content/groups/public/")
|
||||
maven("https://papermc.io/repo/repository/maven-public/")
|
||||
maven("https://ci.emc.gs/nexus/content/groups/aikar/")
|
||||
maven("https://repo.aikar.co/content/groups/aikar")
|
||||
maven("https://repo.md-5.net/content/repositories/releases/")
|
||||
maven("https://hub.spigotmc.org/nexus/content/groups/public/")
|
||||
maven("https://nexus.velocitypowered.com/repository/velocity-artifacts-snapshots/")
|
||||
maven("https://oss.sonatype.org/content/repositories/snapshots/") {
|
||||
name = "sonatype-oss-snapshots"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
java {
|
||||
sourceCompatibility = JavaVersion.toVersion(8)
|
||||
targetCompatibility = JavaVersion.toVersion(8)
|
||||
}
|
||||
dependencies {
|
||||
implementation(gradleApi())
|
||||
}
|
||||
|
||||
publishing.repositories.maven {
|
||||
url = uri("https://repo.pl3x.net/snapshots")
|
||||
credentials(PasswordCredentials::class)
|
||||
paperweight {
|
||||
serverProject.set(project(":Purpur-Server"))
|
||||
|
||||
usePaperUpstream(providers.gradleProperty("paperRef")) {
|
||||
withPaperPatcher {
|
||||
apiPatchDir.set(file("patches/api"))
|
||||
apiOutputDir.set(file("Purpur-API"))
|
||||
|
||||
serverPatchDir.set(file("patches/server"))
|
||||
serverOutputDir.set(file("Purpur-Server"))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,2 +1,6 @@
|
||||
projectVersion=1.17-R0.1-SNAPSHOT
|
||||
packageVersion=1_17_R1
|
||||
paperRef=dev/1.17
|
||||
|
||||
org.gradle.daemon=true
|
||||
org.gradle.jvmargs=-Xmx2G
|
||||
org.gradle.jvmargs=-Xmx3G
|
||||
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.1-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
19
patches/api/0001-Build-System-Changes.patch
Normal file
19
patches/api/0001-Build-System-Changes.patch
Normal file
@ -0,0 +1,19 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Ben Kerllenevich <me@notom3ga.me>
|
||||
Date: Sat, 12 Jun 2021 12:35:38 -0400
|
||||
Subject: [PATCH] Build System Changes
|
||||
|
||||
todo: merge with rebrand patch
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 9657dcb900267cb5cd1ad7a850eb15bc74479314..bd2fe95f862538ee0b8cf9dabf5f2e20961bb841 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -25,6 +25,7 @@ dependencies {
|
||||
api("org.ow2.asm:asm:9.0")
|
||||
api("org.ow2.asm:asm-commons:9.0")
|
||||
api("org.apache.logging.log4j:log4j-api:2.14.1") // Paper
|
||||
+ api("net.kyori", "adventure-text-minimessage", "4.1.0-SNAPSHOT") // Purpur
|
||||
|
||||
compileOnly("org.apache.maven:maven-resolver-provider:3.8.1")
|
||||
compileOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.7.0")
|
@ -1,321 +0,0 @@
|
||||
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 73fbd5d5a591871a3a386fb5c455cd96a3992e7a..6fd6066b16d4dbf8695be16ec8b2d135d4d04901 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 e88b47a838dc472ad64271a518ee1789f7be19fa..f55ae8275c297c4c86215fba8d7197ffe9715879 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -1606,6 +1606,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 f66ec2dfdc64871f8b752bf44086954300804f08..8efc8e0db687e1506eee2b19466ec917ba4edcdc 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 a4b236d75e77176a163094edd31f81725bbf4eca..27848ad0eee667e515685a5f1cef3e9bfc7a3f53 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -1791,23 +1791,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
|
||||
|
||||
/**
|
1
patches/server-remapped/.gitkeep
Normal file
1
patches/server-remapped/.gitkeep
Normal file
@ -0,0 +1 @@
|
||||
remove once we actually start remapping patches
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user