diff --git a/.github/workflows/build-1211.yml b/.github/workflows/build-1213.yml similarity index 83% rename from .github/workflows/build-1211.yml rename to .github/workflows/build-1213.yml index 4bc19d8f0..190725de4 100644 --- a/.github/workflows/build-1211.yml +++ b/.github/workflows/build-1213.yml @@ -1,10 +1,10 @@ -name: Build Leaf 1.21.1 +name: Build Leaf 1.21.3 on: push: - branches: [ "ver/1.21.1" ] + branches: [ "dev/1.21.3" ] pull_request: - branches: [ "ver/1.21.1" ] + branches: [ "ver/1.21.3" ] jobs: build: @@ -33,8 +33,8 @@ jobs: - name: Rename Paperclip Jar run: | - mv build/libs/leaf-paperclip-1.21.1-R0.1-SNAPSHOT-mojmap.jar ./leaf-1.21.1-mojmap.jar - mv build/libs/leaf-paperclip-1.21.1-R0.1-SNAPSHOT-reobf.jar ./leaf-1.21.1-reobf.jar + mv build/libs/leaf-paperclip-1.21.3-R0.1-SNAPSHOT-mojmap.jar ./leaf-1.21.3-mojmap.jar + mv build/libs/leaf-paperclip-1.21.3-R0.1-SNAPSHOT-reobf.jar ./leaf-1.21.3-reobf.jar - name: Publish API if: github.event_name != 'pull_request' @@ -50,12 +50,12 @@ jobs: - name: Upload Leaf uses: actions/upload-artifact@main with: - name: Leaf 1.21.1 - path: ./leaf-1.21.1-*.jar + name: Leaf 1.21.3 + path: ./leaf-1.21.3-*.jar - name: Rename Paperclip Jar run: | - mv ./leaf-1.21.1-mojmap.jar ./leaf-1.21.1.jar + mv ./leaf-1.21.3-mojmap.jar ./leaf-1.21.3.jar # TODO: marvinpinto/action-automatic-releases is archived, need to find new one # Notes: create releases every time, similar changelogs with this, all commits for changelogs @@ -63,8 +63,8 @@ jobs: if: github.event_name != 'pull_request' uses: marvinpinto/action-automatic-releases@master with: - title: "Leaf 1.21.1" - automatic_release_tag: "ver-1.21.1" + title: "Leaf 1.21.3" + automatic_release_tag: "ver-1.21.3" repo_token: "${{ secrets.GITHUB_TOKEN }}" - files: "./leaf-1.21.1.jar" + files: "./leaf-1.21.3.jar" prerelease: false diff --git a/README.md b/README.md index 3fcfcb5ad..7a72ec26b 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@
[![Github Releases](https://img.shields.io/badge/Download-Releases-blue?&style=for-the-badge&colorA=19201a&colorB=298046)](https://github.com/Winds-Studio/Leaf/releases)⠀ -[![Github Actions Build](https://img.shields.io/github/actions/workflow/status/Winds-Studio/Leaf/build-1211.yml?&style=for-the-badge&colorA=19201a&colorB=298046)](https://github.com/Winds-Studio/Leaf/actions)⠀ +[![Github Actions Build](https://img.shields.io/github/actions/workflow/status/Winds-Studio/Leaf/build-1213.yml?&style=for-the-badge&colorA=19201a&colorB=298046)](https://github.com/Winds-Studio/Leaf/actions)⠀ [![Discord](https://img.shields.io/discord/1145991395388162119?label=discord&style=for-the-badge&colorA=19201a&colorB=298046)](https://discord.gg/gfgAwdSEuM) **Leaf** is a drop-in replacement for [Paper](https://papermc.io/) servers designed to remove some checks, customized and high-performance, built on top of [Gale](https://github.com/Dreeam-qwq/Gale) with optimizations and fixes from other forks. @@ -61,7 +61,7 @@ Building a Paperclip JAR for distribution: cn.dreeam.leaf leaf-api - 1.21.1-R0.1-SNAPSHOT + 1.21.3-R0.1-SNAPSHOT provided ``` @@ -74,7 +74,7 @@ repositories { } dependencies { - compileOnly("cn.dreeam.leaf:leaf-api:1.21.1-R0.1-SNAPSHOT") + compileOnly("cn.dreeam.leaf:leaf-api:1.21.3-R0.1-SNAPSHOT") } java { diff --git a/build.gradle.kts b/build.gradle.kts index ab1f9f9b7..f409971e8 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,7 +1,7 @@ plugins { java `maven-publish` - id("io.papermc.paperweight.patcher") version "1.7.6-SNAPSHOT" + id("io.papermc.paperweight.patcher") version "1.7.8-SNAPSHOT" } val paperMavenPublicUrl = "https://repo.papermc.io/repository/maven-public/" @@ -54,8 +54,8 @@ subprojects { paperweight { serverProject.set(project(":leaf-server")) - remapRepo.set("https://maven.fabricmc.net/") - decompileRepo.set("https://maven.quiltmc.org/") + remapRepo.set(paperMavenPublicUrl) + decompileRepo.set(paperMavenPublicUrl) useStandardUpstream("Gale") { url.set(github("Dreeam-qwq", "Gale")) diff --git a/gradle.properties b/gradle.properties index ab194f6e2..3fd0e3968 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,10 +1,10 @@ group = cn.dreeam.leaf -mcVersion = 1.21.1 -version = 1.21.1-R0.1-SNAPSHOT +mcVersion = 1.21.3 +version = 1.21.3-R0.1-SNAPSHOT -galeCommit = 2f4ceb58755838d29427d052244452c5c8a616a7 +galeCommit = abd27587a83632c04b1018976b783425e980b1f2 org.gradle.caching = true org.gradle.parallel = true org.gradle.vfs.watch = false -org.gradle.jvmargs = -Xmx4G -Dfile.encoding=UTF8 \ No newline at end of file +org.gradle.jvmargs = -Xmx4G \ No newline at end of file diff --git a/patches/api/0002-Leaf-config-files.patch b/patches/api/0002-Leaf-config-files.patch index e9a0c833d..07bac7c80 100644 --- a/patches/api/0002-Leaf-config-files.patch +++ b/patches/api/0002-Leaf-config-files.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Leaf config files diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index b2c31cfa7013b2e98225444fa7c0a9c2efd97bb6..2a22f20f25f46766cd8bc69a640898f4b051fc68 100644 +index a3b84a898210b012d5fbae55f0bb739b5487505c..597b06c2cb289c235ad14009b186aa00f55cefcd 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java -@@ -2318,6 +2318,14 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi +@@ -2336,6 +2336,14 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi // Paper end diff --git a/patches/api/0003-Pufferfish-Sentry.patch b/patches/api/0003-Pufferfish-Sentry.patch index 0069f2660..d79452374 100644 --- a/patches/api/0003-Pufferfish-Sentry.patch +++ b/patches/api/0003-Pufferfish-Sentry.patch @@ -7,10 +7,10 @@ Original license: GPL v3 Original project: https://github.com/pufferfish-gg/Pufferfish diff --git a/build.gradle.kts b/build.gradle.kts -index 9369b3ba3c0f89924d7b40a397b58a8a102683d7..1cc87374beed7b4a2cfdd278b076e20b1e9febc8 100644 +index 3c50294a0a68fd8e9fd4028d41495ad3b9781b1e..5fac022f2373105df7f9cfb292642c4a399c7db4 100644 --- a/build.gradle.kts +++ b/build.gradle.kts -@@ -52,6 +52,7 @@ dependencies { +@@ -64,6 +64,7 @@ dependencies { apiAndDocs("net.kyori:adventure-text-logger-slf4j") api("org.apache.logging.log4j:log4j-api:$log4jVersion") api("org.slf4j:slf4j-api:$slf4jVersion") @@ -190,7 +190,7 @@ index 0000000000000000000000000000000000000000..c7772aac00f6db664f7a5673bc2585fa + } +} diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java -index 003bece642b682985625db93cad93026352bfc66..e8ba4f1108f2548a487877027e37d81fc150e042 100644 +index 001465eedafa51ac027a4db51cba6223edfe1171..2e6d62c4f3687e299c34e876c503b400e13be05a 100644 --- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java +++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java @@ -597,7 +597,9 @@ public final class SimplePluginManager implements PluginManager { @@ -216,7 +216,7 @@ index 003bece642b682985625db93cad93026352bfc66..e8ba4f1108f2548a487877027e37d81f callEvent(new com.destroystokyo.paper.event.server.ServerExceptionEvent(new com.destroystokyo.paper.exception.ServerEventException(msg, ex, registration.getPlugin(), registration.getListener(), event))); } diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java -index 92d20e70d26318fbaed8adffd21c6b77336eb9c5..f7266e3991d991e7d7b38752ed472bc9cfa5f43c 100644 +index 8acf45815b5841e3b2082a8bc5b7974e85cdd7f9..2fae50a9d1f0d9ecd91036697dedd64bc56f7d3b 100644 --- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java +++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java @@ -343,7 +343,13 @@ public final class JavaPluginLoader implements PluginLoader { diff --git a/patches/api/0004-Purpur-API-Changes.patch b/patches/api/0004-Purpur-API-Changes.patch index 94627f35a..3f6c248fb 100644 --- a/patches/api/0004-Purpur-API-Changes.patch +++ b/patches/api/0004-Purpur-API-Changes.patch @@ -1,12 +1,12 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Github Actions -Date: Fri, 21 Jun 2024 03:34:00 +0000 +Date: Thu, 12 Dec 2024 11:10:02 +0000 Subject: [PATCH] Purpur API Changes Original license: MIT Original project: https://github.com/PurpurMC/Purpur -Commit: 803bf624d9e6616b879a16e6ce3c7e196468c577 +Commit: 16ce24aa7eb08232030e4570e027f7baefa5f3f9 Patches below are removed in this patch: Pufferfish-API-Changes.patch @@ -34,10 +34,10 @@ index bef5b7b089f33c8ce1304292804ea56d16e574c9..5873b42c198d7972e4147d019c790b61 /** * The brand id for Purpur. diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index 3576093460cba9b3ef2cc46b3d4d03eedba5a0f9..ebf04da015cfe394e9c5d3a3c432674df979f93c 100644 +index 2ddaa049b5b14ef7de2899862b3cc69537361b00..2477a560ed345116cd9d4e90f98694b84a1faf28 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java -@@ -2988,4 +2988,127 @@ public final class Bukkit { +@@ -3035,4 +3035,127 @@ public final class Bukkit { public static Server.Spigot spigot() { return server.spigot(); } @@ -248,13 +248,13 @@ index 918a045165cdcde264bc24082b7afebb407271de..e98d6321c5f2cdde91b54f8a74cbcc04 + // Purpur end } diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java -index 77a15a99e441bd81650806142581bd5b24f30e10..3ec2154956087a370799f0fa485f3b6cae894c69 100644 +index 028ac35df6c4d044d07b3869751736d418c1eb0e..95c1f331f364c5fafa100860f3c9674f18888714 100644 --- a/src/main/java/org/bukkit/Material.java +++ b/src/main/java/org/bukkit/Material.java -@@ -5636,4 +5636,40 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla - public BlockType asBlockType() { - return blockType.get(); +@@ -5840,4 +5840,40 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla + return this.asItemType().getDefaultDataTypes(); } + // Paper end - data component API + + // Purpur start + public boolean isArmor() { @@ -293,7 +293,7 @@ index 77a15a99e441bd81650806142581bd5b24f30e10..3ec2154956087a370799f0fa485f3b6c + // Purpur end } diff --git a/src/main/java/org/bukkit/OfflinePlayer.java b/src/main/java/org/bukkit/OfflinePlayer.java -index a028f2fe541491729856051780b33dba07832fb6..fc64902368a068481f16d5db99c94386caf6b60b 100644 +index 5622fe3165baad8138c22cfc016ed6c3834cf702..6d31b561d915180fcd473b317721064feed28f37 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 @@ -404,10 +404,10 @@ index a028f2fe541491729856051780b33dba07832fb6..fc64902368a068481f16d5db99c94386 + // Purpur end - OfflinePlayer API } diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index b1c34f4d44b420930e79dd440328e522b669601f..ab6e3eb18b9c36fdd8f56f491332085aa2ec0c37 100644 +index 597b06c2cb289c235ad14009b186aa00f55cefcd..582c1f053020dff2cde8a1a7a1a760a84e856b7c 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java -@@ -2318,6 +2318,18 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi +@@ -2336,6 +2336,18 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi // Paper end @@ -426,10 +426,11 @@ index b1c34f4d44b420930e79dd440328e522b669601f..ab6e3eb18b9c36fdd8f56f491332085a // Leaf start @NotNull public org.bukkit.configuration.file.YamlConfiguration getLeafConfig() -@@ -2641,4 +2653,104 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi +@@ -2693,4 +2705,105 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi + */ long getLastTickOversleepTime(); // Gale end - YAPFA - last tick time - API - ++ + // Purpur start + /** + * Get the name of this server @@ -532,10 +533,10 @@ index b1c34f4d44b420930e79dd440328e522b669601f..ab6e3eb18b9c36fdd8f56f491332085a + // Purpur end } diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index ef32a937e6faf1e8a5d6b1207986715bae5a246c..36cf567973900d1e472616748926aecb9afcb42f 100644 +index bef54a6c8290e09cbaac20b03dde8dfb902c96b0..5f7de23e419175e55459df760c7190639ea39f18 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java -@@ -4209,6 +4209,86 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient +@@ -4246,6 +4246,86 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient @Nullable public DragonBattle getEnderDragonBattle(); @@ -685,7 +686,7 @@ index 5df19bd701c67506689fc7f49d91f99ebfbc83f0..a09b5458191eb5df4787859b72a37fa1 } catch (CommandException ex) { server.getPluginManager().callEvent(new com.destroystokyo.paper.event.server.ServerExceptionEvent(new com.destroystokyo.paper.exception.ServerCommandException(ex, target, sender, args))); // Paper diff --git a/src/main/java/org/bukkit/enchantments/EnchantmentTarget.java b/src/main/java/org/bukkit/enchantments/EnchantmentTarget.java -index 455ff52d90565838fe7640c3f045b27082a6c2f1..45f5493eebfecf56b7c0ef4659c078dfc62c0612 100644 +index 6fcc15d588239481136876d117ab346a8deac1dd..13b903e785a9ef5e513cb9d6483482133cc5f25b 100644 --- a/src/main/java/org/bukkit/enchantments/EnchantmentTarget.java +++ b/src/main/java/org/bukkit/enchantments/EnchantmentTarget.java @@ -227,6 +227,28 @@ public enum EnchantmentTarget { @@ -718,7 +719,7 @@ index 455ff52d90565838fe7640c3f045b27082a6c2f1..45f5493eebfecf56b7c0ef4659c078df /** diff --git a/src/main/java/org/bukkit/entity/Endermite.java b/src/main/java/org/bukkit/entity/Endermite.java -index 138d2530de2410f4a9424dabd3e5ce0cd1c1dcd2..10a8d64ad2da0be2c14f34c3e7d1957c6f2883d1 100644 +index 7b379fb21e800a766ad022705a12dff6d42279ab..10a8d64ad2da0be2c14f34c3e7d1957c6f2883d1 100644 --- a/src/main/java/org/bukkit/entity/Endermite.java +++ b/src/main/java/org/bukkit/entity/Endermite.java @@ -3,25 +3,21 @@ package org.bukkit.entity; @@ -734,7 +735,7 @@ index 138d2530de2410f4a9424dabd3e5ce0cd1c1dcd2..10a8d64ad2da0be2c14f34c3e7d1957c * @return player spawned status - * @deprecated this functionality no longer exists */ -- @Deprecated +- @Deprecated(since = "1.17") boolean isPlayerSpawned(); /** @@ -747,12 +748,12 @@ index 138d2530de2410f4a9424dabd3e5ce0cd1c1dcd2..10a8d64ad2da0be2c14f34c3e7d1957c * @param playerSpawned player spawned status - * @deprecated this functionality no longer exists */ -- @Deprecated +- @Deprecated(since = "1.17") void setPlayerSpawned(boolean playerSpawned); // Paper start /** diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java -index d0ae8a94db20281d3664d74718c65234eb2e5f83..b7d53973ac4e829a03821d59e0b3a28d6f6a4373 100644 +index 19272cff8d6d040e95b2644d70acdac606e06c16..076fe310d500ebb52e705a3a69e895061702f470 100644 --- a/src/main/java/org/bukkit/entity/Entity.java +++ b/src/main/java/org/bukkit/entity/Entity.java @@ -1172,4 +1172,55 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent @@ -904,7 +905,7 @@ index bcc6ba95bd21c7972865838c636a03f50b6c1f1a..c3fcd8dd7dbb1e1a18e17c014c1e6411 + // Purpur end } diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java -index 68c08e7a212bc3e3885f9b5a4d9aef85fcb3b029..a22909446b7193b1de121bdd6d7b6fbf81dc3be4 100644 +index d21a228bbec0302e75c4db5aa1db54f321143587..a4acc3578e935cd1174474bd1f6ff14db4294fe7 100644 --- a/src/main/java/org/bukkit/entity/LivingEntity.java +++ b/src/main/java/org/bukkit/entity/LivingEntity.java @@ -1468,4 +1468,20 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource @@ -954,10 +955,10 @@ 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 c4763ae47c9b893c1b9ae731ab3c1db76e44ae0f..0cba31526ae7c0429885bb8802512eaad3573e42 100644 +index 20e3c0f856ec034b1d7a5617337ac093386b200f..347d6cbee7daba824adf798c1ec9895ae1da67ab 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -3881,4 +3881,123 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -3921,4 +3921,123 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM */ void sendEntityEffect(org.bukkit.@NotNull EntityEffect effect, @NotNull Entity target); // Paper end - entity effect API @@ -1176,10 +1177,10 @@ index c73489f4b745bc84501ce94f0227b034d9768eae..a97129e71f16ec691759add664bdfd35 + // Purpur end } diff --git a/src/main/java/org/bukkit/event/entity/EntityDamageEvent.java b/src/main/java/org/bukkit/event/entity/EntityDamageEvent.java -index ef5b2a0f18c1c126db0b0c4a4d2a57483680665a..e6c8ffc2583af754eaedc55160ef45c61c22e213 100644 +index d1a5424ff3b289f1c82449ef6d88eb52665df41b..f23b0c250f88926c147af0314b5c4d23c5f8dbae 100644 --- a/src/main/java/org/bukkit/event/entity/EntityDamageEvent.java +++ b/src/main/java/org/bukkit/event/entity/EntityDamageEvent.java -@@ -307,7 +307,8 @@ public class EntityDamageEvent extends EntityEvent implements Cancellable { +@@ -308,7 +308,8 @@ public class EntityDamageEvent extends EntityEvent implements Cancellable { WORLD_BORDER, /** * Damage caused when an entity contacts a block such as a Cactus, @@ -1207,7 +1208,7 @@ index 8fdfcbc7d20fe0af6b220ab94516247093637621..f6a8928408e11a5ae723366e4ea1280d * When a player gets bad omen after killing a patrol captain. * diff --git a/src/main/java/org/bukkit/event/inventory/InventoryType.java b/src/main/java/org/bukkit/event/inventory/InventoryType.java -index 7184f80899206bedeac387e9f8a35482801efd4b..e4197c89c04b91732ce96981f8df0a0bdaee24ce 100644 +index 81118a91c2e22e02a1f774d1cc4d3e97064087ce..3ac1e4a821a5b48d3936222cbfddadd3b803deef 100644 --- a/src/main/java/org/bukkit/event/inventory/InventoryType.java +++ b/src/main/java/org/bukkit/event/inventory/InventoryType.java @@ -164,7 +164,7 @@ public enum InventoryType { @@ -1267,7 +1268,7 @@ index f1f97a85ec713c05c882d7588f4a3e4a017f4795..813f6cd253322538bdf96eb323dd23a7 + // Purpur end } diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java -index b59222b8c262545d100a9fd28b3bf1d2a4cf4eb0..4414381ac942c040480d53b03565b160eb85c444 100644 +index 8c9654cd19af8b28fa276a55c5060eb389e60c1c..875124b06d87cd4163f0ab1d4dd75f939622f8aa 100644 --- a/src/main/java/org/bukkit/inventory/ItemStack.java +++ b/src/main/java/org/bukkit/inventory/ItemStack.java @@ -19,6 +19,13 @@ import org.bukkit.inventory.meta.ItemMeta; @@ -1284,10 +1285,10 @@ index b59222b8c262545d100a9fd28b3bf1d2a4cf4eb0..4414381ac942c040480d53b03565b160 /** * Represents a stack of items. -@@ -1137,4 +1144,482 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat - return Bukkit.getUnsafe().computeTooltipLines(this, tooltipContext, player); +@@ -1318,4 +1325,482 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat + return this.craftDelegate.matchesWithoutData(item, excludeTypes, ignoreCount); } - // Paper end - expose itemstack tooltip lines + // Paper end - data component API + + // Purpur start + /** @@ -1768,7 +1769,7 @@ index b59222b8c262545d100a9fd28b3bf1d2a4cf4eb0..4414381ac942c040480d53b03565b160 + // Purpur end } diff --git a/src/main/java/org/bukkit/inventory/RecipeChoice.java b/src/main/java/org/bukkit/inventory/RecipeChoice.java -index f1aa67997f904953742e8895e49341c2f73d44a2..993cf7995514fb0ef3c4388bb3ce49c3187ab251 100644 +index 922bb69b5f218e489a6dd5e0f207743c1f1d3d35..9b3e292be334d21eb978373f434bf3811ec4af2b 100644 --- a/src/main/java/org/bukkit/inventory/RecipeChoice.java +++ b/src/main/java/org/bukkit/inventory/RecipeChoice.java @@ -191,6 +191,7 @@ public interface RecipeChoice extends Predicate, Cloneable { diff --git a/patches/api/0005-Remove-Timings.patch b/patches/api/0005-Remove-Timings.patch index 73c462ac8..364b3a490 100644 --- a/patches/api/0005-Remove-Timings.patch +++ b/patches/api/0005-Remove-Timings.patch @@ -7,7 +7,7 @@ Completely remove the Timings, since it wastes too much performance. Use Spark i diff --git a/src/main/java/co/aikar/timings/FullServerTickHandler.java b/src/main/java/co/aikar/timings/FullServerTickHandler.java deleted file mode 100644 -index fd9c06853a503aa787c4d93801714024465a7ee2..0000000000000000000000000000000000000000 +index d8dfaf5041ccf3f360e0bd94bf03580a8b3d9a38..0000000000000000000000000000000000000000 --- a/src/main/java/co/aikar/timings/FullServerTickHandler.java +++ /dev/null @@ -1,87 +0,0 @@ @@ -91,7 +91,7 @@ index fd9c06853a503aa787c4d93801714024465a7ee2..00000000000000000000000000000000 - TimingsManager.HISTORY.add(new TimingHistory()); - TimingsManager.resetTimings(); - } -- Bukkit.getUnsafe().reportTimings(); +- //Bukkit.getUnsafe().reportTimings(); - } - - boolean isViolated() { @@ -1278,10 +1278,10 @@ index df142a89b8c43acb81eb383eac0ef048a1f49a6e..00000000000000000000000000000000 -} diff --git a/src/main/java/co/aikar/timings/Timings.java b/src/main/java/co/aikar/timings/Timings.java deleted file mode 100644 -index e81d0bc309de877ed2b5da6122f55c162e9b5f10..0000000000000000000000000000000000000000 +index 95b7cdf0677ef71e6885fa78aa5c75bb500f5f53..0000000000000000000000000000000000000000 --- a/src/main/java/co/aikar/timings/Timings.java +++ /dev/null -@@ -1,331 +0,0 @@ +@@ -1,325 +0,0 @@ -/* - * This file is licensed under the MIT License (MIT). - * @@ -1429,14 +1429,8 @@ index e81d0bc309de877ed2b5da6122f55c162e9b5f10..00000000000000000000000000000000 - * @param enabled Should timings be reported - */ - public static void setTimingsEnabled(boolean enabled) { -- timingsEnabled = enabled; -- warnAboutDeprecationOnEnable(); -- reset(); -- } -- -- private static void warnAboutDeprecationOnEnable() { -- if (timingsEnabled && !warnedAboutDeprecationOnEnable) { -- Bukkit.getLogger().warning(PlainTextComponentSerializer.plainText().serialize(deprecationMessage())); +- if (enabled && !warnedAboutDeprecationOnEnable) { +- Bukkit.getLogger().severe(PlainTextComponentSerializer.plainText().serialize(deprecationMessage())); - warnedAboutDeprecationOnEnable = true; - } - } @@ -1444,7 +1438,7 @@ index e81d0bc309de877ed2b5da6122f55c162e9b5f10..00000000000000000000000000000000 - public static Component deprecationMessage() { - return Component.text() - .color(TextColor.color(0xffc93a)) -- .append(Component.text("[!] The timings profiler has been enabled but has been scheduled for removal from Paper in the future.")) +- .append(Component.text("[!] The timings profiler is in no-op mode and will be fully removed in a later update.")) - .append(Component.newline()) - .append(Component.text(" We recommend migrating to the spark profiler.")) - .append(Component.newline()) @@ -1615,10 +1609,10 @@ index e81d0bc309de877ed2b5da6122f55c162e9b5f10..00000000000000000000000000000000 - diff --git a/src/main/java/co/aikar/timings/TimingsCommand.java b/src/main/java/co/aikar/timings/TimingsCommand.java deleted file mode 100644 -index 95d87c9dbf2b237787294dfbe7fed87a36e6dedf..0000000000000000000000000000000000000000 +index b83e5ff7ada8771fdf27ba9807c77ba6a4ce12da..0000000000000000000000000000000000000000 --- a/src/main/java/co/aikar/timings/TimingsCommand.java +++ /dev/null -@@ -1,126 +0,0 @@ +@@ -1,127 +0,0 @@ -/* - * This file is licensed under the MIT License (MIT). - * @@ -1677,8 +1671,9 @@ index 95d87c9dbf2b237787294dfbe7fed87a36e6dedf..00000000000000000000000000000000 - if (!testPermission(sender)) { - return true; - } -- if (false) { +- if (true) { - sender.sendMessage(Timings.deprecationMessage()); +- return true; - } - if (args.length < 1) { - sender.sendMessage(text("Usage: " + this.usageMessage, NamedTextColor.RED)); @@ -2871,7 +2866,7 @@ index 45ed63797b13e114bf3795c80a6c3967d8eb2351..00000000000000000000000000000000 - } -} diff --git a/src/main/java/org/bukkit/command/Command.java b/src/main/java/org/bukkit/command/Command.java -index 0a26fffe9b1e5080b5639767a03af11006108b4a..3b73c0e59788f5f49ca2423032550f11855d52ae 100644 +index 74384a56eebbce41d431db2507c55eddbcf50a41..7d1ac11cfffbaf7d799f2a0032221fb23ee6daf5 100644 --- a/src/main/java/org/bukkit/command/Command.java +++ b/src/main/java/org/bukkit/command/Command.java @@ -33,16 +33,6 @@ public abstract class Command { @@ -2959,7 +2954,7 @@ index a09b5458191eb5df4787859b72a37fa1fa2bffba..6551a74b5c900d52f162c38c2b2ca94a server.getPluginManager().callEvent(new com.destroystokyo.paper.event.server.ServerExceptionEvent(new com.destroystokyo.paper.exception.ServerCommandException(ex, target, sender, args))); // Paper throw new CommandException(msg, ex); diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java -index e8ba4f1108f2548a487877027e37d81fc150e042..bfb3a06abc8c9b24cb217946f8f77d7027c8dbc1 100644 +index 2e6d62c4f3687e299c34e876c503b400e13be05a..c3e239f70200aa89835f2bbbc7e4c61764ce8aed 100644 --- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java +++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java @@ -61,7 +61,6 @@ public final class SimplePluginManager implements PluginManager { @@ -2984,27 +2979,26 @@ index e8ba4f1108f2548a487877027e37d81fc150e042..bfb3a06abc8c9b24cb217946f8f77d70 } @NotNull -@@ -959,17 +953,7 @@ public final class SimplePluginManager implements PluginManager { +@@ -959,8 +953,7 @@ public final class SimplePluginManager implements PluginManager { @Override public boolean useTimings() { - if (true) {return this.paperPluginManager.useTimings();} // Paper - return co.aikar.timings.Timings.isTimingsEnabled(); // Spigot -- } -- -- /** -- * Sets whether or not per event timing code should be used -- * -- * @param use True if per event timing code should be used -- */ -- public void useTimings(boolean use) { -- co.aikar.timings.Timings.setTimingsEnabled(use); // Paper + return this.paperPluginManager.useTimings(); // Paper // Leaf - Remove Timings } + /** +@@ -970,7 +963,6 @@ public final class SimplePluginManager implements PluginManager { + */ + @Deprecated(forRemoval = true) + public void useTimings(boolean use) { +- co.aikar.timings.Timings.setTimingsEnabled(use); // Paper + } + // Paper start diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java -index f7266e3991d991e7d7b38752ed472bc9cfa5f43c..b0848fe63f9c6f7f19ce5a4c11d0cbb6d3ba7eef 100644 +index 2fae50a9d1f0d9ecd91036697dedd64bc56f7d3b..2daf3d072e4441778ca566387d6a80d67e774a8b 100644 --- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java +++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java @@ -39,11 +39,9 @@ import org.bukkit.plugin.PluginDescriptionFile; @@ -3125,7 +3119,7 @@ index 12946bd55fcf7c40d39081779a7fa30049ee6165..00000000000000000000000000000000 - -} diff --git a/src/test/java/org/bukkit/AnnotationTest.java b/src/test/java/org/bukkit/AnnotationTest.java -index 494ba7e7bfe2c73d6ea3a348f023372f23a62b1c..a1118d0928340c633480c39187bc6b6be39cbbec 100644 +index 4028b230e7fe1c78520f227a377a2a61e8381ecc..0f3683841bf853752f802dd1b05a081a49681992 100644 --- a/src/test/java/org/bukkit/AnnotationTest.java +++ b/src/test/java/org/bukkit/AnnotationTest.java @@ -54,15 +54,6 @@ public class AnnotationTest { diff --git a/patches/api/0006-Bump-Dependencies.patch b/patches/api/0006-Bump-Dependencies.patch index 58b1066ea..c70ad8c62 100644 --- a/patches/api/0006-Bump-Dependencies.patch +++ b/patches/api/0006-Bump-Dependencies.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Bump Dependencies diff --git a/build.gradle.kts b/build.gradle.kts -index 1cc87374beed7b4a2cfdd278b076e20b1e9febc8..fb1e0abc769ecc2c83d2047ad6ed7b733718eb55 100644 +index 5fac022f2373105df7f9cfb292642c4a399c7db4..0758acfb5ad6793e5ffd1feb6bb321536a43b4d6 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -9,11 +9,13 @@ java { @@ -25,7 +25,7 @@ index 1cc87374beed7b4a2cfdd278b076e20b1e9febc8..fb1e0abc769ecc2c83d2047ad6ed7b73 val apiAndDocs: Configuration by configurations.creating { attributes { attribute(Category.CATEGORY_ATTRIBUTE, objects.named(Category.DOCUMENTATION)) -@@ -29,20 +31,20 @@ configurations.api { +@@ -41,20 +43,20 @@ abstract class MockitoAgentProvider : CommandLineArgumentProvider { dependencies { api("com.mojang:brigadier:1.2.9") // Paper - Brigadier command api // api dependencies are listed transitively to API consumers @@ -51,7 +51,7 @@ index 1cc87374beed7b4a2cfdd278b076e20b1e9febc8..fb1e0abc769ecc2c83d2047ad6ed7b73 apiAndDocs(platform("net.kyori:adventure-bom:$adventureVersion")) apiAndDocs("net.kyori:adventure-api") apiAndDocs("net.kyori:adventure-text-minimessage") -@@ -52,32 +54,41 @@ dependencies { +@@ -64,33 +66,42 @@ dependencies { apiAndDocs("net.kyori:adventure-text-logger-slf4j") api("org.apache.logging.log4j:log4j-api:$log4jVersion") api("org.slf4j:slf4j-api:$slf4jVersion") @@ -94,6 +94,7 @@ index 1cc87374beed7b4a2cfdd278b076e20b1e9febc8..fb1e0abc769ecc2c83d2047ad6ed7b73 + testImplementation("org.mockito:mockito-core:5.14.2") + // Leaf end - Bump Dependencies testImplementation("org.ow2.asm:asm-tree:9.7.1") + mockitoAgent("org.mockito:mockito-core:5.14.1") { isTransitive = false } // Paper - configure mockito agent that is needed in newer java versions + + // Leaf - Bump Dependencies + // commons-lang3 is removed in maven-resolver-provider since 3.9.8 @@ -102,7 +103,7 @@ index 1cc87374beed7b4a2cfdd278b076e20b1e9febc8..fb1e0abc769ecc2c83d2047ad6ed7b73 } // Paper start -@@ -165,13 +176,13 @@ tasks.withType { +@@ -182,13 +193,13 @@ tasks.withType { options.use() options.isDocFilesSubDirs = true options.links( @@ -120,7 +121,7 @@ index 1cc87374beed7b4a2cfdd278b076e20b1e9febc8..fb1e0abc769ecc2c83d2047ad6ed7b73 "https://jspecify.dev/docs/api/", // Paper end // Paper start -@@ -183,9 +194,9 @@ tasks.withType { +@@ -200,9 +211,9 @@ tasks.withType { "https://jd.advntr.dev/text-serializer-plain/$adventureVersion/", "https://jd.advntr.dev/text-logger-slf4j/$adventureVersion/", "https://javadoc.io/doc/org.slf4j/slf4j-api/$slf4jVersion/", @@ -132,7 +133,7 @@ index 1cc87374beed7b4a2cfdd278b076e20b1e9febc8..fb1e0abc769ecc2c83d2047ad6ed7b73 ) options.tags("apiNote:a:API Note:") -@@ -228,6 +239,11 @@ val scanJar = tasks.register("scanJarForBadCalls", io.papermc.paperweight.tasks. +@@ -250,6 +261,11 @@ val scanJar = tasks.register("scanJarForBadCalls", io.papermc.paperweight.tasks. jarToScan.set(tasks.jar.flatMap { it.archiveFile }) classpath.from(configurations.compileClasspath) } diff --git a/patches/api/0007-KeYi-Player-Skull-API.patch b/patches/api/0007-KeYi-Player-Skull-API.patch index 93ca44abd..23b4bb676 100644 --- a/patches/api/0007-KeYi-Player-Skull-API.patch +++ b/patches/api/0007-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 0cba31526ae7c0429885bb8802512eaad3573e42..f96ca62d81db8362a9f74f00ff54b151f96c04fe 100644 +index 347d6cbee7daba824adf798c1ec9895ae1da67ab..d5e4d34ca02567105ad92f7a1d7e3cc0f579320c 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -4000,4 +4000,23 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -4040,4 +4040,23 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM sendDeathScreen(message); } // Purpur end diff --git a/patches/api/0008-Slice-Smooth-Teleports.patch b/patches/api/0008-Slice-Smooth-Teleports.patch index eb9d2ea46..bd0c82d0b 100644 --- a/patches/api/0008-Slice-Smooth-Teleports.patch +++ b/patches/api/0008-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 f96ca62d81db8362a9f74f00ff54b151f96c04fe..f1d9f17b3ef15e2db5dabe563f7c56fa9c1be651 100644 +index d5e4d34ca02567105ad92f7a1d7e3cc0f579320c..acb8975fc2598e69c21be8d97a42a61c3944649d 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -3691,6 +3691,33 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -3731,6 +3731,33 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM String getClientBrandName(); // Paper end diff --git a/patches/api/0011-Leaves-Replay-Mod-API.patch b/patches/api/0010-Leaves-Replay-Mod-API.patch similarity index 94% rename from patches/api/0011-Leaves-Replay-Mod-API.patch rename to patches/api/0010-Leaves-Replay-Mod-API.patch index cd59fb54a..b88e31b77 100644 --- a/patches/api/0011-Leaves-Replay-Mod-API.patch +++ b/patches/api/0010-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 ebf04da015cfe394e9c5d3a3c432674df979f93c..54e5190af7f4eed4a82dd4f6b3fa9554c074dec2 100644 +index 2477a560ed345116cd9d4e90f98694b84a1faf28..17d3f7839de56821d51a3008c73e78f1bedc98ad 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java -@@ -3111,4 +3111,10 @@ public final class Bukkit { +@@ -3158,4 +3158,10 @@ public final class Bukkit { server.clearBlockHighlights(); } // Purpur end @@ -26,7 +26,7 @@ index ebf04da015cfe394e9c5d3a3c432674df979f93c..54e5190af7f4eed4a82dd4f6b3fa9554 + // Leaves end - Photographer API } diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index ab6e3eb18b9c36fdd8f56f491332085aa2ec0c37..7de6a91ef573e0a944207242518785d11381c640 100644 +index 582c1f053020dff2cde8a1a7a1a760a84e856b7c..b3f3e70382f0c1e497d71c4490ee06740d7fa27a 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java @@ -62,6 +62,7 @@ import org.jetbrains.annotations.ApiStatus; @@ -37,7 +37,7 @@ index ab6e3eb18b9c36fdd8f56f491332085aa2ec0c37..7de6a91ef573e0a944207242518785d1 /** * Represents a server implementation. -@@ -2753,4 +2754,8 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi +@@ -2806,4 +2807,8 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi */ void clearBlockHighlights(); // Purpur end diff --git a/patches/generated-api/0001-Purpur-generated-api-Changes.patch b/patches/generated-api/0001-Purpur-generated-api-Changes.patch index 66dd2f569..8693486e5 100644 --- a/patches/generated-api/0001-Purpur-generated-api-Changes.patch +++ b/patches/generated-api/0001-Purpur-generated-api-Changes.patch @@ -6,13 +6,13 @@ Subject: [PATCH] Purpur generated-api Changes Original license: MIT Original project: https://github.com/PurpurMC/Purpur -Commit: 803bf624d9e6616b879a16e6ce3c7e196468c577 +Commit: 16ce24aa7eb08232030e4570e027f7baefa5f3f9 diff --git a/com/destroystokyo/paper/entity/ai/VanillaGoal.java b/com/destroystokyo/paper/entity/ai/VanillaGoal.java -index 02411466bdcf4ff731f01ccebb2c99942e0db878..2718c0e5061838b01881bb231c53f4da348adce3 100644 +index 35dfd25f21ca67b7f4d69326500980f4a021ef49..a9816fbfa466b3fe3f82c19aeeeb564c660e4b6a 100644 --- a/com/destroystokyo/paper/entity/ai/VanillaGoal.java +++ b/com/destroystokyo/paper/entity/ai/VanillaGoal.java -@@ -436,6 +436,18 @@ public interface VanillaGoal extends Goal { +@@ -441,6 +441,18 @@ public interface VanillaGoal extends Goal { GoalKey ZOMBIE_ATTACK_TURTLE_EGG = create("zombie_attack_turtle_egg", Zombie.class); @@ -28,6 +28,6 @@ index 02411466bdcf4ff731f01ccebb2c99942e0db878..2718c0e5061838b01881bb231c53f4da + GoalKey RECEIVE_FLOWER = GoalKey.of(IronGolem.class, NamespacedKey.minecraft("receive_flower")); + // Purpur end + - private static @NonNull GoalKey create(final @NonNull String key, - final @NonNull Class type) { + private static GoalKey create(final String key, final Class type) { return GoalKey.of(type, NamespacedKey.minecraft(key)); + } diff --git a/patches/api/0010-Paper-PR-Optimise-color-distance-check-in-MapPalette.patch b/patches/removed/api/0010-Paper-PR-Optimise-color-distance-check-in-MapPalette.patch similarity index 97% rename from patches/api/0010-Paper-PR-Optimise-color-distance-check-in-MapPalette.patch rename to patches/removed/api/0010-Paper-PR-Optimise-color-distance-check-in-MapPalette.patch index 832cea85b..45186406b 100644 --- a/patches/api/0010-Paper-PR-Optimise-color-distance-check-in-MapPalette.patch +++ b/patches/removed/api/0010-Paper-PR-Optimise-color-distance-check-in-MapPalette.patch @@ -4,6 +4,8 @@ Date: Sat, 29 Jun 2024 12:04:48 +0100 Subject: [PATCH] Paper PR: Optimise color distance check in MapPalette by removing floating point math +Removed since Leaf 1.21.3, Paper 1.21.3 included it + Original license: GPLv3 Original project: https://github.com/PaperMC/Paper Paper pull request: https://github.com/PaperMC/Paper/pull/11000