From 9ead0ae73d620f46a89ac4a8042bd339765d59d1 Mon Sep 17 00:00:00 2001
From: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com>
Date: Mon, 10 Feb 2025 10:53:52 -0500
Subject: [PATCH] Updated Upstream (Paper/Gale/Purpur)
Upstream has released updates that appear to apply and compile correctly
Paper Changes:
PaperMC/Paper@597dcfff Add support for lz4 (#12053)
PaperMC/Paper@53ae5c95 Make Sittable interface extend Entity (#12016)
PaperMC/Paper@786ddf53 Default piston block entity direction to DOWN (#12039)
PaperMC/Paper@cb6c57e0 Fix Squid and Dolphin spawn height (#12045)
PaperMC/Paper@51acc802 Prevent duplicate raider in RaidSpawnWaveEvent list (#12040)
PaperMC/Paper@61312fdb Switch to jspecify annotations for Player (#12042)
PaperMC/Paper@1a04e96a Fix EntityBreedEvent cancellation (#12046)
PaperMC/Paper@eff617b8 [ci/skip] Deprecate Server#setSpawnRadius (#12024)
PaperMC/Paper@edacfdf4 Do not queue player info packets (#12080)
PaperMC/Paper@cafef9ce [ci/skip] Move EntityUtil to correct directory (#12092)
Gale Changes:
Dreeam-qwq/Gale@1c139da5 Updated Upstream (Paper)
Purpur Changes:
PurpurMC/Purpur@c038d785 Updated Upstream (Paper)
PurpurMC/Purpur@708a2fd9 fix: properly apply breeding-delay-ticks option for turtles
PurpurMC/Purpur@e6a1ebd3 Updated Upstream (Paper)
---
gradle.properties | 2 +-
.../features/0002-Leaf-config.patch | 4 +-
.../features/0004-Purpur-API-Changes.patch | 68 +++++++++---------
.../features/0006-KeYi-Player-Skull-API.patch | 4 +-
.../0007-Slice-Smooth-Teleports.patch | 4 +-
.../features/0009-Leaves-Replay-Mod-API.patch | 8 +--
...0006-Purpur-Server-Minecraft-Changes.patch | 70 +++++++++++--------
...07-Fix-Pufferfish-and-Purpur-patches.patch | 6 +-
.../0025-Petal-Async-Pathfinding.patch | 4 +-
...missing-purpur-configuration-options.patch | 7 +-
.../0004-Purpur-Server-Paper-Changes.patch | 2 +-
11 files changed, 92 insertions(+), 87 deletions(-)
diff --git a/gradle.properties b/gradle.properties
index 4edeea1c7..d6597b1db 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -2,7 +2,7 @@ group=cn.dreeam.leaf
mcVersion=1.21.4
version=1.21.4-R0.1-SNAPSHOT
-galeCommit=9c48e95c26a5fea9b99660b019ee909c25448d51
+galeCommit=1c139da5f2b6c16fb724366433c61aaf1edc9a62
org.gradle.configuration-cache=true
org.gradle.caching=true
diff --git a/leaf-api/paper-patches/features/0002-Leaf-config.patch b/leaf-api/paper-patches/features/0002-Leaf-config.patch
index bb249b84e..d23186e25 100644
--- a/leaf-api/paper-patches/features/0002-Leaf-config.patch
+++ b/leaf-api/paper-patches/features/0002-Leaf-config.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Leaf config
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
-index 1b075b1797e11785e6a463457678ab1033dc5399..7ffe592b88d5f57723c9373f326e09e68da716bd 100644
+index f7cbfdfca459f9b42ec6bd7ae1b412ce2757c2fe..84b5626a0ccd4fd1976f28eeb2ae99acdb62afa8 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
-@@ -2382,6 +2382,14 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
+@@ -2386,6 +2386,14 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
// Paper end
diff --git a/leaf-api/paper-patches/features/0004-Purpur-API-Changes.patch b/leaf-api/paper-patches/features/0004-Purpur-API-Changes.patch
index 0b9c0ad5e..a6207a54f 100644
--- a/leaf-api/paper-patches/features/0004-Purpur-API-Changes.patch
+++ b/leaf-api/paper-patches/features/0004-Purpur-API-Changes.patch
@@ -6,7 +6,7 @@ Subject: [PATCH] Purpur API Changes
Original license: MIT
Original project: https://github.com/PurpurMC/Purpur
-Commit: 71f219d84d5787e5e2944f639ecea2da808aa7fe
+Commit: e6a1ebd3f6e4cfe93f96dd82ecb3234f0482768a
Patches listed below are removed in this patch, They exists in Gale or Leaf:
* "co/aikar/timings/TimedEventExecutor.java.patch"
@@ -70,10 +70,10 @@ index 6b2f6ab137ae37ff0db4827886614436b7ed5dcb..66a9fc729182476c4f601cdb32bcb109
/**
* The brand id for Pufferfish.
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
-index c3cdfd40386b0844712e9561b35e7acc6f83142b..d67af3fdc4434817cea29673069430a33fb30a8e 100644
+index 4d0ec80ace15ab46e888a3f6e7452842bda8c60c..7ce5e34bfb3d8db97b32e9f8ec010e4ff088be65 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
-@@ -3046,4 +3046,133 @@ public final class Bukkit {
+@@ -3050,4 +3050,133 @@ public final class Bukkit {
public static Server.Spigot spigot() {
return server.spigot();
}
@@ -335,12 +335,12 @@ index 9afafc00e457c721a1b20b05c6a5d330caa40dfb..6469d4e1097e694d8bf00610ed8d34de
+ // Purpur end - ItemStack convenience methods
}
diff --git a/src/main/java/org/bukkit/OfflinePlayer.java b/src/main/java/org/bukkit/OfflinePlayer.java
-index 5622fe3165baad8138c22cfc016ed6c3834cf702..6d31b561d915180fcd473b317721064feed28f37 100644
+index ed8e11001c8d3c475dc851aedf6e6812a872dc54..c597c298795fb9893447bc822d941c1748dcb9c5 100644
--- a/src/main/java/org/bukkit/OfflinePlayer.java
+++ b/src/main/java/org/bukkit/OfflinePlayer.java
-@@ -573,4 +573,106 @@ public interface OfflinePlayer extends ServerOperator, AnimalTamer, Configuratio
+@@ -567,4 +567,104 @@ public interface OfflinePlayer extends ServerOperator, AnimalTamer, Configuratio
@Override
- io.papermc.paper.persistence.@NotNull PersistentDataContainerView getPersistentDataContainer();
+ io.papermc.paper.persistence.PersistentDataContainerView getPersistentDataContainer();
// Paper end - add pdc to offline player
+
+ // Purpur start - OfflinePlayer API
@@ -350,7 +350,7 @@ index 5622fe3165baad8138c22cfc016ed6c3834cf702..6d31b561d915180fcd473b317721064f
+ *
+ * @return True if the player is allowed to fly.
+ */
-+ public boolean getAllowFlight();
++ boolean getAllowFlight();
+
+ /**
+ * Sets if the OfflinePlayer is allowed to fly via jump key double-tap like in
@@ -358,21 +358,21 @@ index 5622fe3165baad8138c22cfc016ed6c3834cf702..6d31b561d915180fcd473b317721064f
+ *
+ * @param flight If flight should be allowed.
+ */
-+ public void setAllowFlight(boolean flight);
++ void setAllowFlight(boolean flight);
+
+ /**
+ * Checks to see if this player is currently flying or not.
+ *
+ * @return True if the player is flying, else false.
+ */
-+ public boolean isFlying();
++ boolean isFlying();
+
+ /**
+ * Makes this player start or stop flying.
+ *
+ * @param value True to fly.
+ */
-+ public void setFlying(boolean value);
++ void setFlying(boolean value);
+
+ /**
+ * Sets the speed at which a client will fly. Negative values indicate
@@ -382,7 +382,7 @@ index 5622fe3165baad8138c22cfc016ed6c3834cf702..6d31b561d915180fcd473b317721064f
+ * @throws IllegalArgumentException If new speed is less than -1 or
+ * greater than 1
+ */
-+ public void setFlySpeed(float value) throws IllegalArgumentException;
++ void setFlySpeed(float value) throws IllegalArgumentException;
+
+ /**
+ * Sets the speed at which a client will walk. Negative values indicate
@@ -392,21 +392,21 @@ index 5622fe3165baad8138c22cfc016ed6c3834cf702..6d31b561d915180fcd473b317721064f
+ * @throws IllegalArgumentException If new speed is less than -1 or
+ * greater than 1
+ */
-+ public void setWalkSpeed(float value) throws IllegalArgumentException;
++ void setWalkSpeed(float value) throws IllegalArgumentException;
+
+ /**
+ * Gets the current allowed speed that a client can fly.
+ *
+ * @return The current allowed speed, from -1 to 1
+ */
-+ public float getFlySpeed();
++ float getFlySpeed();
+
+ /**
+ * Gets the current allowed speed that a client can walk.
+ *
+ * @return The current allowed speed, from -1 to 1
+ */
-+ public float getWalkSpeed();
++ float getWalkSpeed();
+
+ /**
+ * Sets OfflinePlayer's location. If player is online, it falls back to the Player#teleport implementation.
@@ -414,7 +414,7 @@ index 5622fe3165baad8138c22cfc016ed6c3834cf702..6d31b561d915180fcd473b317721064f
+ * @param destination
+ * @return true if teleportation was successful
+ */
-+ public boolean teleportOffline(@NotNull org.bukkit.Location destination);
++ boolean teleportOffline(org.bukkit.Location destination);
+
+ /**
+ * Sets OfflinePlayer's location. If player is online, it falls back to the Player#teleport implementation.
@@ -423,7 +423,7 @@ index 5622fe3165baad8138c22cfc016ed6c3834cf702..6d31b561d915180fcd473b317721064f
+ * @param cause Teleport cause used if player is online
+ * @return true if teleportation was successful
+ */
-+ public boolean teleportOffline(@NotNull org.bukkit.Location destination, @NotNull org.bukkit.event.player.PlayerTeleportEvent.TeleportCause cause);
++ boolean teleportOffline(org.bukkit.Location destination, org.bukkit.event.player.PlayerTeleportEvent.TeleportCause cause);
+
+ /**
+ * Sets OfflinePlayer's location. If player is online, it falls back to the Player#teleportAsync implementation.
@@ -431,8 +431,7 @@ index 5622fe3165baad8138c22cfc016ed6c3834cf702..6d31b561d915180fcd473b317721064f
+ * @param destination
+ * @return true
if teleportation successful
+ */
-+ @NotNull
-+ public java.util.concurrent.CompletableFuture teleportOfflineAsync(@NotNull Location destination);
++ java.util.concurrent.CompletableFuture teleportOfflineAsync(Location destination);
+
+ /**
+ * Sets OfflinePlayer's location. If player is online, it falls back to the Player#teleportAsync implementation.
@@ -441,15 +440,14 @@ index 5622fe3165baad8138c22cfc016ed6c3834cf702..6d31b561d915180fcd473b317721064f
+ * @param cause Teleport cause used if player is online
+ * @return true
if teleportation successful
+ */
-+ @NotNull
-+ public java.util.concurrent.CompletableFuture teleportOfflineAsync(@NotNull Location destination, @NotNull org.bukkit.event.player.PlayerTeleportEvent.TeleportCause cause);
++ java.util.concurrent.CompletableFuture teleportOfflineAsync(Location destination, org.bukkit.event.player.PlayerTeleportEvent.TeleportCause cause);
+ // Purpur end - OfflinePlayer API
}
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
-index 7ffe592b88d5f57723c9373f326e09e68da716bd..6790ca1648a17cf30063522f68b3ac3e82e3bd8c 100644
+index 84b5626a0ccd4fd1976f28eeb2ae99acdb62afa8..13346dfe2a6d848cf63cbba95d8dea8dfdddf905 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
-@@ -2382,6 +2382,18 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
+@@ -2386,6 +2386,18 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
// Paper end
@@ -468,7 +466,7 @@ index 7ffe592b88d5f57723c9373f326e09e68da716bd..6790ca1648a17cf30063522f68b3ac3e
// Leaf start - Leaf config - API
@NotNull
public org.bukkit.configuration.file.YamlConfiguration getLeafConfig()
-@@ -2739,4 +2751,111 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
+@@ -2743,4 +2755,111 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
*/
long getLastTickOversleepTime();
// Gale end - YAPFA - last tick time - API
@@ -1010,13 +1008,13 @@ index bc84b892cae5fe7019a3ad481e9da79956efa1fe..48eb5b00c460cccde29d327cef1d63fc
+ // Purpur end
}
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
-index f9b3ecbab5826efb50adc2e1831051232e6b3b22..c39bd414cb3b1e12867cfee150f0ccfc9ba56ce8 100644
+index a6356997a51a441ca65414dd7e3579c1c0f885d4..ca8abdebf8e9d23e982883a7283fdedf12a36170 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
-@@ -3938,4 +3938,123 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
+@@ -3912,4 +3912,123 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @return the result of this method, holding leftovers and spawned items.
*/
- @NotNull PlayerGiveResult give(@NotNull Collection<@NotNull ItemStack> items, boolean dropIfFull);
+ PlayerGiveResult give(Collection items, boolean dropIfFull);
+
+ // Purpur start
+ /**
@@ -1024,7 +1022,7 @@ index f9b3ecbab5826efb50adc2e1831051232e6b3b22..c39bd414cb3b1e12867cfee150f0ccfc
+ *
+ * @return true if player uses PurpurClient
+ */
-+ public boolean usesPurpurClient();
++ boolean usesPurpurClient();
+
+ /**
+ * Check if player is AFK
@@ -1053,7 +1051,7 @@ index f9b3ecbab5826efb50adc2e1831051232e6b3b22..c39bd414cb3b1e12867cfee150f0ccfc
+ * @param location Location to highlight
+ * @param duration Duration for highlight to show in milliseconds
+ */
-+ void sendBlockHighlight(@NotNull Location location, int duration);
++ void sendBlockHighlight(Location location, int duration);
+
+ /**
+ * Creates debug block highlight on specified block location and show it to this player.
@@ -1063,7 +1061,7 @@ index f9b3ecbab5826efb50adc2e1831051232e6b3b22..c39bd414cb3b1e12867cfee150f0ccfc
+ * @param duration Duration for highlight to show in milliseconds
+ * @param argb Color of the highlight. ARGB int. Will be ignored on some versions of vanilla client
+ */
-+ void sendBlockHighlight(@NotNull Location location, int duration, int argb);
++ void sendBlockHighlight(Location location, int duration, int argb);
+
+ /**
+ * Creates debug block highlight on specified block location and show it to this player.
@@ -1073,7 +1071,7 @@ index f9b3ecbab5826efb50adc2e1831051232e6b3b22..c39bd414cb3b1e12867cfee150f0ccfc
+ * @param duration Duration for highlight to show in milliseconds
+ * @param text Text to show above the highlight
+ */
-+ void sendBlockHighlight(@NotNull Location location, int duration, @NotNull String text);
++ void sendBlockHighlight(Location location, int duration, String text);
+
+ /**
+ * Creates debug block highlight on specified block location and show it to this player.
@@ -1084,7 +1082,7 @@ index f9b3ecbab5826efb50adc2e1831051232e6b3b22..c39bd414cb3b1e12867cfee150f0ccfc
+ * @param text Text to show above the highlight
+ * @param argb Color of the highlight. ARGB int. Will be ignored on some versions of vanilla client
+ */
-+ void sendBlockHighlight(@NotNull Location location, int duration, @NotNull String text, int argb);
++ void sendBlockHighlight(Location location, int duration, String text, int argb);
+
+ /**
+ * Creates debug block highlight on specified block location and show it to this player.
@@ -1096,7 +1094,7 @@ index f9b3ecbab5826efb50adc2e1831051232e6b3b22..c39bd414cb3b1e12867cfee150f0ccfc
+ * @param transparency Transparency of the highlight
+ * @throws IllegalArgumentException If transparency is outside 0-255 range
+ */
-+ void sendBlockHighlight(@NotNull Location location, int duration, @NotNull org.bukkit.Color color, int transparency);
++ void sendBlockHighlight(Location location, int duration, org.bukkit.Color color, int transparency);
+
+ /**
+ * Creates debug block highlight on specified block location and show it to this player.
@@ -1109,7 +1107,7 @@ index f9b3ecbab5826efb50adc2e1831051232e6b3b22..c39bd414cb3b1e12867cfee150f0ccfc
+ * @param transparency Transparency of the highlight
+ * @throws IllegalArgumentException If transparency is outside 0-255 range
+ */
-+ void sendBlockHighlight(@NotNull Location location, int duration, @NotNull String text, @NotNull org.bukkit.Color color, int transparency);
++ void sendBlockHighlight(Location location, int duration, String text, org.bukkit.Color color, int transparency);
+
+ /**
+ * Clears all debug block highlights
@@ -1121,7 +1119,7 @@ index f9b3ecbab5826efb50adc2e1831051232e6b3b22..c39bd414cb3b1e12867cfee150f0ccfc
+ *
+ * @param message The death message to show the player
+ */
-+ void sendDeathScreen(@NotNull net.kyori.adventure.text.Component message);
++ void sendDeathScreen(net.kyori.adventure.text.Component message);
+
+ /**
+ * Sends a player the death screen with a specified death message,
@@ -1132,7 +1130,7 @@ index f9b3ecbab5826efb50adc2e1831051232e6b3b22..c39bd414cb3b1e12867cfee150f0ccfc
+ * @deprecated Use {@link #sendDeathScreen(net.kyori.adventure.text.Component)} instead, as 1.20 removed the killer ID from the packet.
+ */
+ @Deprecated(since = "1.20")
-+ default void sendDeathScreen(@NotNull net.kyori.adventure.text.Component message, @Nullable Entity killer) {
++ default void sendDeathScreen(net.kyori.adventure.text.Component message, @Nullable Entity killer) {
+ sendDeathScreen(message);
+ }
+ // Purpur end
diff --git a/leaf-api/paper-patches/features/0006-KeYi-Player-Skull-API.patch b/leaf-api/paper-patches/features/0006-KeYi-Player-Skull-API.patch
index 7add01a47..fb9203069 100644
--- a/leaf-api/paper-patches/features/0006-KeYi-Player-Skull-API.patch
+++ b/leaf-api/paper-patches/features/0006-KeYi-Player-Skull-API.patch
@@ -7,10 +7,10 @@ Original license: MIT
Original project: https://github.com/KeYiMC/KeYi
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
-index c39bd414cb3b1e12867cfee150f0ccfc9ba56ce8..a7abbf0b8645f394a30dc27995919a32c7a424d5 100644
+index ca8abdebf8e9d23e982883a7283fdedf12a36170..2a8abee51e8fad62b0aa58a47eadfbac2bf51fdf 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
-@@ -4057,4 +4057,23 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
+@@ -4031,4 +4031,23 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
sendDeathScreen(message);
}
// Purpur end
diff --git a/leaf-api/paper-patches/features/0007-Slice-Smooth-Teleports.patch b/leaf-api/paper-patches/features/0007-Slice-Smooth-Teleports.patch
index c54be62e7..e720b9227 100644
--- a/leaf-api/paper-patches/features/0007-Slice-Smooth-Teleports.patch
+++ b/leaf-api/paper-patches/features/0007-Slice-Smooth-Teleports.patch
@@ -9,10 +9,10 @@ Original project: https://github.com/Cryptite/Slice
Co-authored-by: HaHaWTH <102713261+HaHaWTH@users.noreply.github.com>
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
-index a7abbf0b8645f394a30dc27995919a32c7a424d5..425062e31d81cd160f4e3d896741f28ac1e91d05 100644
+index 2a8abee51e8fad62b0aa58a47eadfbac2bf51fdf..afdec702fbe37d49cac6a80561a9dfdc4904d48a 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
-@@ -3734,6 +3734,33 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
+@@ -3709,6 +3709,33 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
String getClientBrandName();
// Paper end
diff --git a/leaf-api/paper-patches/features/0009-Leaves-Replay-Mod-API.patch b/leaf-api/paper-patches/features/0009-Leaves-Replay-Mod-API.patch
index 5a1d81884..fe280ccde 100644
--- a/leaf-api/paper-patches/features/0009-Leaves-Replay-Mod-API.patch
+++ b/leaf-api/paper-patches/features/0009-Leaves-Replay-Mod-API.patch
@@ -11,10 +11,10 @@ Original project: https://github.com/LeavesMC/Leaves
This patch is Powered by ReplayMod(https://github.com/ReplayMod)
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
-index d67af3fdc4434817cea29673069430a33fb30a8e..c8699e7b186caf0735a888f78ed4b777e1c119fe 100644
+index 7ce5e34bfb3d8db97b32e9f8ec010e4ff088be65..f044efd4426e528dd1a2932dedabc54291b0c336 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
-@@ -3175,4 +3175,10 @@ public final class Bukkit {
+@@ -3179,4 +3179,10 @@ public final class Bukkit {
server.clearBlockHighlights();
}
// Purpur end - Debug Marker API
@@ -26,10 +26,10 @@ index d67af3fdc4434817cea29673069430a33fb30a8e..c8699e7b186caf0735a888f78ed4b777
+ // Leaves end - Photographer API
}
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
-index 6790ca1648a17cf30063522f68b3ac3e82e3bd8c..91c6808a6500c3f2e43818a7a30ab5d83d89f539 100644
+index 13346dfe2a6d848cf63cbba95d8dea8dfdddf905..eddcbd7bdf8d86ee07cb7a95e8c043c4abba8344 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
-@@ -2858,4 +2858,8 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
+@@ -2862,4 +2862,8 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
*/
void clearBlockHighlights();
// Purpur end - Debug Marker API
diff --git a/leaf-server/minecraft-patches/features/0006-Purpur-Server-Minecraft-Changes.patch b/leaf-server/minecraft-patches/features/0006-Purpur-Server-Minecraft-Changes.patch
index e47f1744c..352c6c8e3 100644
--- a/leaf-server/minecraft-patches/features/0006-Purpur-Server-Minecraft-Changes.patch
+++ b/leaf-server/minecraft-patches/features/0006-Purpur-Server-Minecraft-Changes.patch
@@ -6,7 +6,7 @@ Subject: [PATCH] Purpur Server Minecraft Changes
Original license: MIT
Original project: https://github.com/PurpurMC/Purpur
-Commit: 71f219d84d5787e5e2944f639ecea2da808aa7fe
+Commit: e6a1ebd3f6e4cfe93f96dd82ecb3234f0482768a
Patches listed below are removed in this patch, They exists in Gale or Leaf:
* "net/minecraft/CrashReport.java.patch"
@@ -267,7 +267,7 @@ index fe4ae6bcdcbb55c47e9f9a4d63ead4c39e6d63cf..ec0998369158286fccb38c8e10c3cfa2
public boolean isLocalPlayer() {
return true;
diff --git a/net/minecraft/network/Connection.java b/net/minecraft/network/Connection.java
-index 208efae06c7c44f220d4192219a86ec55c98a2fe..3baf29818d82aa7ba1cc565aaeb26288e5a23a33 100644
+index e1000d8ab5ae0034b56a3524d2caee8c299b50e7..7b78c0af4a83bd39a5bc2d6554cc677bd4c0c822 100644
--- a/net/minecraft/network/Connection.java
+++ b/net/minecraft/network/Connection.java
@@ -588,11 +588,20 @@ public class Connection extends SimpleChannelInboundHandler> {
@@ -3070,7 +3070,7 @@ index 84afd8646b05409c582f29d73f9fea4b09feb603..32779b121322688a4b14e460b1f902ef
} else {
workAtPoi = new WorkAtPoi();
diff --git a/net/minecraft/world/entity/ai/behavior/VillagerMakeLove.java b/net/minecraft/world/entity/ai/behavior/VillagerMakeLove.java
-index 4fb63e58eac5d67fcd31c3233dca1dae72b98bc4..dd8d315eba203db121e24e3402f2117fc0f3043f 100644
+index 8fe5bd54b5a4848da1f08ea65fe2bc3514bed8c8..54eeb72b638127b180470887a3b59d55773f3bc9 100644
--- a/net/minecraft/world/entity/ai/behavior/VillagerMakeLove.java
+++ b/net/minecraft/world/entity/ai/behavior/VillagerMakeLove.java
@@ -118,8 +118,10 @@ public class VillagerMakeLove extends Behavior {
@@ -3084,7 +3084,7 @@ index 4fb63e58eac5d67fcd31c3233dca1dae72b98bc4..dd8d315eba203db121e24e3402f2117f
+ partner.setAge(level.purpurConfig.villagerBreedingTicks);
+ // Purpur end - Make entity breeding times configurable
level.addFreshEntityWithPassengers(breedOffspring, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.BREEDING);
- // CraftBukkit end
+ // CraftBukkit end - call EntityBreedEvent
level.broadcastEntityEvent(breedOffspring, (byte)12);
diff --git a/net/minecraft/world/entity/ai/control/MoveControl.java b/net/minecraft/world/entity/ai/control/MoveControl.java
index 0f9bf0cb0655a6ed449a86e99b17f89b4e3264df..1860b4ab2314f5da017313977c6423e735a4f96b 100644
@@ -3491,7 +3491,7 @@ index c0997c8c0f8ee4474d3acdd5938b1879c4e589a2..28ae152125ed83d8917674b6068f227f
double d = this.wantedX - this.fish.getX();
double d1 = this.wantedY - this.fish.getY();
diff --git a/net/minecraft/world/entity/animal/Animal.java b/net/minecraft/world/entity/animal/Animal.java
-index e34e3b949676aa28dd7c82a47f2ed3b44ad200e3..fa34e7f1c20dfd569b52a9c8e0a8d4d5e659ce20 100644
+index 28697020ba838c86dde5b2b11b2fe8f347a147a7..452270f7f1c54ca98c34dcf9a9d29acae77737c8 100644
--- a/net/minecraft/world/entity/animal/Animal.java
+++ b/net/minecraft/world/entity/animal/Animal.java
@@ -40,6 +40,7 @@ public abstract class Animal extends AgeableMob {
@@ -3534,10 +3534,10 @@ index e34e3b949676aa28dd7c82a47f2ed3b44ad200e3..fa34e7f1c20dfd569b52a9c8e0a8d4d5
int experience = this.getRandom().nextInt(7) + 1;
org.bukkit.event.entity.EntityBreedEvent entityBreedEvent = org.bukkit.craftbukkit.event.CraftEventFactory.callEntityBreedEvent(breedOffspring, this, mate, breeder, this.breedItem, experience);
if (entityBreedEvent.isCancelled()) {
-@@ -269,8 +280,10 @@ public abstract class Animal extends AgeableMob {
+@@ -272,8 +283,10 @@ public abstract class Animal extends AgeableMob {
player.awardStat(Stats.ANIMALS_BRED);
CriteriaTriggers.BRED_ANIMALS.trigger(player, this, animal, baby);
- } // Paper
+ } // Paper - call EntityBreedEvent
- this.setAge(6000);
- animal.setAge(6000);
+ // Purpur start - Make entity breeding times configurable
@@ -4359,7 +4359,7 @@ index 4141052dfd635804195a5cfa24dbd0394355a7da..7003b532182737a745491e397a967b72
}
diff --git a/net/minecraft/world/entity/animal/Fox.java b/net/minecraft/world/entity/animal/Fox.java
-index 44bb04cc9796a16f5477d8f2ad22af62c9af1fc3..aa610af9db105081fcabc1f299e5f2dd1f4d907e 100644
+index b4f3bc7938060cf55b6b242759606bf5100a1f56..90452f0945e761077608692877677f522d38bccd 100644
--- a/net/minecraft/world/entity/animal/Fox.java
+++ b/net/minecraft/world/entity/animal/Fox.java
@@ -129,6 +129,73 @@ public class Fox extends Animal implements VariantHolder {
@@ -4502,7 +4502,7 @@ index 44bb04cc9796a16f5477d8f2ad22af62c9af1fc3..aa610af9db105081fcabc1f299e5f2dd
@Override
// Paper start - Cancellable death event
protected org.bukkit.event.entity.EntityDeathEvent dropAllDeathLoot(ServerLevel level, DamageSource damageSource) {
-@@ -892,8 +990,10 @@ public class Fox extends Animal implements VariantHolder {
+@@ -896,8 +994,10 @@ public class Fox extends Animal implements VariantHolder {
CriteriaTriggers.BRED_ANIMALS.trigger(serverPlayer, this.animal, this.partner, fox);
}
@@ -5990,7 +5990,7 @@ index fa5f7f7d54083f9ea2095dd44362069d00e0b9a5..41074e7847583583331ef8d685a9f9b8
return "entity.minecraft.tropical_fish.predefined." + variantId;
}
diff --git a/net/minecraft/world/entity/animal/Turtle.java b/net/minecraft/world/entity/animal/Turtle.java
-index 354ec2b987882d8f40ef4ac5257183d2fda73bb8..bc6acbc801e5b371859e731b8419736324e81bf0 100644
+index 354ec2b987882d8f40ef4ac5257183d2fda73bb8..3c877699914c906fca265c96770b1c29ed89a1e2 100644
--- a/net/minecraft/world/entity/animal/Turtle.java
+++ b/net/minecraft/world/entity/animal/Turtle.java
@@ -84,6 +84,52 @@ public class Turtle extends Animal {
@@ -6054,7 +6054,20 @@ index 354ec2b987882d8f40ef4ac5257183d2fda73bb8..bc6acbc801e5b371859e731b84197363
this.goalSelector.addGoal(0, new Turtle.TurtlePanicGoal(this, 1.2));
this.goalSelector.addGoal(1, new Turtle.TurtleBreedGoal(this, 1.0));
this.goalSelector.addGoal(1, new Turtle.TurtleLayEggGoal(this, 1.0));
-@@ -539,12 +586,14 @@ public class Turtle extends Animal {
+@@ -368,8 +415,10 @@ public class Turtle extends Animal {
+ }
+
+ this.turtle.setHasEgg(true);
+- this.animal.setAge(6000);
+- this.partner.setAge(6000);
++ // Purpur start - Make entity breeding times configurable
++ this.animal.setAge(this.animal.getPurpurBreedTime());
++ this.partner.setAge(this.partner.getPurpurBreedTime());
++ // Purpur end - Make entity breeding times configurable
+ this.animal.resetLove();
+ this.partner.resetLove();
+ RandomSource random = this.animal.getRandom();
+@@ -539,12 +588,14 @@ public class Turtle extends Animal {
}
}
@@ -6070,7 +6083,7 @@ index 354ec2b987882d8f40ef4ac5257183d2fda73bb8..bc6acbc801e5b371859e731b84197363
}
private void updateSpeed() {
-@@ -563,7 +612,7 @@ public class Turtle extends Animal {
+@@ -563,7 +614,7 @@ public class Turtle extends Animal {
}
@Override
@@ -6079,7 +6092,7 @@ index 354ec2b987882d8f40ef4ac5257183d2fda73bb8..bc6acbc801e5b371859e731b84197363
this.updateSpeed();
if (this.operation == MoveControl.Operation.MOVE_TO && !this.turtle.getNavigation().isDone()) {
double d = this.wantedX - this.turtle.getX();
-@@ -577,7 +626,7 @@ public class Turtle extends Animal {
+@@ -577,7 +628,7 @@ public class Turtle extends Animal {
float f = (float)(Mth.atan2(d2, d) * 180.0F / (float)Math.PI) - 90.0F;
this.turtle.setYRot(this.rotlerp(this.turtle.getYRot(), f, 90.0F));
this.turtle.yBodyRot = this.turtle.getYRot();
@@ -6581,7 +6594,7 @@ index 1ac4b13554d2699c3e04d41946e1adfd5e854a17..64ff0d2923f16a567aa753cad028a1b2
protected SoundEvent getAmbientSound() {
return SoundEvents.CAMEL_AMBIENT;
diff --git a/net/minecraft/world/entity/animal/frog/Frog.java b/net/minecraft/world/entity/animal/frog/Frog.java
-index 10a0779bf8611ade19e64031bb00beb277e98598..4ecc6b6247a6ab14a5d46f9a05d5df8412ae2a5f 100644
+index 10a0779bf8611ade19e64031bb00beb277e98598..aca0877319d507c3a672589bd4de5268d7a4c3dc 100644
--- a/net/minecraft/world/entity/animal/frog/Frog.java
+++ b/net/minecraft/world/entity/animal/frog/Frog.java
@@ -104,6 +104,8 @@ public class Frog extends Animal implements VariantHolder> {
@@ -6593,7 +6606,7 @@ index 10a0779bf8611ade19e64031bb00beb277e98598..4ecc6b6247a6ab14a5d46f9a05d5df84
public Frog(EntityType extends Animal> entityType, Level level) {
super(entityType, level);
-@@ -111,8 +113,62 @@ public class Frog extends Animal implements VariantHolder> {
+@@ -111,7 +113,62 @@ public class Frog extends Animal implements VariantHolder> {
this.setPathfindingMalus(PathType.WATER, 4.0F);
this.setPathfindingMalus(PathType.TRAPDOOR, -1.0F);
this.moveControl = new SmoothSwimmingMoveControl(this, 85, 10, 0.02F, 0.1F, true);
@@ -6633,8 +6646,8 @@ index 10a0779bf8611ade19e64031bb00beb277e98598..4ecc6b6247a6ab14a5d46f9a05d5df84
+ @Override
+ public boolean isControllable() {
+ return level().purpurConfig.frogControllable;
- }
-
++ }
++
+ @Override
+ protected void registerGoals() {
+ this.goalSelector.addGoal(0, new org.purpurmc.purpur.entity.ai.HasRider(this)); // Purpur - Ridables
@@ -6651,12 +6664,12 @@ index 10a0779bf8611ade19e64031bb00beb277e98598..4ecc6b6247a6ab14a5d46f9a05d5df84
+ @Override
+ public int getPurpurBreedTime() {
+ return this.level().purpurConfig.frogBreedingTicks;
-+ }
+ }
+ // Purpur end - Make entity breeding times configurable
+
@Override
protected Brain.Provider brainProvider() {
- return Brain.provider(MEMORY_TYPES, SENSOR_TYPES);
-@@ -185,6 +241,7 @@ public class Frog extends Animal implements VariantHolder> {
+@@ -185,6 +242,7 @@ public class Frog extends Animal implements VariantHolder> {
private int behaviorTick = 0; // Pufferfish
@Override
protected void customServerAiStep(ServerLevel level) {
@@ -6664,7 +6677,7 @@ index 10a0779bf8611ade19e64031bb00beb277e98598..4ecc6b6247a6ab14a5d46f9a05d5df84
if (this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish
this.getBrain().tick(level, this);
FrogAi.updateActivity(this);
-@@ -375,7 +432,7 @@ public class Frog extends Animal implements VariantHolder> {
+@@ -375,7 +433,7 @@ public class Frog extends Animal implements VariantHolder> {
return level.getBlockState(pos.below()).is(BlockTags.FROGS_SPAWNABLE_ON) && isBrightEnoughToSpawn(level, pos);
}
@@ -11906,10 +11919,10 @@ index 6cd7d0f82bd97c6adb521eda3bc84c60f87c0cda..2c6833753950f1bb0941b0cbe54bebdd
}
}
diff --git a/net/minecraft/world/entity/monster/hoglin/Hoglin.java b/net/minecraft/world/entity/monster/hoglin/Hoglin.java
-index f93d6564c59ae9a144b56ea3355c4c7425b99eeb..24725009d7619b0e9043d7d0039f805c611aedf6 100644
+index f93d6564c59ae9a144b56ea3355c4c7425b99eeb..7c119b089259add643cd112efac55f92024d0275 100644
--- a/net/minecraft/world/entity/monster/hoglin/Hoglin.java
+++ b/net/minecraft/world/entity/monster/hoglin/Hoglin.java
-@@ -90,11 +90,57 @@ public class Hoglin extends Animal implements Enemy, HoglinBase {
+@@ -90,6 +90,52 @@ public class Hoglin extends Animal implements Enemy, HoglinBase {
this.xpReward = 5;
}
@@ -11938,11 +11951,6 @@ index f93d6564c59ae9a144b56ea3355c4c7425b99eeb..24725009d7619b0e9043d7d0039f805c
+ }
+ // Purpur end - Configurable entity base attributes
+
- @VisibleForTesting
- public void setTimeInOverworld(int timeInOverworld) {
- this.timeInOverworld = timeInOverworld;
- }
-
+ // Purpur start - Make entity breeding times configurable
+ @Override
+ public int getPurpurBreedTime() {
@@ -11964,9 +11972,9 @@ index f93d6564c59ae9a144b56ea3355c4c7425b99eeb..24725009d7619b0e9043d7d0039f805c
+ }
+ // Purpur end - Mobs always drop experience
+
- @Override
- public boolean canBeLeashed() {
- return true;
+ @VisibleForTesting
+ public void setTimeInOverworld(int timeInOverworld) {
+ this.timeInOverworld = timeInOverworld;
@@ -157,6 +203,7 @@ public class Hoglin extends Animal implements Enemy, HoglinBase {
private int behaviorTick; // Pufferfish
@Override
diff --git a/leaf-server/minecraft-patches/features/0007-Fix-Pufferfish-and-Purpur-patches.patch b/leaf-server/minecraft-patches/features/0007-Fix-Pufferfish-and-Purpur-patches.patch
index 54f4a8a43..39e33c88d 100644
--- a/leaf-server/minecraft-patches/features/0007-Fix-Pufferfish-and-Purpur-patches.patch
+++ b/leaf-server/minecraft-patches/features/0007-Fix-Pufferfish-and-Purpur-patches.patch
@@ -240,10 +240,10 @@ index 1323cedcacd3072cdf5f1eac644688cd098b53db..ad19bbd6989bfb98966872b304f6ece0
AxolotlAi.updateActivity(this);
if (!this.isNoAi()) {
diff --git a/net/minecraft/world/entity/animal/frog/Frog.java b/net/minecraft/world/entity/animal/frog/Frog.java
-index 4ecc6b6247a6ab14a5d46f9a05d5df8412ae2a5f..4aadf347811df904e634ea7ebcc5361ea6cb7e7a 100644
+index aca0877319d507c3a672589bd4de5268d7a4c3dc..e5ec23c413e0d7da6f6b9c43925a7aa247946895 100644
--- a/net/minecraft/world/entity/animal/frog/Frog.java
+++ b/net/minecraft/world/entity/animal/frog/Frog.java
-@@ -241,8 +241,7 @@ public class Frog extends Animal implements VariantHolder> {
+@@ -242,8 +242,7 @@ public class Frog extends Animal implements VariantHolder> {
private int behaviorTick = 0; // Pufferfish
@Override
protected void customServerAiStep(ServerLevel level) {
@@ -282,7 +282,7 @@ index 35d1b99b873d9f8c9aa2a1178a449a8625b18406..9b3ff19b3ce1a4780cab01bae6561d45
GoatAi.updateActivity(this);
super.customServerAiStep(level);
diff --git a/net/minecraft/world/entity/monster/hoglin/Hoglin.java b/net/minecraft/world/entity/monster/hoglin/Hoglin.java
-index 24725009d7619b0e9043d7d0039f805c611aedf6..f89a3c4f75a40981aff7253cd04bcdf3c8c26952 100644
+index 7c119b089259add643cd112efac55f92024d0275..f20ae21f38b621b0e3bab887c40bbb8237b87e34 100644
--- a/net/minecraft/world/entity/monster/hoglin/Hoglin.java
+++ b/net/minecraft/world/entity/monster/hoglin/Hoglin.java
@@ -203,8 +203,7 @@ public class Hoglin extends Animal implements Enemy, HoglinBase {
diff --git a/leaf-server/minecraft-patches/features/0025-Petal-Async-Pathfinding.patch b/leaf-server/minecraft-patches/features/0025-Petal-Async-Pathfinding.patch
index 37807a309..f1e7b57a1 100644
--- a/leaf-server/minecraft-patches/features/0025-Petal-Async-Pathfinding.patch
+++ b/leaf-server/minecraft-patches/features/0025-Petal-Async-Pathfinding.patch
@@ -584,10 +584,10 @@ index d5727999eb67ff30dbf47865d59452483338e170..6fffa2e98e54ab015762417af8507d11
}
}
diff --git a/net/minecraft/world/entity/animal/frog/Frog.java b/net/minecraft/world/entity/animal/frog/Frog.java
-index 4aadf347811df904e634ea7ebcc5361ea6cb7e7a..2eb664047eab21a16627fece83ad4a4e5d4bf46f 100644
+index e5ec23c413e0d7da6f6b9c43925a7aa247946895..6e5cb137b3aa91321528d00a1433009cb9a0e656 100644
--- a/net/minecraft/world/entity/animal/frog/Frog.java
+++ b/net/minecraft/world/entity/animal/frog/Frog.java
-@@ -478,9 +478,25 @@ public class Frog extends Animal implements VariantHolder> {
+@@ -479,9 +479,25 @@ public class Frog extends Animal implements VariantHolder> {
return pathType != PathType.WATER_BORDER && super.canCutCorner(pathType);
}
diff --git a/leaf-server/minecraft-patches/features/0034-Plazma-Add-missing-purpur-configuration-options.patch b/leaf-server/minecraft-patches/features/0034-Plazma-Add-missing-purpur-configuration-options.patch
index bc62d7dd4..6cf55662e 100644
--- a/leaf-server/minecraft-patches/features/0034-Plazma-Add-missing-purpur-configuration-options.patch
+++ b/leaf-server/minecraft-patches/features/0034-Plazma-Add-missing-purpur-configuration-options.patch
@@ -64,14 +64,13 @@ index a7168edb338c5a77c884e9eef1e48bcdc3623fa4..e5f24eaa18045f6a33248c6f907ebcd9
CamelAi.updateActivity(this);
super.customServerAiStep(level);
diff --git a/net/minecraft/world/entity/animal/frog/Frog.java b/net/minecraft/world/entity/animal/frog/Frog.java
-index 2eb664047eab21a16627fece83ad4a4e5d4bf46f..fca179b8c30083eab1f4a3057d24f0f9100d490d 100644
+index 6e5cb137b3aa91321528d00a1433009cb9a0e656..fca179b8c30083eab1f4a3057d24f0f9100d490d 100644
--- a/net/minecraft/world/entity/animal/frog/Frog.java
+++ b/net/minecraft/world/entity/animal/frog/Frog.java
-@@ -169,6 +169,24 @@ public class Frog extends Animal implements VariantHolder> {
- return this.level().purpurConfig.frogBreedingTicks;
+@@ -170,6 +170,23 @@ public class Frog extends Animal implements VariantHolder> {
}
// Purpur end - Make entity breeding times configurable
-+
+
+ // Leaf start - Plazma - Add missing purpur configuration options
+ @Override
+ public boolean isSensitiveToWater() {
diff --git a/leaf-server/paper-patches/features/0004-Purpur-Server-Paper-Changes.patch b/leaf-server/paper-patches/features/0004-Purpur-Server-Paper-Changes.patch
index d4a6de9bd..4fe4a9705 100644
--- a/leaf-server/paper-patches/features/0004-Purpur-Server-Paper-Changes.patch
+++ b/leaf-server/paper-patches/features/0004-Purpur-Server-Paper-Changes.patch
@@ -6,7 +6,7 @@ Subject: [PATCH] Purpur Server Paper Changes
Original license: MIT
Original project: https://github.com/PurpurMC/Purpur
-Commit: 71f219d84d5787e5e2944f639ecea2da808aa7fe
+Commit: e6a1ebd3f6e4cfe93f96dd82ecb3234f0482768a
Patches listed below are removed in this patch, They exists in Gale or Leaf:
* "Rebrand.patch"