diff --git a/build.gradle.kts b/build.gradle.kts index 7c9127a96..f29fa41a4 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -2,7 +2,7 @@ plugins { java `maven-publish` id("com.github.johnrengelman.shadow") version "8.1.1" apply false - id("io.papermc.paperweight.patcher") version "1.5.11-SNAPSHOT" + id("io.papermc.paperweight.patcher") version "1.5.12-SNAPSHOT" } val paperMavenPublicUrl = "https://repo.papermc.io/repository/maven-public/" diff --git a/gradle.properties b/gradle.properties index 78d21b288..5279b30bf 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,7 @@ group = org.dreeam.leaf version = 1.20.2-R0.1-SNAPSHOT -galeCommit = bb7c13fdcf3ead1b3a81ca19314085f1921c4f88 +galeCommit = 07a2ca6b82a3b809d6b89213b0648ef9067858b6 org.gradle.caching = true org.gradle.parallel = true diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 3fa8f862f..1af9e0930 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/patches/api/0002-Pufferfish-Sentry.patch b/patches/api/0002-Pufferfish-Sentry.patch index ae0c5633b..6b5849987 100644 --- a/patches/api/0002-Pufferfish-Sentry.patch +++ b/patches/api/0002-Pufferfish-Sentry.patch @@ -7,14 +7,14 @@ Original license: GPL v3 Original project: https://github.com/pufferfish-gg/Pufferfish diff --git a/build.gradle.kts b/build.gradle.kts -index 6be021dcdef8283db51baa25e74570473afb9063..11ffb490c10ccea6e1d5fefa607466c981a48154 100644 +index 6be021dcdef8283db51baa25e74570473afb9063..a743dd26f0315ac2b39e846c18155b1f2e07e8f9 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -47,6 +47,7 @@ dependencies { apiAndDocs("net.kyori:adventure-text-logger-slf4j") api("org.apache.logging.log4j:log4j-api:$log4jVersion") api("org.slf4j:slf4j-api:$slf4jVersion") -+ api("io.sentry:sentry:7.0.0-rc.2") // Pufferfish ++ api("io.sentry:sentry:7.0.0") // Pufferfish implementation("org.ow2.asm:asm:9.4") implementation("org.ow2.asm:asm-commons:9.4") diff --git a/patches/api/0003-Purpur-API-Changes.patch b/patches/api/0003-Purpur-API-Changes.patch index f638f79d0..7f8b1d706 100644 --- a/patches/api/0003-Purpur-API-Changes.patch +++ b/patches/api/0003-Purpur-API-Changes.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Purpur API Changes Original license: MIT Original project: https://github.com/PurpurMC/Purpur -Commit: 4b1a082c94ebc090bbc74b9230e4f43075090a29 +Commit: 4f12f5d3d0431cf17c2f6f80f3bdd3c834c9b8fa Patches below are removed in this patch: Pufferfish-API-Changes.patch @@ -57,7 +57,7 @@ index a736d7bcdc5861a01b66ba36158db1c716339346..22fc165fd9c95f0f3ae1be7a0857e48c @Override diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index 48808edcea2271d564390c637160881645f30489..8e6efa0dd4bc9ee4d20f6ef591f091e8e70faec0 100644 +index 9575de9c03f4db2b118f8cbf3b5f59d80e2a84f3..024372985abb5c896c44df58b47e6aafa1c9a663 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java @@ -2899,4 +2899,127 @@ public final class Bukkit { @@ -279,7 +279,7 @@ index 918a045165cdcde264bc24082b7afebb407271de..687d11619379aead7f665d4a5f8f8bcc + // Purpur end } diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java -index 8c4ba0028f5c350a2906add58d9bf3d127a16f58..8ef4fa47e6721f5154316e81c2173cc4a42f4901 100644 +index 7ca70b269e15e818e61a9329e2775789abb4bc73..aa9ca3e33903747a455ad0949387684ce4b917af 100644 --- a/src/main/java/org/bukkit/Material.java +++ b/src/main/java/org/bukkit/Material.java @@ -11054,4 +11054,40 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla @@ -443,7 +443,7 @@ index bce07d84cafca677bb6fad78c21b82097f06430c..4ef0fa4f1ef72bb784674671473c6a32 + // Purpur end - OfflinePlayer API } diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index 74317f10d7f7b31eac50b4fcff5b3cc96c12bce1..6282d9fe1bdf0add7bbd2eaa8916d345fe923a8b 100644 +index fe897734148e4505bdcf99d6291f5c7411400e6a..3d11ac5b66dc9799f1a04d2151ca9d9a7eaeff13 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java @@ -2243,6 +2243,18 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi @@ -578,10 +578,10 @@ index 74317f10d7f7b31eac50b4fcff5b3cc96c12bce1..6282d9fe1bdf0add7bbd2eaa8916d345 + // Purpur end } diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index 5eb3521f5f91b0684b4beebf4f7ba2c795b41c42..cf63054e1b597b2bb13164722dd9a829ba7069ba 100644 +index 567a36a4887da8994c9170e2885aa8cc357efa0c..405d60bd2c99ba741d2614b16f4bda5da48a0387 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java -@@ -4160,6 +4160,86 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient +@@ -4235,6 +4235,86 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient @Nullable public DragonBattle getEnderDragonBattle(); @@ -817,10 +817,10 @@ index 138d2530de2410f4a9424dabd3e5ce0cd1c1dcd2..10a8d64ad2da0be2c14f34c3e7d1957c // Paper start /** diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java -index d340ddcf6924cc834455de3acbbac91ab9c66e39..ee3ca27a5406024ed71cce14b0891266b64e6fdf 100644 +index 9e3cb75536ae260dc898ab9dafbc1d98398782bc..752690574e1d3f47a3cf80fe5da2ba4107386ffd 100644 --- a/src/main/java/org/bukkit/entity/Entity.java +++ b/src/main/java/org/bukkit/entity/Entity.java -@@ -1065,4 +1065,42 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent +@@ -1063,4 +1063,42 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent */ @NotNull String getScoreboardEntryName(); // Paper end - entity scoreboard name @@ -1027,10 +1027,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 d7bbc3d4fbb049b8656b4f0970ced8b955cf56bd..69357a7e78ce8813eac0babdd869edf6804f5c50 100644 +index a47be0fb0220e46cc360729fdf6cc113cdd05a39..91356220da06d290006c7c06244e96a7e88d9740 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -3319,4 +3319,123 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -3378,4 +3378,123 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @Override Spigot spigot(); // Spigot end @@ -1318,7 +1318,7 @@ index 0217f98a74140bbae454d467de27c12b6060ca75..444b021691ea90ee3c87f4e47d4e8c48 + // Purpur end } diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java -index 0af73cc04edb93b9772136d4d808f657ea40e733..085d98b30afa51e7665cb01bdd80b21f82771b95 100644 +index 36e3fbc727cd748aa138f52976154ba32954cd87..623bebf9964cff02728bf4270f082b6a89ff1572 100644 --- a/src/main/java/org/bukkit/inventory/ItemStack.java +++ b/src/main/java/org/bukkit/inventory/ItemStack.java @@ -17,6 +17,18 @@ import org.bukkit.inventory.meta.ItemMeta; diff --git a/patches/api/0005-Bump-Dependencies.patch b/patches/api/0005-Bump-Dependencies.patch index 84f24e071..0bc67d5ab 100644 --- a/patches/api/0005-Bump-Dependencies.patch +++ b/patches/api/0005-Bump-Dependencies.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Bump Dependencies diff --git a/build.gradle.kts b/build.gradle.kts -index 11ffb490c10ccea6e1d5fefa607466c981a48154..b459a90ee4fe84566bc862a61dfbb6a5b9aaedc0 100644 +index a743dd26f0315ac2b39e846c18155b1f2e07e8f9..008ede9826d436cbc96dab9ae13b56e3df35a335 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -9,11 +9,11 @@ java { @@ -43,7 +43,7 @@ index 11ffb490c10ccea6e1d5fefa607466c981a48154..b459a90ee4fe84566bc862a61dfbb6a5 apiAndDocs("net.kyori:adventure-text-minimessage") @@ -49,30 +49,32 @@ dependencies { api("org.slf4j:slf4j-api:$slf4jVersion") - api("io.sentry:sentry:7.0.0-rc.2") // Pufferfish + api("io.sentry:sentry:7.0.0") // Pufferfish - implementation("org.ow2.asm:asm:9.4") - implementation("org.ow2.asm:asm-commons:9.4") @@ -56,9 +56,9 @@ index 11ffb490c10ccea6e1d5fefa607466c981a48154..b459a90ee4fe84566bc862a61dfbb6a5 - compileOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.7.3") - compileOnly("org.apache.maven.resolver:maven-resolver-transport-http:1.7.3") - compileOnly("com.google.code.findbugs:jsr305:1.3.9") // Paper -+ api("org.apache.maven:maven-resolver-provider:3.9.5") -+ compileOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.9.17") -+ compileOnly("org.apache.maven.resolver:maven-resolver-transport-http:1.9.17") ++ api("org.apache.maven:maven-resolver-provider:3.9.6") ++ compileOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.9.18") ++ compileOnly("org.apache.maven.resolver:maven-resolver-transport-http:1.9.18") + compileOnly("com.google.code.findbugs:jsr305:3.0.2") // Paper val annotations = "org.jetbrains:annotations:$annotationsVersion" // Paper - we don't want Java 5 annotations... @@ -67,7 +67,7 @@ index 11ffb490c10ccea6e1d5fefa607466c981a48154..b459a90ee4fe84566bc862a61dfbb6a5 // Paper start - add checker - val checkerQual = "org.checkerframework:checker-qual:3.21.0" -+ val checkerQual = "org.checkerframework:checker-qual:3.40.0" // Leaf - Bump Dependencies ++ val checkerQual = "org.checkerframework:checker-qual:3.41.0" // Leaf - Bump Dependencies compileOnlyApi(checkerQual) testCompileOnly(checkerQual) // Paper end @@ -79,7 +79,7 @@ index 11ffb490c10ccea6e1d5fefa607466c981a48154..b459a90ee4fe84566bc862a61dfbb6a5 testImplementation("org.hamcrest:hamcrest:2.2") - testImplementation("org.mockito:mockito-core:5.5.0") - testImplementation("org.ow2.asm:asm-tree:9.5") -+ testImplementation("org.mockito:mockito-core:5.7.0") ++ testImplementation("org.mockito:mockito-core:5.8.0") + testImplementation("org.ow2.asm:asm-tree:9.6") + // Leaf end } @@ -99,7 +99,7 @@ index 11ffb490c10ccea6e1d5fefa607466c981a48154..b459a90ee4fe84566bc862a61dfbb6a5 "https://javadoc.io/doc/org.apache.logging.log4j/log4j-api/$log4jVersion/", // Paper end - "https://javadoc.io/doc/org.apache.maven.resolver/maven-resolver-api/1.7.3", // Paper -+ "https://javadoc.io/doc/org.apache.maven.resolver/maven-resolver-api/1.9.17", // Paper // Leaf - Bump Dependencies ++ "https://javadoc.io/doc/org.apache.maven.resolver/maven-resolver-api/1.9.18", // Paper // Leaf - Bump Dependencies ) options.tags("apiNote:a:API Note:") diff --git a/patches/api/0007-KeYi-Player-Skull-API.patch b/patches/api/0007-KeYi-Player-Skull-API.patch index 0a2ae6a63..9db7abe43 100644 --- a/patches/api/0007-KeYi-Player-Skull-API.patch +++ b/patches/api/0007-KeYi-Player-Skull-API.patch @@ -7,7 +7,7 @@ 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 69357a7e78ce8813eac0babdd869edf6804f5c50..f25043d5fa29c8c6b540bc5ab59efcb070820892 100644 +index 91356220da06d290006c7c06244e96a7e88d9740..2eb611a28b4567f40aec9e864eb0dac62096f7d4 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java @@ -8,8 +8,11 @@ import java.util.Collection; @@ -23,7 +23,7 @@ index 69357a7e78ce8813eac0babdd869edf6804f5c50..f25043d5fa29c8c6b540bc5ab59efcb0 import org.bukkit.DyeColor; import org.bukkit.Effect; import org.bukkit.GameMode; -@@ -3438,4 +3441,22 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -3497,4 +3500,22 @@ 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 ba69b1e65..470245655 100644 --- a/patches/api/0008-Slice-Smooth-Teleports.patch +++ b/patches/api/0008-Slice-Smooth-Teleports.patch @@ -7,10 +7,10 @@ Original license: MIT Original project: https://github.com/Cryptite/Slice diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index f25043d5fa29c8c6b540bc5ab59efcb070820892..54ff90d22cbaf44e9f6db2a6466934ef9f2ffbf3 100644 +index 2eb611a28b4567f40aec9e864eb0dac62096f7d4..10350641e7d1cd066e1b7bd8be099b387df3ca58 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -3181,6 +3181,19 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -3244,6 +3244,19 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM String getClientBrandName(); // Paper end diff --git a/patches/server/0009-Purpur-Server-Changes.patch b/patches/server/0009-Purpur-Server-Changes.patch index 35153b4ec..976ff7236 100644 --- a/patches/server/0009-Purpur-Server-Changes.patch +++ b/patches/server/0009-Purpur-Server-Changes.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Purpur Server Changes Original license: MIT Original project: https://github.com/PurpurMC/Purpur -Commit: 4b1a082c94ebc090bbc74b9230e4f43075090a29 +Commit: 4f12f5d3d0431cf17c2f6f80f3bdd3c834c9b8fa Patches below are removed in this patch: Metrics change in Purpur-config-files.patch @@ -27,7 +27,7 @@ Remove-Mojang-Profiler.patch MC-121706-Fix-mobs-not-looking-up-and-down-when-stra.patch diff --git a/build.gradle.kts b/build.gradle.kts -index b386250d71d47ab5591a9b89ff39b4369ec4e0a3..ab5aee09874e2258d05b22ca1be3c273cb1afb34 100644 +index 2ad52f8ef126982ac2d3f17ff7af210dcb7f1d79..6e60342d9d394ccd595bde42c84b753ed9c0f7ec 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -64,6 +64,10 @@ dependencies { @@ -1311,7 +1311,7 @@ index 643c889c4099fde0f64ed1fc72770de55adf9033..4f353e049252827a4e751817984746df } // Paper end diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 5e822c2292dfa1882edc0250e592f5371480ae15..c7caf3166990d2165b4ca8206706a71f10141db1 100644 +index f02ebd0d95433b44ce8f85f4374669d66a9a9660..1b760a544616c9950f65071736cf34abcb10d7a1 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java @@ -275,6 +275,10 @@ public class ServerPlayer extends Player { @@ -1361,7 +1361,7 @@ index 5e822c2292dfa1882edc0250e592f5371480ae15..c7caf3166990d2165b4ca8206706a71f } public void doTick() { -@@ -994,6 +1013,7 @@ public class ServerPlayer extends Player { +@@ -992,6 +1011,7 @@ public class ServerPlayer extends Player { })); Team scoreboardteambase = this.getTeam(); @@ -1369,7 +1369,7 @@ index 5e822c2292dfa1882edc0250e592f5371480ae15..c7caf3166990d2165b4ca8206706a71f if (scoreboardteambase != null && scoreboardteambase.getDeathMessageVisibility() != Team.Visibility.ALWAYS) { if (scoreboardteambase.getDeathMessageVisibility() == Team.Visibility.HIDE_FOR_OTHER_TEAMS) { this.server.getPlayerList().broadcastSystemToTeam(this, ichatbasecomponent); -@@ -1100,6 +1120,16 @@ public class ServerPlayer extends Player { +@@ -1098,6 +1118,16 @@ public class ServerPlayer extends Player { if (this.isInvulnerableTo(source)) { return false; } else { @@ -1386,7 +1386,7 @@ index 5e822c2292dfa1882edc0250e592f5371480ae15..c7caf3166990d2165b4ca8206706a71f boolean flag = this.server.isDedicatedServer() && this.isPvpAllowed() && source.is(DamageTypeTags.IS_FALL); if (!flag && this.spawnInvulnerableTime > 0 && !source.is(DamageTypeTags.BYPASSES_INVULNERABILITY)) { -@@ -1243,6 +1273,7 @@ public class ServerPlayer extends Player { +@@ -1241,6 +1271,7 @@ public class ServerPlayer extends Player { playerlist.sendPlayerPermissionLevel(this); worldserver1.removePlayerImmediately(this, Entity.RemovalReason.CHANGED_DIMENSION); this.unsetRemoved(); @@ -1394,7 +1394,7 @@ index 5e822c2292dfa1882edc0250e592f5371480ae15..c7caf3166990d2165b4ca8206706a71f // CraftBukkit end this.setServerLevel(worldserver); -@@ -1398,7 +1429,7 @@ public class ServerPlayer extends Player { +@@ -1396,7 +1427,7 @@ public class ServerPlayer extends Player { return entitymonster.isPreventingPlayerRest(this); }); @@ -1403,7 +1403,7 @@ index 5e822c2292dfa1882edc0250e592f5371480ae15..c7caf3166990d2165b4ca8206706a71f return Either.left(Player.BedSleepingProblem.NOT_SAFE); } } -@@ -1438,7 +1469,19 @@ public class ServerPlayer extends Player { +@@ -1436,7 +1467,19 @@ public class ServerPlayer extends Player { }); if (!this.serverLevel().canSleepThroughNights()) { @@ -1424,7 +1424,7 @@ index 5e822c2292dfa1882edc0250e592f5371480ae15..c7caf3166990d2165b4ca8206706a71f } ((ServerLevel) this.level()).updateSleepingPlayerList(); -@@ -1535,6 +1578,7 @@ public class ServerPlayer extends Player { +@@ -1533,6 +1576,7 @@ public class ServerPlayer extends Player { @Override public void openTextEdit(SignBlockEntity sign, boolean front) { @@ -1432,7 +1432,7 @@ index 5e822c2292dfa1882edc0250e592f5371480ae15..c7caf3166990d2165b4ca8206706a71f this.connection.send(new ClientboundBlockUpdatePacket(this.level(), sign.getBlockPos())); this.connection.send(new ClientboundOpenSignEditorPacket(sign.getBlockPos(), front)); } -@@ -1780,6 +1824,26 @@ public class ServerPlayer extends Player { +@@ -1778,6 +1822,26 @@ public class ServerPlayer extends Player { this.lastSentExp = -1; // CraftBukkit - Added to reset } @@ -1459,7 +1459,7 @@ index 5e822c2292dfa1882edc0250e592f5371480ae15..c7caf3166990d2165b4ca8206706a71f @Override public void displayClientMessage(Component message, boolean overlay) { this.sendSystemMessage(message, overlay); -@@ -2107,8 +2171,68 @@ public class ServerPlayer extends Player { +@@ -2105,8 +2169,68 @@ public class ServerPlayer extends Player { public void resetLastActionTime() { this.lastActionTime = Util.getMillis(); @@ -1528,7 +1528,7 @@ index 5e822c2292dfa1882edc0250e592f5371480ae15..c7caf3166990d2165b4ca8206706a71f public ServerStatsCounter getStats() { return this.stats; } -@@ -2659,4 +2783,50 @@ public class ServerPlayer extends Player { +@@ -2657,4 +2781,50 @@ public class ServerPlayer extends Player { return (CraftPlayer) super.getBukkitEntity(); } // CraftBukkit end @@ -1580,10 +1580,10 @@ index 5e822c2292dfa1882edc0250e592f5371480ae15..c7caf3166990d2165b4ca8206706a71f + // Purpur end } diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java -index 58e3ac1e155fcd352efcc90401e4e13ae4c6a2ca..8ebc4d373b600cac4235d6b3e4176fc15393d90f 100644 +index 091d292b04649977961f32dff949a432cb44106e..165b014e9b12f8f091f73c1696ad39fa10e460c1 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java -@@ -398,6 +398,7 @@ public class ServerPlayerGameMode { +@@ -397,6 +397,7 @@ public class ServerPlayerGameMode { } else {capturedBlockEntity = true;} // Paper end return false; } @@ -1591,7 +1591,7 @@ index 58e3ac1e155fcd352efcc90401e4e13ae4c6a2ca..8ebc4d373b600cac4235d6b3e4176fc1 } // CraftBukkit end -@@ -428,7 +429,7 @@ public class ServerPlayerGameMode { +@@ -427,7 +428,7 @@ public class ServerPlayerGameMode { ItemStack mainHandStack = null; // Paper boolean isCorrectTool = false; // Paper @@ -1600,7 +1600,7 @@ index 58e3ac1e155fcd352efcc90401e4e13ae4c6a2ca..8ebc4d373b600cac4235d6b3e4176fc1 // return true; // CraftBukkit } else { ItemStack itemstack = this.player.getMainHandItem(); -@@ -517,6 +518,7 @@ public class ServerPlayerGameMode { +@@ -516,6 +517,7 @@ public class ServerPlayerGameMode { public InteractionHand interactHand; public ItemStack interactItemStack; public InteractionResult useItemOn(ServerPlayer player, Level world, ItemStack stack, InteractionHand hand, BlockHitResult hitResult) { @@ -1608,7 +1608,7 @@ index 58e3ac1e155fcd352efcc90401e4e13ae4c6a2ca..8ebc4d373b600cac4235d6b3e4176fc1 BlockPos blockposition = hitResult.getBlockPos(); BlockState iblockdata = world.getBlockState(blockposition); InteractionResult enuminteractionresult = InteractionResult.PASS; -@@ -578,7 +580,7 @@ public class ServerPlayerGameMode { +@@ -579,7 +581,7 @@ public class ServerPlayerGameMode { boolean flag1 = player.isSecondaryUseActive() && flag; ItemStack itemstack1 = stack.copy(); @@ -1617,7 +1617,7 @@ index 58e3ac1e155fcd352efcc90401e4e13ae4c6a2ca..8ebc4d373b600cac4235d6b3e4176fc1 enuminteractionresult = iblockdata.use(world, player, hand, hitResult); if (enuminteractionresult.consumesAction()) { -@@ -619,4 +621,18 @@ public class ServerPlayerGameMode { +@@ -620,4 +622,18 @@ public class ServerPlayerGameMode { public void setLevel(ServerLevel world) { this.level = world; } @@ -2376,7 +2376,7 @@ index 1f9e0c139988c4c44a26552881647d36965aa4fa..b8d612d22aca74a08b53393c0723a2ae @Override diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 1e0e7fa54d058bf9faa4d1652a4cf6f5f6549254..67902da3d03cb794760db49b50408737f9c5f1c3 100644 +index 3aad8e715aae1e0a8beeb44390fd31dc50f8ea3a..dda34ad1f05302d0706710dc20766c4059229c83 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -156,7 +156,7 @@ import org.bukkit.plugin.PluginManager; @@ -2463,7 +2463,7 @@ index 1e0e7fa54d058bf9faa4d1652a4cf6f5f6549254..67902da3d03cb794760db49b50408737 Entity entity = this.getVehicle(); if (entity instanceof Boat) { -@@ -2978,6 +2998,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -3004,6 +3024,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { this.passengers = ImmutableList.copyOf(list); } @@ -2477,7 +2477,7 @@ index 1e0e7fa54d058bf9faa4d1652a4cf6f5f6549254..67902da3d03cb794760db49b50408737 this.gameEvent(GameEvent.ENTITY_MOUNT, passenger); } } -@@ -3018,6 +3045,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -3044,6 +3071,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { return false; } // Spigot end @@ -2492,7 +2492,7 @@ index 1e0e7fa54d058bf9faa4d1652a4cf6f5f6549254..67902da3d03cb794760db49b50408737 if (this.passengers.size() == 1 && this.passengers.get(0) == entity) { this.passengers = ImmutableList.of(); } else { -@@ -3097,12 +3132,15 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -3123,12 +3158,15 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { return Vec3.directionFromRotation(this.getRotationVector()); } @@ -2509,7 +2509,7 @@ index 1e0e7fa54d058bf9faa4d1652a4cf6f5f6549254..67902da3d03cb794760db49b50408737 } this.isInsidePortal = true; -@@ -3151,7 +3189,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -3177,7 +3215,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { } this.processPortalCooldown(); @@ -2518,7 +2518,7 @@ index 1e0e7fa54d058bf9faa4d1652a4cf6f5f6549254..67902da3d03cb794760db49b50408737 } } -@@ -3341,7 +3379,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -3367,7 +3405,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { } public int getMaxAirSupply() { @@ -2527,7 +2527,7 @@ index 1e0e7fa54d058bf9faa4d1652a4cf6f5f6549254..67902da3d03cb794760db49b50408737 } public int getAirSupply() { -@@ -3805,7 +3843,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -3831,7 +3869,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { } public boolean canChangeDimensions() { @@ -2536,7 +2536,7 @@ index 1e0e7fa54d058bf9faa4d1652a4cf6f5f6549254..67902da3d03cb794760db49b50408737 } public float getBlockExplosionResistance(Explosion explosion, BlockGetter world, BlockPos pos, BlockState blockState, FluidState fluidState, float max) { -@@ -4103,6 +4141,20 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -4129,6 +4167,20 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { return SlotAccess.NULL; } @@ -2557,7 +2557,7 @@ index 1e0e7fa54d058bf9faa4d1652a4cf6f5f6549254..67902da3d03cb794760db49b50408737 @Override public void sendSystemMessage(Component message) {} -@@ -4372,6 +4424,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -4398,6 +4450,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { this.yRotO = this.getYRot(); } @@ -2570,7 +2570,7 @@ index 1e0e7fa54d058bf9faa4d1652a4cf6f5f6549254..67902da3d03cb794760db49b50408737 public boolean updateFluidHeightAndDoFluidPushing(TagKey tag, double speed) { if (false && this.touchingUnloadedChunk()) { // Gale - Airplane - reduce entity fluid lookups if no fluids - cost of a lookup here is the same cost as below, so skip return false; -@@ -4947,4 +5005,45 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -4973,4 +5031,45 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { return ((net.minecraft.server.level.ServerChunkCache) level.getChunkSource()).isPositionTicking(this); } // Paper end @@ -2773,7 +2773,7 @@ index 1bb8b6e91c44cd13411d96d749fa64835c75a267..b18cbe85330e26de6f6cbfcc3d51a741 protected ParticleOptions getInkParticle() { return ParticleTypes.GLOW_SQUID_INK; diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index a6e9cccff99496cdbf08e8bf093fcdf7a98e721c..23197384963b7f67e096eff18bf1809d36611923 100644 +index c522c49e67b2eb92d38d2c76a31b562f653920be..d811a2456b7c2b8c4766f4b7943eeb438e88e3fd 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -218,9 +218,9 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -2795,7 +2795,7 @@ index a6e9cccff99496cdbf08e8bf093fcdf7a98e721c..23197384963b7f67e096eff18bf1809d public int expToDrop; + public float safeFallDistance = 3.0F; // Purpur public boolean forceDrops; - public ArrayList drops = new ArrayList(); + public ArrayList drops = new ArrayList<>(); // Paper public final org.bukkit.craftbukkit.attribute.CraftAttributeMap craftAttributes; @@ -262,6 +263,7 @@ public abstract class LivingEntity extends Entity implements Attackable { public org.bukkit.craftbukkit.entity.CraftLivingEntity getBukkitLivingEntity() { return (org.bukkit.craftbukkit.entity.CraftLivingEntity) super.getBukkitEntity(); } // Paper @@ -2938,7 +2938,7 @@ index a6e9cccff99496cdbf08e8bf093fcdf7a98e721c..23197384963b7f67e096eff18bf1809d EntityPotionEffectEvent event = CraftEventFactory.callEntityPotionEffectChangeEvent(this, effect, null, cause, EntityPotionEffectEvent.Action.CLEARED); if (event.isCancelled()) { continue; -@@ -1497,13 +1532,13 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -1505,13 +1540,13 @@ public abstract class LivingEntity extends Entity implements Attackable { if (entity1 instanceof net.minecraft.world.entity.player.Player) { net.minecraft.world.entity.player.Player entityhuman = (net.minecraft.world.entity.player.Player) entity1; @@ -2954,7 +2954,7 @@ index a6e9cccff99496cdbf08e8bf093fcdf7a98e721c..23197384963b7f67e096eff18bf1809d LivingEntity entityliving2 = entitywolf.getOwner(); if (entityliving2 instanceof net.minecraft.world.entity.player.Player) { -@@ -1611,6 +1646,18 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -1619,6 +1654,18 @@ public abstract class LivingEntity extends Entity implements Attackable { } } @@ -2973,7 +2973,7 @@ index a6e9cccff99496cdbf08e8bf093fcdf7a98e721c..23197384963b7f67e096eff18bf1809d org.bukkit.inventory.EquipmentSlot handSlot = (hand != null) ? org.bukkit.craftbukkit.CraftEquipmentSlot.getHand(hand) : null; EntityResurrectEvent event = new EntityResurrectEvent((org.bukkit.entity.LivingEntity) this.getBukkitEntity(), handSlot); event.setCancelled(itemstack == null); -@@ -1778,7 +1825,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -1786,7 +1833,7 @@ public abstract class LivingEntity extends Entity implements Attackable { boolean flag = false; if (this.dead && adversary instanceof WitherBoss) { // Paper @@ -2982,7 +2982,7 @@ index a6e9cccff99496cdbf08e8bf093fcdf7a98e721c..23197384963b7f67e096eff18bf1809d BlockPos blockposition = this.blockPosition(); BlockState iblockdata = Blocks.WITHER_ROSE.defaultBlockState(); -@@ -1824,6 +1871,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -1832,6 +1879,7 @@ public abstract class LivingEntity extends Entity implements Attackable { this.dropEquipment(); // CraftBukkit - from below if (this.shouldDropLoot() && this.level().getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) { @@ -2990,7 +2990,7 @@ index a6e9cccff99496cdbf08e8bf093fcdf7a98e721c..23197384963b7f67e096eff18bf1809d this.dropFromLootTable(source, flag); // Paper start final boolean prev = this.clearEquipmentSlots; -@@ -1832,6 +1880,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -1840,6 +1888,7 @@ public abstract class LivingEntity extends Entity implements Attackable { // Paper end this.dropCustomDeathLoot(source, i, flag); this.clearEquipmentSlots = prev; // Paper @@ -2998,7 +2998,7 @@ index a6e9cccff99496cdbf08e8bf093fcdf7a98e721c..23197384963b7f67e096eff18bf1809d } // CraftBukkit start - Call death event // Paper start - call advancement triggers with correct entity equipment org.bukkit.event.entity.EntityDeathEvent deathEvent = CraftEventFactory.callEntityDeathEvent(this, this.drops, () -> { -@@ -2103,7 +2152,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -2111,7 +2160,7 @@ public abstract class LivingEntity extends Entity implements Attackable { MobEffectInstance mobeffect = this.getEffect(MobEffects.JUMP); float f2 = mobeffect == null ? 0.0F : (float) (mobeffect.getAmplifier() + 1); @@ -3007,7 +3007,7 @@ index a6e9cccff99496cdbf08e8bf093fcdf7a98e721c..23197384963b7f67e096eff18bf1809d } } -@@ -2326,6 +2375,20 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -2334,6 +2383,20 @@ public abstract class LivingEntity extends Entity implements Attackable { } } @@ -3028,7 +3028,7 @@ index a6e9cccff99496cdbf08e8bf093fcdf7a98e721c..23197384963b7f67e096eff18bf1809d if (f > 0 || !human) { if (human) { // PAIL: Be sure to drag all this code from the EntityHuman subclass each update. -@@ -2546,7 +2609,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -2554,7 +2617,7 @@ public abstract class LivingEntity extends Entity implements Attackable { @Override protected void onBelowWorld() { @@ -3037,7 +3037,7 @@ index a6e9cccff99496cdbf08e8bf093fcdf7a98e721c..23197384963b7f67e096eff18bf1809d } protected void updateSwingTime() { -@@ -2740,7 +2803,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -2748,7 +2811,7 @@ public abstract class LivingEntity extends Entity implements Attackable { } protected long lastJumpTime = 0L; // Paper @@ -3046,7 +3046,7 @@ index a6e9cccff99496cdbf08e8bf093fcdf7a98e721c..23197384963b7f67e096eff18bf1809d Vec3 vec3d = this.getDeltaMovement(); // Paper start long time = System.nanoTime(); -@@ -2892,6 +2955,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -2900,6 +2963,7 @@ public abstract class LivingEntity extends Entity implements Attackable { if (f3 > 0.0F) { this.playSound(this.getFallDamageSound((int) f3), 1.0F, 1.0F); @@ -3054,7 +3054,7 @@ index a6e9cccff99496cdbf08e8bf093fcdf7a98e721c..23197384963b7f67e096eff18bf1809d this.hurt(this.damageSources().flyIntoWall(), f3); } } -@@ -3497,8 +3561,10 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3505,8 +3569,10 @@ public abstract class LivingEntity extends Entity implements Attackable { this.pushEntities(); // Paper start @@ -3067,7 +3067,7 @@ index a6e9cccff99496cdbf08e8bf093fcdf7a98e721c..23197384963b7f67e096eff18bf1809d Location from = new Location(this.level().getWorld(), this.xo, this.yo, this.zo, this.yRotO, this.xRotO); Location to = new Location (this.level().getWorld(), this.getX(), this.getY(), this.getZ(), this.getYRot(), this.getXRot()); io.papermc.paper.event.entity.EntityMoveEvent event = new io.papermc.paper.event.entity.EntityMoveEvent(this.getBukkitLivingEntity(), from, to.clone()); -@@ -3508,12 +3574,48 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3516,12 +3582,48 @@ public abstract class LivingEntity extends Entity implements Attackable { this.absMoveTo(event.getTo().getX(), event.getTo().getY(), event.getTo().getZ(), event.getTo().getYaw(), event.getTo().getPitch()); } } @@ -3116,7 +3116,7 @@ index a6e9cccff99496cdbf08e8bf093fcdf7a98e721c..23197384963b7f67e096eff18bf1809d } public boolean isSensitiveToWater() { -@@ -3534,7 +3636,16 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3542,7 +3644,16 @@ public abstract class LivingEntity extends Entity implements Attackable { int j = i / 10; if (j % 2 == 0) { @@ -5222,7 +5222,7 @@ index f383928fc5b331ddf128bdcb6a23010d8fe088d3..64aba511e615983988cdb6a0fd45b7d9 } } diff --git a/src/main/java/net/minecraft/world/entity/animal/MushroomCow.java b/src/main/java/net/minecraft/world/entity/animal/MushroomCow.java -index 652c8b5b579a06ab7e66df78bbf323cd9188208c..76cf6c2eaae736d4e524bc3aff9502b81aaef639 100644 +index d3982fc50ab87f64893ae5838d0256576912d311..9d949fe12d1100e03cf2454cc7b820971b6e00b5 100644 --- a/src/main/java/net/minecraft/world/entity/animal/MushroomCow.java +++ b/src/main/java/net/minecraft/world/entity/animal/MushroomCow.java @@ -63,6 +63,43 @@ public class MushroomCow extends Cow implements Shearable, VariantHolder 0; } @@ -14346,7 +14346,7 @@ index 1d292f4bae3eadfde0637cf0a8b49ff53eb21ac9..70ec2c6f73dd6aaf7623e47333277425 public int getDamageValue() { return this.tag == null ? 0 : this.tag.getInt("Damage"); } -@@ -608,7 +620,7 @@ public final class ItemStack { +@@ -610,7 +622,7 @@ public final class ItemStack { int j; if (amount > 0) { @@ -14355,7 +14355,7 @@ index 1d292f4bae3eadfde0637cf0a8b49ff53eb21ac9..70ec2c6f73dd6aaf7623e47333277425 int k = 0; for (int l = 0; j > 0 && l < amount; ++l) { -@@ -663,6 +675,12 @@ public final class ItemStack { +@@ -665,6 +677,12 @@ public final class ItemStack { if (this.hurt(amount, entity.getRandom(), entity /*instanceof ServerPlayer ? (ServerPlayer) entity : null*/)) { // Paper - pass LivingEntity for EntityItemDamageEvent breakCallback.accept(entity); Item item = this.getItem(); @@ -14368,7 +14368,7 @@ index 1d292f4bae3eadfde0637cf0a8b49ff53eb21ac9..70ec2c6f73dd6aaf7623e47333277425 // CraftBukkit start - Check for item breaking if (this.count == 1 && entity instanceof net.minecraft.world.entity.player.Player) { org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerItemBreakEvent((net.minecraft.world.entity.player.Player) entity, this); -@@ -1189,7 +1207,7 @@ public final class ItemStack { +@@ -1191,7 +1209,7 @@ public final class ItemStack { ListTag nbttaglist = this.tag.getList("Enchantments", 10); @@ -14377,7 +14377,7 @@ index 1d292f4bae3eadfde0637cf0a8b49ff53eb21ac9..70ec2c6f73dd6aaf7623e47333277425 processEnchantOrder(this.tag); // Paper } -@@ -1197,6 +1215,12 @@ public final class ItemStack { +@@ -1199,6 +1217,12 @@ public final class ItemStack { return this.tag != null && this.tag.contains("Enchantments", 9) ? !this.tag.getList("Enchantments", 10).isEmpty() : false; } @@ -14770,7 +14770,7 @@ index 4f7457578ab3118d10e0d5dfc23d79c9b20c2f44..e03ce53b93d1b9366f2a7f14f341750a public ItemStack assemble() { diff --git a/src/main/java/net/minecraft/world/level/BaseSpawner.java b/src/main/java/net/minecraft/world/level/BaseSpawner.java -index 1279132e2fb3e8f64f062df0ac8b8197f9d8f343..fb933cc388acf26cebe1da692b9c5dd165f797ee 100644 +index 6eca4a9b3cf462a4d18f32619bbcdfda0fa2ebc5..914564a528c360f352927e7681ab2e31ed365b21 100644 --- a/src/main/java/net/minecraft/world/level/BaseSpawner.java +++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java @@ -71,6 +71,7 @@ public abstract class BaseSpawner { @@ -15693,10 +15693,10 @@ index 7385e91f32f070e86a4e0fd3d214f55d832c7979..7b73de87236a60ce7343c29ec147e186 }, CONTAINER_TITLE)); player.awardStat(Stats.OPEN_ENDERCHEST); diff --git a/src/main/java/net/minecraft/world/level/block/FarmBlock.java b/src/main/java/net/minecraft/world/level/block/FarmBlock.java -index 5946f06f63b5694034bd027984a4925b0831d439..d566f67f8f6f1748023430de4f191881b79e44a1 100644 +index 502dcba14da9d3dcefc61fdc349a4e1e1d94b478..856099241737c43b8213ccc203ef6bb7b7667b1f 100644 --- a/src/main/java/net/minecraft/world/level/block/FarmBlock.java +++ b/src/main/java/net/minecraft/world/level/block/FarmBlock.java -@@ -101,7 +101,7 @@ public class FarmBlock extends Block { +@@ -103,7 +103,7 @@ public class FarmBlock extends Block { @Override public void fallOn(Level world, BlockState state, BlockPos pos, Entity entity, float fallDistance) { super.fallOn(world, state, pos, entity, fallDistance); // CraftBukkit - moved here as game rules / events shouldn't affect fall damage. @@ -15705,7 +15705,7 @@ index 5946f06f63b5694034bd027984a4925b0831d439..d566f67f8f6f1748023430de4f191881 // CraftBukkit start - Interact soil org.bukkit.event.Cancellable cancellable; if (entity instanceof Player) { -@@ -115,6 +115,22 @@ public class FarmBlock extends Block { +@@ -117,6 +117,22 @@ public class FarmBlock extends Block { return; } @@ -15728,7 +15728,7 @@ index 5946f06f63b5694034bd027984a4925b0831d439..d566f67f8f6f1748023430de4f191881 if (!CraftEventFactory.callEntityChangeBlockEvent(entity, pos, Blocks.DIRT.defaultBlockState())) { return; } -@@ -162,7 +178,7 @@ public class FarmBlock extends Block { +@@ -164,7 +180,7 @@ public class FarmBlock extends Block { } } @@ -17412,7 +17412,7 @@ index 2bbc39c257965ad91ee360cdfcd3538a0f041c7e..d0e3b531392738679894a989293ae49e + // Purpur end - OfflinePlayer API } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index dce9eb210fe92f44745a316d1969251554673af2..5cbfa4ecb4c76cfda4fa42bfa6fdcec75ec1fe27 100644 +index 135fd0f6843659b55cc4f5e1482b0544adf6acae..8d8e4623b2551f1d51714a5e3daa4d418f8d8f63 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -405,6 +405,20 @@ public final class CraftServer implements Server { @@ -17560,10 +17560,10 @@ index dce9eb210fe92f44745a316d1969251554673af2..5cbfa4ecb4c76cfda4fa42bfa6fdcec7 + // Purpur end } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index e00babef42bf7da243570aedaebbb1caf30edb7e..16c3922d7d33ec010170caf29b2605dfe99c6f12 100644 +index 656394bd8e4de8f3292a7781c0dcbf30c2a2ed6b..ee2087cd33167547b0713fa329f00d3c7257165d 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -2321,6 +2321,48 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -2354,6 +2354,48 @@ public class CraftWorld extends CraftRegionAccessor implements World { return (this.getHandle().getDragonFight() == null) ? null : new CraftDragonBattle(this.getHandle().getDragonFight()); } @@ -17924,7 +17924,7 @@ index f444e843535ec68ede0f05e7e7ef182ce872342b..6f967e1bce4d359efcdf2a82d4ab6f6b + // Purpur end } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index 1992bd985d1beae77b88d71c5fa551a277943fdb..1af2a41d63c7ce775316b5adbdb073453e84d31a 100644 +index 6be370a2be88aac6e229210ef625380171504693..afcab60de32e61b0dbdddb36b7839b854c3602ab 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java @@ -453,7 +453,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { @@ -18018,7 +18018,7 @@ index 0ad16ee7b33582d214dab41eeee378d52c8e38ed..16bd1294c219f15ada653ef810bc2d74 + // Purpur end } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 83aaf3e6e377d731ce02f779f80b7bf5db46f89f..64aaea2b8c27c2b320f423b37dc0254bfe2fe015 100644 +index 3a792ddc31e76038b84e8f87088c4cd94c349138..3b3bbeda831f82b6d9b284d85a31a1fff578a64f 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -519,10 +519,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -18038,7 +18038,7 @@ index 83aaf3e6e377d731ce02f779f80b7bf5db46f89f..64aaea2b8c27c2b320f423b37dc0254b for (ServerPlayer player : (List) this.server.getHandle().players) { if (player.getBukkitEntity().canSee(this)) { player.connection.send(new ClientboundPlayerInfoUpdatePacket(ClientboundPlayerInfoUpdatePacket.Action.UPDATE_DISPLAY_NAME, this.getHandle())); -@@ -1342,6 +1347,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1358,6 +1363,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } if (entity.isVehicle() && !ignorePassengers) { // Paper - Teleport API @@ -18049,7 +18049,7 @@ index 83aaf3e6e377d731ce02f779f80b7bf5db46f89f..64aaea2b8c27c2b320f423b37dc0254b return false; } -@@ -2502,6 +2511,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2518,6 +2527,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player { return this.getHandle().getAbilities().walkingSpeed * 2f; } @@ -18078,7 +18078,7 @@ index 83aaf3e6e377d731ce02f779f80b7bf5db46f89f..64aaea2b8c27c2b320f423b37dc0254b private void validateSpeed(float value) { Preconditions.checkArgument(value <= 1f && value >= -1f, "Speed value (%s) need to be between -1f and 1f", value); } -@@ -3287,4 +3318,70 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -3303,4 +3334,70 @@ public class CraftPlayer extends CraftHumanEntity implements Player { return this.spigot; } // Spigot end @@ -18231,7 +18231,7 @@ index 38b6d2c377800134de592a780b737b45c8096a11..449acd9dc983be1cd51208bc8f8d843d + // Purpur end } diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 5dc160b743534665c6b3efb10b10f7c36e2da5ab..f33d6e9785acbd21a0b366587aa170cc1509bf58 100644 +index 64ae7cfe765ebe697a2cce1b71751e628d6f1662..1920c154b43711473cdf29aeb881a773b8ce45df 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -594,6 +594,15 @@ public class CraftEventFactory { @@ -18250,7 +18250,7 @@ index 5dc160b743534665c6b3efb10b10f7c36e2da5ab..f33d6e9785acbd21a0b366587aa170cc return event; } -@@ -1061,6 +1070,7 @@ public class CraftEventFactory { +@@ -1071,6 +1080,7 @@ public class CraftEventFactory { damageCause = DamageCause.ENTITY_EXPLOSION; } event = new EntityDamageByEntityEvent(damager.getBukkitEntity(), entity.getBukkitEntity(), damageCause, modifiers, modifierFunctions, source.isCritical()); // Paper - add critical damage API @@ -18258,7 +18258,7 @@ index 5dc160b743534665c6b3efb10b10f7c36e2da5ab..f33d6e9785acbd21a0b366587aa170cc } event.setCancelled(cancelled); -@@ -1175,6 +1185,7 @@ public class CraftEventFactory { +@@ -1185,6 +1195,7 @@ public class CraftEventFactory { } else { entity.lastDamageCancelled = true; // SPIGOT-5339, SPIGOT-6252, SPIGOT-6777: Keep track if the event was canceled } @@ -18266,7 +18266,7 @@ index 5dc160b743534665c6b3efb10b10f7c36e2da5ab..f33d6e9785acbd21a0b366587aa170cc return event; } -@@ -1238,6 +1249,7 @@ public class CraftEventFactory { +@@ -1248,6 +1259,7 @@ public class CraftEventFactory { EntityDamageEvent event; if (damager != null) { event = new EntityDamageByEntityEvent(damager.getBukkitEntity(), damagee.getBukkitEntity(), cause, modifiers, modifierFunctions, critical); // Paper - add critical damage API diff --git a/patches/server/0012-Bump-Dependencies.patch b/patches/server/0012-Bump-Dependencies.patch index fa0d59336..0c811b930 100644 --- a/patches/server/0012-Bump-Dependencies.patch +++ b/patches/server/0012-Bump-Dependencies.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Bump Dependencies diff --git a/build.gradle.kts b/build.gradle.kts -index ab5aee09874e2258d05b22ca1be3c273cb1afb34..238637b9bd22121124a4c4664ce1ac417a80bafa 100644 +index 6e60342d9d394ccd595bde42c84b753ed9c0f7ec..aa3880a5bd5864081d0f9b52b727d3428d8ea6f1 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -22,7 +22,7 @@ dependencies { @@ -39,18 +39,18 @@ index ab5aee09874e2258d05b22ca1be3c273cb1afb34..238637b9bd22121124a4c4664ce1ac41 + implementation("org.ow2.asm:asm-commons:9.6") // Paper - ASM event executor generation implementation("org.spongepowered:configurate-yaml:4.2.0-SNAPSHOT") // Paper - config files implementation("commons-lang:commons-lang:2.6") -- implementation("net.fabricmc:mapping-io:0.3.0") // Paper - needed to read mappings for stacktrace deobfuscation +- implementation("net.fabricmc:mapping-io:0.5.0") // Paper - needed to read mappings for stacktrace deobfuscation - runtimeOnly("org.xerial:sqlite-jdbc:3.42.0.1") - runtimeOnly("com.mysql:mysql-connector-j:8.1.0") - runtimeOnly("com.lmax:disruptor:3.4.4") // Paper -+ implementation("net.fabricmc:mapping-io:0.5.0") // Paper - needed to read mappings for stacktrace deobfuscation -+ runtimeOnly("org.xerial:sqlite-jdbc:3.44.0.0") ++ implementation("net.fabricmc:mapping-io:0.5.1") // Paper - needed to read mappings for stacktrace deobfuscation ++ runtimeOnly("org.xerial:sqlite-jdbc:3.44.1.0") + runtimeOnly("com.mysql:mysql-connector-j:8.2.0") + runtimeOnly("com.lmax:disruptor:3.4.4") // Paper // Leaf - Bump Dependencies - Waiting Log4j 3.x that supported disruptor 4.0.0 + // Leaf end // Paper start - Use Velocity cipher - implementation("com.velocitypowered:velocity-native:3.1.2-SNAPSHOT") { -+ implementation("com.velocitypowered:velocity-native:3.2.0-SNAPSHOT") { // Leaf - Bump Dependencies ++ implementation("com.velocitypowered:velocity-native:3.3.0-SNAPSHOT") { // Leaf - Bump Dependencies isTransitive = false } // Paper end @@ -59,9 +59,9 @@ index ab5aee09874e2258d05b22ca1be3c273cb1afb34..238637b9bd22121124a4c4664ce1ac41 - runtimeOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.7.3") - runtimeOnly("org.apache.maven.resolver:maven-resolver-transport-http:1.7.3") + // Leaf start - Bump Dependencies -+ runtimeOnly("org.apache.maven:maven-resolver-provider:3.9.5") -+ runtimeOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.9.17") -+ runtimeOnly("org.apache.maven.resolver:maven-resolver-transport-http:1.9.17") ++ runtimeOnly("org.apache.maven:maven-resolver-provider:3.9.6") ++ runtimeOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.9.18") ++ runtimeOnly("org.apache.maven.resolver:maven-resolver-transport-http:1.9.18") + // Leaf end // Pufferfish start @@ -77,7 +77,7 @@ index ab5aee09874e2258d05b22ca1be3c273cb1afb34..238637b9bd22121124a4c4664ce1ac41 + testImplementation("org.junit.jupiter:junit-jupiter:5.10.1") testImplementation("org.hamcrest:hamcrest:2.2") - testImplementation("org.mockito:mockito-core:5.5.0") -+ testImplementation("org.mockito:mockito-core:5.7.0") ++ testImplementation("org.mockito:mockito-core:5.8.0") + + implementation("io.netty:netty-all:4.1.101.Final") + // Leaf end @@ -92,16 +92,3 @@ index ab5aee09874e2258d05b22ca1be3c273cb1afb34..238637b9bd22121124a4c4664ce1ac41 +repositories { + mavenCentral() +} -diff --git a/src/main/java/io/papermc/paper/util/ObfHelper.java b/src/main/java/io/papermc/paper/util/ObfHelper.java -index b8b17d046f836c8652ab094db00ab1af84971b2c..e856d7ce39e388f8bf45d394fd2fb586e3370c27 100644 ---- a/src/main/java/io/papermc/paper/util/ObfHelper.java -+++ b/src/main/java/io/papermc/paper/util/ObfHelper.java -@@ -93,7 +93,7 @@ public enum ObfHelper { - return null; - } - final MemoryMappingTree tree = new MemoryMappingTree(); -- MappingReader.read(new InputStreamReader(mappingsInputStream, StandardCharsets.UTF_8), MappingFormat.TINY_2, tree); -+ MappingReader.read(new InputStreamReader(mappingsInputStream, StandardCharsets.UTF_8), MappingFormat.TINY_2_FILE, tree); // Leaf - Use mapping-io 0.5.0-beta.1 - final Set classes = new HashSet<>(); - - final StringPool pool = new StringPool(); diff --git a/patches/server/0017-KeYi-Player-Skull-API.patch b/patches/server/0017-KeYi-Player-Skull-API.patch index d53bec253..c12c5ca0e 100644 --- a/patches/server/0017-KeYi-Player-Skull-API.patch +++ b/patches/server/0017-KeYi-Player-Skull-API.patch @@ -7,7 +7,7 @@ Original license: MIT Original project: https://github.com/KeYiMC/KeYi diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 692387ba5f313191ba324df666ea7086241153ee..91a6079d0b808e3b72aa60fadb73a0a0b2b4ad61 100644 +index 3b3bbeda831f82b6d9b284d85a31a1fff578a64f..5da0975b347261fc659f3c7710761c12307be493 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -29,6 +29,11 @@ import java.util.Optional; @@ -30,7 +30,7 @@ index 692387ba5f313191ba324df666ea7086241153ee..91a6079d0b808e3b72aa60fadb73a0a0 import org.bukkit.map.MapCursor; import org.bukkit.map.MapView; import org.bukkit.metadata.MetadataValue; -@@ -3384,4 +3390,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -3400,4 +3406,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player { this.getHandle().connection.send(new net.minecraft.network.protocol.game.ClientboundPlayerCombatKillPacket(getEntityId(), io.papermc.paper.adventure.PaperAdventure.asVanilla(message))); } // Purpur end diff --git a/patches/server/0023-Slice-Smooth-Teleports.patch b/patches/server/0023-Slice-Smooth-Teleports.patch index f00c424e8..8abf5b6df 100644 --- a/patches/server/0023-Slice-Smooth-Teleports.patch +++ b/patches/server/0023-Slice-Smooth-Teleports.patch @@ -7,7 +7,7 @@ Original license: MIT Original project: https://github.com/Cryptite/Slice diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index c7caf3166990d2165b4ca8206706a71f10141db1..f02d94b3195b33927a9cdac0207365cc0ac11bbd 100644 +index 1b760a544616c9950f65071736cf34abcb10d7a1..fdaf8885039c2ed5dbee65b44825f200c89b9d7b 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java @@ -279,6 +279,7 @@ public class ServerPlayer extends Player { @@ -36,10 +36,10 @@ index 1dd4bea0d5cf4aec51220253af8981c5aba29634..fa9264af129acc046822ac0a7769e45e entityplayer1.connection.send(new ClientboundChangeDifficultyPacket(worlddata.getDifficulty(), worlddata.isDifficultyLocked())); entityplayer1.connection.send(new ClientboundSetExperiencePacket(entityplayer1.experienceProgress, entityplayer1.totalExperience, entityplayer1.experienceLevel)); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 91a6079d0b808e3b72aa60fadb73a0a0b2b4ad61..9452e30892505b9749023c7867ac6e3e071e9194 100644 +index 5da0975b347261fc659f3c7710761c12307be493..84e75ba03da79bd761178fc22b746f1d38a9f44c 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1257,6 +1257,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1273,6 +1273,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { // Paper end } diff --git a/patches/server/0025-Leaves-Server-Utils.patch b/patches/server/0025-Leaves-Server-Utils.patch index 5169609c1..51a998b47 100644 --- a/patches/server/0025-Leaves-Server-Utils.patch +++ b/patches/server/0025-Leaves-Server-Utils.patch @@ -7,7 +7,7 @@ Original license: GPLv3 Original project: https://github.com/LeavesMC/Leaves diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index fbd449a30469e449744f085cf7a9e497d1198764..6c884cbe6bff9c681240557078e0f87044a7f8b9 100644 +index dda34ad1f05302d0706710dc20766c4059229c83..3cf07a2d82ec9f0d6666fb27aee9acc9d9823ead 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -419,6 +419,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { @@ -38,7 +38,7 @@ index fbd449a30469e449744f085cf7a9e497d1198764..6c884cbe6bff9c681240557078e0f870 } catch (Throwable throwable) { CrashReport crashreport = CrashReport.forThrowable(throwable, "Loading entity NBT"); -@@ -5046,4 +5053,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -5072,4 +5079,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { return false; } // Purpur end diff --git a/patches/server/0037-Reduce-canSee-work.patch b/patches/server/0037-Reduce-canSee-work.patch index 241b2a20f..dbcd4f230 100644 --- a/patches/server/0037-Reduce-canSee-work.patch +++ b/patches/server/0037-Reduce-canSee-work.patch @@ -35,7 +35,7 @@ index 192026f9edab53248dbd6db4fdb7d3955dff247e..bbfa6415fad20f3380c169c325d138e3 return false; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 9452e30892505b9749023c7867ac6e3e071e9194..2065c1f4f485d088a3fa0814ae50ddad53037d05 100644 +index 84e75ba03da79bd761178fc22b746f1d38a9f44c..718d6341fb440b8139b6ee75a17b07ed07221627 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -580,12 +580,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -53,7 +53,7 @@ index 9452e30892505b9749023c7867ac6e3e071e9194..2065c1f4f485d088a3fa0814ae50ddad if ((this.getUniqueId() == null) || (other.getUniqueId() == null)) { return false; } -@@ -2092,6 +2094,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2108,6 +2110,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { return this.canSee((org.bukkit.entity.Entity) player); } diff --git a/patches/server/0041-Fix-sprint-glitch.patch b/patches/server/0041-Fix-sprint-glitch.patch index d6bea27b8..6276f2d1d 100644 --- a/patches/server/0041-Fix-sprint-glitch.patch +++ b/patches/server/0041-Fix-sprint-glitch.patch @@ -5,13 +5,13 @@ Subject: [PATCH] Fix sprint glitch diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 23197384963b7f67e096eff18bf1809d36611923..57e6609368bf402ece1ca28b46fd1ef5813c7159 100644 +index d811a2456b7c2b8c4766f4b7943eeb438e88e3fd..1a9eb22266c83a6fb49f53f34190d661fa0be53a 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -1422,7 +1422,8 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -1430,7 +1430,8 @@ public abstract class LivingEntity extends Entity implements Attackable { player.setRealHealth(health); } - + - player.updateScaledHealth(false); + this.entityData.set(LivingEntity.DATA_HEALTH_ID, player.getScaledHealth()); // Sprint glitch Fix by pafias + // player.updateScaledHealth(false); // Commented out to fix sprint glitch