Merge in Tuinity patches

This commit is contained in:
William Blake Galbreath
2020-03-08 12:49:59 -05:00
parent c8a65b216f
commit a32448bda1
140 changed files with 11159 additions and 1947 deletions

View File

@@ -0,0 +1,113 @@
From ac2da46e3db5951ece720838726cf5b0d8ceb7f2 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 Patches
---
pom.xml | 8 ++++--
src/main/java/org/bukkit/World.java | 28 +++++++++++++++++++++
src/main/java/org/bukkit/entity/Player.java | 23 +++++++++++++++++
3 files changed, 57 insertions(+), 2 deletions(-)
diff --git a/pom.xml b/pom.xml
index 58a1f7d07..19d003fa8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -18,8 +18,8 @@
<properties>
<!-- <skipTests>true</skipTests> Paper - This [was] not going to end well -->
- <maven.compiler.source>1.8</maven.compiler.source>
- <maven.compiler.target>1.8</maven.compiler.target>
+ <maven.compiler.source>11</maven.compiler.source>
+ <maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
@@ -154,6 +154,10 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
+ <!-- Tuinity - https://issues.apache.org/jira/browse/MCOMPILER-346 -->
+ <configuration>
+ <forceJavacCompilerUse>true</forceJavacCompilerUse>
+ </configuration>
<dependencies>
<!-- we need our custom version as it fixes some bugs on case sensitive file systems -->
<dependency>
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 5047be15f..d9df7509a 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -3067,6 +3067,34 @@ public interface World extends PluginMessageRecipient, Metadatable {
int getViewDistance();
// Spigot end
+ // Tuinity start - view distance api
+ /**
+ * Sets the view distance for this world.
+ * @param viewDistance view distance in [2, 32]
+ */
+ void setViewDistance(int viewDistance);
+
+ /**
+ * Returns the no-tick view distance for this world.
+ * <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 world.
+ */
+ int getNoTickViewDistance();
+
+ /**
+ * Sets the no-tick view distance for this world.
+ * <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]
+ */
+ void setNoTickViewDistance(int viewDistance);
+ // Tuinity end - view distance api
+
// Spigot start
public class Spigot {
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 877ea4f32..5367975ac 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -1969,6 +1969,29 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
void resetCooldown();
// Paper end
+ // Tuinity start
+ /**
+ * Returns the no-tick 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.
+ */
+ int getNoTickViewDistance();
+
+ /**
+ * Sets the no-tick view distance for this player. Setting to a value of -1 will default to the world no-tick
+ * view distance.
+ * <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
+ */
+ void setNoTickViewDistance(int viewDistance);
+ // Tuinity end
+
// Spigot start
public class Spigot extends Entity.Spigot {
--
2.24.0