Files
Purpur/patches/api/0002-Tuinity-API-Patches.patch
William Blake Galbreath f2e328d295 Updated Upstream (Paper)
Upstream has released updates that appears to apply and compile correctly

Paper Changes:
ad708dd3 Add option to allow iron golems to spawn in air (Closes #1965, Closes #1851)
b16fd5c3 Updated Upstream (Bukkit/CraftBukkit/Spigot)
2020-03-10 19:30:18 -05:00

114 lines
4.1 KiB
Diff

From 9c22c9759cf1460418eecb1224cc0bec509de0fa 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 58a1f7d0..19d003fa 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 af0637f7..a3ed3154 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -3165,6 +3165,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 877ea4f3..5367975a 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