Yatopia/patches/api/0001-Yatopia-API-Bundle.patch
Ivan Pekov 5765602020
Port more patches
I got all the purpur patches mentioned in #37 and ported them by also adding the squids EAR immunity patch.
Ported also 2 useful patches from Rainforest.

Unfortunately this is 1.16.2 only and thus 1.16.1 would only receive:
- from purpur: the MC-4 fix and the squid EAR immunity.
- from rainforest: all patches that have been ported.

Closes #37
2020-08-14 21:16:57 +03:00

114 lines
4.4 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Bud Gidiere <sgidiere@gmail.com>
Date: Sat, 1 Aug 2020 15:51:06 -0500
Subject: [PATCH] Yatopia API Bundle
Lagging threshold + Purpur & Rainforest & Origami config
diff --git a/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java b/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java
index b42091752981a1f309ab350e9a394092cb334824..ba03cb48d483b6955d4635e9071fff5bfa472811 100644
--- a/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java
+++ b/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java
@@ -206,4 +206,8 @@ public interface VanillaGoal<T extends Mob> extends Goal<T> {
GoalKey<Zombie> ZOMBIE_ATTACK = GoalKey.of(Zombie.class, NamespacedKey.minecraft("zombie_attack"));
GoalKey<Creature> STROLL_VILLAGE_GOLEM = GoalKey.of(Creature.class, NamespacedKey.minecraft("stroll_village_golem"));
GoalKey<Mob> UNIVERSAL_ANGER_RESET = GoalKey.of(Mob.class, NamespacedKey.minecraft("universal_anger_reset"));
+ // Yatopia start
+ GoalKey<Phantom> FIND_CRYSTAL_GOAL = GoalKey.of(Phantom.class, NamespacedKey.minecraft("find_crystal_goal"));
+ GoalKey<Phantom> ORBIT_CRYSTAL_GOAL = GoalKey.of(Phantom.class, NamespacedKey.minecraft("orbit_crystal_goal"));
+ // Yatopia end
}
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index 62cc1c74c11f56dcbd1e24e9c5478497742e6351..59787c474f1a17dff156e74107f880ac083a7cb3 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
@@ -1776,4 +1776,15 @@ public final class Bukkit {
public static Server.Spigot spigot() {
return server.spigot();
}
+
+ // Purpur start
+ /**
+ * Check if the server is lagging, according to the laggy threshold setting.
+ *
+ * @return true if lagging
+ */
+ public static boolean isLagging() {
+ return server.isLagging();
+ }
+ // Purpur end
}
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index 46c4d98ce32a0b1d8cfd391f2c7a9566a045cb55..e5170b299bb4252a7910c1aa5a607dbc3b30a0d1 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -1455,6 +1455,54 @@ public interface Server extends PluginMessageRecipient {
}
// Tuinity end - add config to timings report
+ // Akarin start
+ /**
+ * @deprecated yatopia does not import akarin config anymore
+ */
+ @Deprecated
+ @NotNull
+ public org.bukkit.configuration.file.YamlConfiguration getAkarinConfig()
+ {
+ return new org.bukkit.configuration.file.YamlConfiguration();
+ }
+ // Akarin end
+
+ // Rainforest start
+ @NotNull
+ public org.bukkit.configuration.file.YamlConfiguration getRainforestConfig()
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+ // Rainforest end
+
+ // Purpur start
+ @NotNull
+ public org.bukkit.configuration.file.YamlConfiguration getPurpurConfig()
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @NotNull
+ public java.util.Properties getServerProperties()
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+ // Purpur end
+ // Origami start - add config to timings report
+ @NotNull
+ public org.bukkit.configuration.file.YamlConfiguration getOrigamiConfig()
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+ // Origami end
+ // Yatopia start - add config to timings report
+ @NotNull
+ public org.bukkit.configuration.file.YamlConfiguration getYatopiaConfig()
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+ // Yatopia end
+
/**
* Sends the component to the player
*
@@ -1555,4 +1603,13 @@ public interface Server extends PluginMessageRecipient {
@NotNull
com.destroystokyo.paper.entity.ai.MobGoals getMobGoals();
// Paper end
+
+ // Purpur start
+ /**
+ * Check if the server is lagging, according to the laggy threshold setting.
+ *
+ * @return true if lagging
+ */
+ boolean isLagging();
+ // Purpur end
}